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

> ## Agent Instructions
> Five API is a video generation REST API. Base URL: https://api.fiveapi.ai. Authenticate with the header Authorization: Bearer <API key>; read the key from the FIVEAPI_API_KEY environment variable and never hard-code it.
> Every generation is an asynchronous task: POST /v1/{brand}/{version}/{task} returns a queued task, then poll GET /v1/tasks/{task_id} or receive a signed webhook, and download output.video.url before expires_at (7 days).
> The OpenAPI spec is at https://docs.fiveapi.ai/api-reference/openapi.yaml. An installable agent skill: npx skills add https://docs.fiveapi.ai

# Docs for AI assistants

> Give ChatGPT, Claude, Cursor and other AI tools direct access to the Five API docs through MCP, llms.txt and Markdown.

These docs are built to be read by AI tools as well as by people. Connect them to your assistant so its answers about Five API come from the current documentation, not from memory.

## Ask about a page

The menu at the top of every page lets you:

* **Copy page** as Markdown, ready to paste into any chat,
* **View as Markdown**,
* **Open in ChatGPT, Claude or Perplexity** with the page loaded,
* **Connect to Cursor or VS Code** through the docs MCP server,
* **Download the OpenAPI spec** of the API.

## Connect the docs MCP server

The docs MCP server lets an assistant search these docs and read full pages while it answers. Its address is:

```text theme={null}
https://docs.fiveapi.ai/mcp
```

**Claude Code**

```bash theme={null}
claude mcp add --transport http fiveapi-docs https://docs.fiveapi.ai/mcp
```

**Cursor**

Add the server to `.cursor/mcp.json` in your project, or to `~/.cursor/mcp.json` for all projects:

```json theme={null}
{
  "mcpServers": {
    "fiveapi-docs": {
      "url": "https://docs.fiveapi.ai/mcp"
    }
  }
}
```

**VS Code**

Add the server to `.vscode/mcp.json`:

```json theme={null}
{
  "servers": {
    "fiveapi-docs": {
      "type": "http",
      "url": "https://docs.fiveapi.ai/mcp"
    }
  }
}
```

**Claude and ChatGPT**

Add `https://docs.fiveapi.ai/mcp` as a custom connector in the settings of the app.

The MCP server also exposes the [Five API agent skill](https://testweb2-docs-openapi.test765.com/ai-tools/agent-skills.md) as a resource.

## llms.txt and Markdown

| Resource | URL |
| - | - |
| Index of every page, for AI tools | [https://docs.fiveapi.ai/llms.txt](https://docs.fiveapi.ai/llms.txt) |
| All pages in one file | [https://docs.fiveapi.ai/llms-full.txt](https://docs.fiveapi.ai/llms-full.txt) |
| Any page as Markdown | Add `.md` to the page URL, for example [https://docs.fiveapi.ai/quickstart.md](https://docs.fiveapi.ai/quickstart.md) |
| OpenAPI spec | [https://docs.fiveapi.ai/api-reference/openapi.yaml](https://docs.fiveapi.ai/api-reference/openapi.yaml) |

## A prompt to start your integration

Paste this into your coding assistant to have it build a Five API integration in your project:

Build a production-ready Five API integration in this project.

Integrate the Five API video generation API into this project. Read the documentation first: [https://docs.fiveapi.ai/llms.txt](https://docs.fiveapi.ai/llms.txt) (the OpenAPI spec is at [https://docs.fiveapi.ai/api-reference/openapi.yaml](https://docs.fiveapi.ai/api-reference/openapi.yaml)).

Requirements:

* Read the API key from the FIVEAPI\_API\_KEY environment variable. Never hard-code or log it, and call the API from server-side code only.
* Create tasks with `POST https://api.fiveapi.ai/v1/{brand}/{version}/{task}`, sending an Idempotency-Key derived from our own job id, and retry 429/503 after Retry-After and 500/network errors with backoff, reusing the same key and body.
* Receive results with a webhook endpoint that verifies the Standard Webhooks signature over the raw body, answers 2xx within 10 seconds, processes events asynchronously and de-duplicates on webhook-id. Fall back to polling `GET /v1/tasks/{task_id}` with backoff.
* On task.completed, download output.video.url to our storage before expires\_at. On task.failed, record error.code and resubmit only when error.retryable is true.
* Put our own ids in metadata so webhook events can be routed without a lookup.

Ask me which model and features we need before you start writing code.


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