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

# APIs

> Livepeer API reference: Studio REST API, AI Gateway API, authentication, base URLs, and OpenAPI spec location.

> [!TIP]
>
> Two distinct APIs exist: the Studio REST API (streams, assets, webhooks) and the AI Gateway API (inference pipelines). They share the same authentication method but have separate base URLs and OpenAPI specs.

***

Studio REST API

## Studio REST API

**Base URL:** `https://livepeer.studio/api`

**Authentication:** `Authorization: Bearer <api-key>`

**OpenAPI spec:** Available at [https://livepeer.studio/api-reference](https://livepeer.studio/api-reference) (interactive) and as a downloadable JSON spec from the Studio dashboard under Developer > API Reference.

### Resource endpoints

<table>
  <thead>
    <tr>
      Resource

      Base path

      Key operations
    </tr>
  </thead>

  <tbody>
    <tr>
      **Streams**

      `/api/stream`

      POST (create), GET /:id, PATCH /:id, DELETE /:id, GET (list)
    </tr>

    <tr>
      **Assets**

      `/api/asset`

      POST /request-upload, GET /:id, PATCH /:id, DELETE /:id, GET (list)
    </tr>

    <tr>
      **Webhooks**

      `/api/webhook`

      POST (create), GET /:id, PUT /:id, DELETE /:id, POST /:id/resend
    </tr>

    <tr>
      **Signing keys**

      `/api/access-control/signing-key`

      POST (create), GET (list), DELETE /:id
    </tr>

    <tr>
      **Multistream targets**

      `/api/multistream/target`

      POST (create), GET /:id, PUT /:id, DELETE /:id
    </tr>

    <tr>
      **Sessions**

      `/api/session`

      GET /:id, GET (list by stream)
    </tr>
  </tbody>
</table>

### Rate limits

Rate limits are per API key and visible in the Studio dashboard under **Settings > API Keys**. The default limits for the Growth tier are sufficient for most production applications. Contact support for Enterprise rate limit increases.

AI Gateway API

## AI Gateway API

**Base URL (Studio-managed, production):** `https://livepeer.studio/api/beta/generate`

**Base URL (public, non-production):** `https://dream-gateway.livepeer.cloud`

**Authentication:** `Authorization: Bearer <api-key>` (same Studio API key)

**Content type:** `application/json` for text payloads; `multipart/form-data` for file uploads (image-to-image, upscale, segment-anything-2, audio-to-text, image-to-text)

### Inference endpoints

<table>
  <thead>
    <tr>
      Pipeline

      Endpoint

      Input

      Min VRAM
    </tr>
  </thead>

  <tbody>
    <tr>
      **Text to image**

      `POST /text-to-image`

      JSON: `prompt`, `model_id`, `width`, `height`, `negative_prompt`, `guidance_scale`, `num_inference_steps`

      24 GB
    </tr>

    <tr>
      **Image to image**

      `POST /image-to-image`

      multipart: `image` (file), `prompt`, `model_id`, `strength`

      20 GB
    </tr>

    <tr>
      **Image to video**

      `POST /image-to-video`

      multipart: `image` (file), `model_id`, `width`, `height`, `fps`, `motion_bucket_id`

      24 GB
    </tr>

    <tr>
      **Image to text**

      `POST /image-to-text`

      multipart: `image` (file), `model_id`, `prompt`

      4 GB
    </tr>

    <tr>
      **Audio to text**

      `POST /audio-to-text`

      multipart: `audio` (file), `model_id`, `language`

      12 GB
    </tr>

    <tr>
      **Text to speech**

      `POST /text-to-speech`

      JSON: `text`, `model_id`, `voice`

      12 GB
    </tr>

    <tr>
      **Upscale**

      `POST /upscale`

      multipart: `image` (file), `model_id`, `prompt`

      24 GB
    </tr>

    <tr>
      **Segment Anything 2**

      `POST /segment-anything-2`

      multipart: `image` (file), `model_id`, `point_coords`, `point_labels`

      6 GB
    </tr>

    <tr>
      **LLM**

      `POST /llm`

      JSON: OpenAI-compatible `messages` array, `model`

      8 GB
    </tr>
  </tbody>
</table>

### Common response shape

All image-output pipelines return:

```json theme={null}
{
  "images": [
    {
      "url": "https://...",
      "seed": 42,
      "nsfw": false
    }
  ]
}
```

Text pipelines (`llm`, `audio-to-text`, `image-to-text`) return:

```json theme={null}
{ "text": "..." }
```

The LLM pipeline returns an OpenAI-compatible `choices` array in addition to the `text` field.

### OpenAPI spec

The AI Gateway OpenAPI spec is generated from the `ai-runner` repository via `gen_openapi.py` and output as `openapi_gateway.json`. The spec is used to auto-generate all three AI SDK language variants.

The live interactive reference for the AI API is mounted in the Gateways tab documentation at `/v2/gateways/resources/reference/technical/api-reference/AI-API/ai`.

## Related pages

> [card] [SDKs](/v2/developers/resources/reference/sdks.md)
>
> Official SDK packages for TypeScript, Python, Go, and React.

> [card] [SDK Integration Guide](/v2/developers/build/sdk-gateway.md)
>
> Full examples, error handling, and retry configuration.

> [card] [AI Authentication](/v2/developers/guides/ai/authentication.md)
>
> API key types and how to use them correctly.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.