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

# API overview

> Core inference endpoints, scope, and a portable specification.

This reference documents common text and multimodal endpoints using one [standard OpenAPI 3.0 file](/openapi/relay.json). Shared field descriptions are bilingual to keep both languages on the same schema.

| Endpoint | Purpose |
| - | - |
| [GET /v1/models](/en/api-reference/models) | List models visible to the current key |
| [POST /v1/chat/completions](/en/api-reference/chat-completions) | Generate a reply from a message array |
| [POST /v1/responses](/en/api-reference/responses) | Use Responses input, output, and event structures |
| [POST /v1/messages](/en/api-reference/claude-messages) | Native Claude messages |
| [`POST /v1beta/models/{model}:generateContent`](/en/api-reference/gemini-generate) | Native Gemini generation |
| [`POST /v1beta/models/{model}:streamGenerateContent`](/en/api-reference/gemini-stream) | Native Gemini SSE |
| [POST /v1/images/generations](/en/api-reference/images-generations) | Generate images |
| [POST /v1/images/edits](/en/api-reference/images-edits) | Edit images |
| [POST /v1/audio/speech](/en/api-reference/audio-speech) | Generate speech |
| [POST /v1/audio/transcriptions](/en/api-reference/audio-transcriptions) | Transcribe audio |
| [POST /v1/audio/translations](/en/api-reference/audio-translations) | Translate audio |
| [POST /v1/videos](/en/api-reference/videos-create) | Create video task |
| [`GET /v1/videos/{task_id}`](/en/api-reference/videos-retrieve) | Retrieve video task |
| [`GET /v1/videos/{task_id}/content`](/en/api-reference/videos-content) | Download video |
| [`HEAD /v1/videos/{task_id}/content`](/en/api-reference/videos-content-head) | Inspect video content |
| [`POST /v1/videos/{video_id}/remix`](/en/api-reference/videos-remix) | Remix video |
| [POST /v1/embeddings](/en/api-reference/embeddings) | Generate text vectors |
| [POST /v1/rerank](/en/api-reference/rerank) | Rerank candidate documents |
| [`GET /v1/models/{model}`](/en/api-reference/model-retrieve) | Retrieve one model |
| [POST /v1/responses/compact](/en/api-reference/responses-compact) | Compact context |
| [`GET /v1/responses/{response_id}`](/en/api-reference/responses-retrieve) | Retrieve a plugin task response |
| [POST /v1/moderations](/en/api-reference/moderations) | Moderate content |
| [POST /v1/completions](/en/api-reference/completions) | Create a text completion |
| [`POST /v1beta/models/{model}:embedContent`](/en/api-reference/gemini-embed) | Gemini single embedding |
| [`POST /v1beta/models/{model}:batchEmbedContents`](/en/api-reference/gemini-batch-embed) | Gemini synchronous batch embeddings |
| [`POST /v1/tasks/{key}`](/en/api-reference/tasks-submit) | Submit a generic plugin task |
| [`GET /v1/tasks/{key}`](/en/api-reference/tasks-retrieve) | Retrieve a task |
| [`GET /v1/tasks/{key}/artifacts`](/en/api-reference/task-artifacts) | List task artifacts |
| [`GET /v1/tasks/{key}/artifacts/{artifact_key}/content`](/en/api-reference/task-artifact-content) | Download task artifact |
| [`HEAD /v1/tasks/{key}/artifacts/{artifact_key}/content`](/en/api-reference/task-artifact-head) | Inspect task artifact |
| [POST /v1/alpha/search](/en/api-reference/alpha-search) | Alpha Search request |
| [`GET /mj/task/{id}/fetch`](/en/api-reference/midjourney-task) | Retrieve a Midjourney task |

## WebSocket APIs

Handshake and event references are maintained separately from the 32 REST operations above: [Responses WebSocket](/en/api-reference/responses-websocket) and [Realtime](/en/api-reference/realtime). Find runnable scripts and the shared module in [WebSocket integration](/en/guides/websocket).

## Request conventions

Send `Authorization: Bearer YOUR_API_KEY` and `Content-Type: application/json` for JSON requests. For file uploads, use the endpoint's multipart format and let the client set the boundary. SDK base URLs include `/v1`. OpenAPI `servers` contain only the gateway origin and optional prefix because specification paths already include `/v1`.

`gateway.example.com` is a placeholder. The local reference disables the online request panel. Configure your own server-side client using the [integration guide](/en/guides/api-basics).

Native Claude also accepts `x-api-key`; Gemini accepts `x-goog-api-key`. Both carry gateway tokens. Native examples use `API_ROOT_URL` without a protocol prefix; Gemini paths contain `/v1beta`.

## Scope

This curated specification was checked against the implementation. It is not a complete mirror of management, media, or provider-specific endpoints. A listed field does not guarantee unchanged forwarding by every channel or support by every model. Confirm ranges, defaults, tools, and multimodal capabilities for your deployment.

Do not mix Chat Completions and Responses fields. Responses may include provider extensions not expanded here; clients should tolerate extra fields. Example outputs illustrate structure only; actual text and usage vary.

## Source

Checked revision: `1b7b8df6a2eb3d59485e71ea79a48f248c11b668`. Based on project routes, the model-list controller, and `relaykit` request/response DTOs. Source files and revision are recorded in `x-source-files` and `x-source-revision` in the specification.

To migrate platforms, reuse the OpenAPI file and replace page `openapi` frontmatter with the target platform's API rendering configuration. [Errors and retries](/en/guides/errors) apply to these endpoints.

The added Claude / Gemini operations were checked against `d851a5faa49a00abaafd27bf91b311506fbfbc52`. Each operation records its own `x-source-revision` and `x-source-files`; the original 15 operations retain the baseline above.

Runnable native SSE and tool loops for [Claude](/en/guides/native-claude-streaming) and [Gemini](/en/guides/native-gemini-streaming) include completion validation and signature preservation.

Model retrieval, moderation, compaction, and plugin task retrieval were checked at `30a6d88a4`, with sources recorded per operation. Plugin task retrieval does not proxy arbitrary upstream responses; see [API coverage](/en/guides/api-coverage).

[简体中文](/zh/api-reference/overview)


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