Skip to main content

Overview

The LongStories.ai API allows you to programmatically generate engaging videos from text prompts (up to 10 minutes long). Our API provides endpoints for video generation and status checking.

Base URL

https://longstories.ai/api/v1

Authentication

All API endpoints require authentication using an API key. Include your API key in the x-api-key header of all requests:
x-api-key: your-api-key
Keep your API key secure and never expose it in client-side code. If you need to rotate your API key, contact support.

Rate Limits

  • In High Traffic moments rate limits might apply to your account. For more information, contact support.

Response Format

All responses follow a consistent JSON format:
{
  "data": {
    // Response data specific to the endpoint
  },
  "requestId": "req_xyz123" // Unique identifier for the request
}

Error Handling

When an error occurs, you’ll receive a JSON response with error details:
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {
      // Additional error context
    }
  }
}
For detailed error codes and handling strategies, see our Error Handling Guide.

Available Endpoints

Generate a Video

Create a new video from a text prompt (up to 10 minutes)

Get Generation Status

Check the status of a video generation