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

# API Reference

> REST endpoints for renders, AI tasks, uploads, webhooks, and account management.

The Framelane API is organized around predictable, resource-oriented REST. It uses standard HTTP verbs, returns JSON for every response, and authenticates with a Bearer API key. The endpoints in this reference are generated from our [OpenAPI specification](/openapi.json) and include an interactive playground — set your API key once and send live requests from the browser.

## Base URL

```
https://api.framelane.io
```

All requests use HTTPS. All request and response bodies are JSON encoded with `snake_case` field names.

## Authentication

Every request must include your API key as a Bearer token:

```http theme={null}
Authorization: Bearer fl_live_kT9uQw...
```

Create and manage keys in the [console](https://console.framelane.io) under **Settings → API Keys**. See [Authentication](/introduction/authentication) for rotation and storage guidance.

<Card title="Get an API key" icon="key" href="https://console.framelane.io/signup" horizontal>
  Sign up and generate your first key in under a minute.
</Card>

## Asynchronous jobs

Renders and tasks are long-running. Submitting one returns **`202 Accepted`** immediately with a job object — you then wait for completion by **polling** the job (`GET /v1/renders/{id}` or `GET /v1/tasks/{id}`) or by subscribing to **[webhooks](/webhooks/overview)** (recommended for production).

```
Submit job  →  202 Accepted (status: queued)  →  poll or webhook  →  download artifact
```

## Idempotency

`POST` endpoints that create jobs accept an `Idempotency-Key` header. Reusing a key returns the original job instead of creating a duplicate; reusing a key with a *different* body returns **`409 Conflict`**.

```http theme={null}
Idempotency-Key: render-2026-05-21-001
```

## Pagination

List endpoints use cursor-based pagination with `limit` and `cursor` query parameters and return a consistent envelope:

```json theme={null}
{
  "data": [ /* ... */ ],
  "next_cursor": "eyJpZCI6...",
  "has_more": true
}
```

Pass `next_cursor` back as the `cursor` parameter to fetch the next page. When `has_more` is `false`, `next_cursor` is `null`.

## Errors

Errors return the appropriate HTTP status code and a structured envelope with a machine-readable `code`:

```json theme={null}
{
  "error": {
    "code": "not_found",
    "message": "Render not found.",
    "details": {}
  }
}
```

See [Errors](/introduction/errors) for the full list of codes and [Rate Limits](/introduction/rate-limits) for throttling behavior.

## SDKs

Official SDKs wrap authentication, polling, and webhook verification:

<CardGroup cols={2}>
  <Card title="TypeScript SDK" icon="square-js" href="/sdks/typescript">
    `npm install @framelane/sdk`
  </Card>

  <Card title="Python SDK" icon="python" href="/sdks/python">
    `pip install framelane`
  </Card>
</CardGroup>

## Resources

<CardGroup cols={2}>
  <Card title="Renders" icon="film" href="/renders/overview">
    Compose and render video from a timeline of elements.
  </Card>

  <Card title="Tasks" icon="bolt" href="/tasks/overview">
    AI operations — background removal, gaze redirect, super resolution, transcription.
  </Card>

  <Card title="Uploads" icon="cloud-arrow-up" href="/introduction/uploads">
    Request signed upload slots for local media files.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/webhooks/overview">
    Subscribe to job lifecycle events with signed, retried delivery.
  </Card>
</CardGroup>
