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

# API Docs MCP

> Let an AI coding assistant search Magic Hour's API documentation.

The API Docs MCP gives an AI coding assistant access to the latest Magic Hour API documentation. It
can help find endpoints, explain parameters, produce code examples, and troubleshoot an API
integration without requiring you to copy and paste documentation.

<Warning>
  This server only searches the API documentation. It cannot create or edit media. To let an AI
  assistant use Magic Hour tools, connect the [Magic Hour creation
  MCP](/integration/model-context-protocol).
</Warning>

## Connect the API Docs MCP

```text API Docs MCP endpoint theme={null}
https://docs.magichour.ai/mcp
```

<Tabs>
  <Tab title="Cursor">
    [Install the API Docs MCP](https://cursor.com/en/install-mcp?name=Magic%20Hour%20API%20Docs\&config=eyJ1cmwiOiJodHRwczovL2RvY3MubWFnaWNob3VyLmFpL21jcCJ9)

    To connect manually, add this to `mcp.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "Magic Hour API Docs": {
          "url": "https://docs.magichour.ai/mcp"
        }
      }
    }
    ```
  </Tab>

  <Tab title="VS Code">
    [Install the API Docs MCP](https://vscode.dev/redirect/mcp/install?name=MagicHourApiDocs\&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fdocs.magichour.ai%2Fmcp%22%7D)

    To connect manually, create `.vscode/mcp.json`:

    ```json theme={null}
    {
      "servers": {
        "Magic Hour API Docs": {
          "type": "http",
          "url": "https://docs.magichour.ai/mcp"
        }
      }
    }
    ```
  </Tab>

  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add --transport http magic-hour-api-docs https://docs.magichour.ai/mcp
    ```
  </Tab>
</Tabs>

After connecting, ask questions such as:

* `Which Magic Hour endpoint turns an image into a video?`
* `Show me the required parameters for AI Image Editor.`
* `Why does a creation request return a project ID instead of a finished file?`

## Machine-readable documentation

Agents that cannot connect to MCP can fetch these public resources without an API key:

* [Documentation index](https://docs.magichour.ai/llms.txt): find the relevant guide, then fetch its
  linked Markdown page.
* [OpenAPI JSON](https://docs.magichour.ai/api-reference/openapi.json): exact endpoint paths,
  authentication, request fields, response schemas, and HTTP errors.
* [Models and credit costs](/api-reference/models): model IDs, capabilities, plan eligibility, and
  cost calculation. Check these before choosing a model; `default` can change.

Give Codex, Claude Code, Cursor, or another coding assistant this integration brief:

```text theme={null}
Integrate Magic Hour using https://docs.magichour.ai/llms.txt and
https://docs.magichour.ai/api-reference/openapi.json as the API contract.
Read the quickstart, models, and development-and-testing guides first.
Use the current Python or Node SDK; keep MAGIC_HOUR_API_KEY server-side.
First verify authentication and balance with GET /v1/account (no generation).
Confirm model eligibility and estimated credits before creating media.
Save the returned project ID before polling. Handle complete, error, canceled,
and a bounded timeout; a timeout must not trigger another creation request.
Download successful output before its signed URL expires. Propagate failures.
For webhooks, verify the raw-body signature and handle duplicate deliveries.
Use the hosted mock for SDK wiring only. Ask before spending generation credits.
Do not claim a successful integration until a real output has been downloaded.
```


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