> ## Documentation Index
> Fetch the complete documentation index at: https://docs.longstories.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Welcome to the LongStories.ai API

## 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

```bash theme={null}
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:

```bash theme={null}
x-api-key: your-api-key
```

<Note>
  Keep your API key secure and never expose it in client-side code. If you need to rotate your API key, contact support.
</Note>

## 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:

```json theme={null}
{
  "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:

```json theme={null}
{
  "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](/errors/handling).

## Available Endpoints

<Card title="Generate a Video" icon="video" href="/api-reference/endpoint/generate-a-short-video">
  Create a new video from a text prompt (up to 10 minutes)
</Card>

<Card title="Get Generation Status" icon="clock" href="/api-reference/endpoint/get-short-video-generation-status">
  Check the status of a video generation
</Card>
