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

# Set up with your coding agent

> Paste one prompt into Claude Code, Codex or Cursor to wire the Voyager API into your project, give your agent a cloud GPU, and give it these docs as llms.txt, Markdown, an MCP server or OpenAPI.

The Voyager API is built to be used by coding agents. Give your agent the prompt below and it will add a small client to your project, generate a test image and tell you what it cost.

> [!NOTE]
>
> **Before you start:** create an API key at [voyager.so/dashboard/api](https://voyager.so/dashboard/api) (paid plans, trials included) and put it in `VOYAGER_API_KEY` in your project's `.env`. Don't paste the key into the chat.

## The setup prompt

Copy this into your agent, in the project where you want to use Voyager. The same prompt is on the dashboard's **API** tab.

```text theme={"system"}
Set up the Voyager API in this project.

Voyager generates images, video, speech, music, sound effects, 3D and object masks with the same models
and credits as the Voyager app. Docs: https://docs.voyager.so/api  (agent-readable:
https://docs.voyager.so/llms.txt, OpenAPI: https://api.voyager.so/v1/openapi.json)

1. Key: read it from the env var VOYAGER_API_KEY. Never hard-code it or commit it; add
   VOYAGER_API_KEY= to .env.example and make sure .env is git-ignored. If it's missing,
   ask me to create one at https://voyager.so/dashboard/api (paid plans).
2. Base URL https://api.voyager.so/v1, header: Authorization: Bearer $VOYAGER_API_KEY
3. Pick a model: GET /models?type=image|video|speech|music|sound_effect|3d|segment. Read
   GET /models/{id} for its input_schema before building a request.
4. Optional cost check: POST /estimate with the same body as step 5; it returns
   estimated_charge (credits) and can_run.
5. Create: POST /jobs {"model": "<id>", "operation": "<op>", "input": {...}} with an Idempotency-Key header
   (a new UUID per logical request; reuse it when retrying the same request).
6. Wait: GET /jobs/{id}?wait=25 until status is succeeded, failed or canceled
   (honor Retry-After / poll_after_ms). Or pass "webhook_url" and verify the
   Standard Webhooks signature with the secret from the dashboard.
7. Results: job.outputs[].url is a signed link valid for 1 hour; download it right
   away, or GET /jobs/{id} again for a fresh link. Files are kept 30 days.
8. Errors are {"error": {"code","message","retryable",...}}. 402 = out of credits or
   not on a paid plan (show error.details.upgrade_url to me). 429 = slow down: wait
   Retry-After seconds. Retry only when retryable is true, with the same Idempotency-Key.

Minimal example (curl):
  curl -s https://api.voyager.so/v1/jobs \
    -H "Authorization: Bearer $VOYAGER_API_KEY" -H "Content-Type: application/json" \
    -H "Idempotency-Key: $(uuidgen)" \
    -d '{"model":"nano-banana-2.1","operation":"text-to-image","input":{"prompt":"a red fox in snow","aspect_ratio":"16:9"}}'
  curl -s "https://api.voyager.so/v1/jobs/<job id>?wait=25" -H "Authorization: Bearer $VOYAGER_API_KEY"

Write a small typed client (create → wait → download) with retries as above, then
generate one test image to prove it works and tell me what it cost (job.credits.charged;
if credits.state is still "pending", report job.credits.estimated and say it's an estimate).
```

### Check it worked

Your agent should end with a saved test image and a cost in Voyager credits. If it reports an estimate, the final charge isn't confirmed yet; see [Credits](https://docs.voyager.so/api/jobs.md#credits). If it stops at a `402`, open the `upgrade_url` it shows you.

## Give your agent a cloud GPU

Your agent can also lease a Voyager cloud GPU, run commands on it and copy files in and out with the `voyager-cloud` CLI, for renders, simulations and CUDA jobs. Paste this to get it going:

```text theme={"system"}
Use Voyager cloud GPUs for GPU work in this project (needs a paid Voyager workspace, Starter or above).
1. Install the CLI if it's missing:
   macOS / Linux:  curl -fsSL https://voyager.so/cloud/install.sh | sh
   Windows (PowerShell):  irm https://voyager.so/cloud/install.ps1 | iex
2. Sign in: voyager-cloud login (opens my browser). If VOYAGER_API_KEY is set, use it instead. Never ask me to paste a key.
3. Lease one machine and wait: voyager-cloud lease render --wait --json (render-lite is cheaper; compute is an H100
   without ray tracing). Reuse it for the whole session.
4. voyager-cloud push <machine> <folder>, voyager-cloud exec <machine> -- <command> (waits, prints output, passes the
   exit code through), voyager-cloud pull <machine> <path>. Long jobs: exec --detach, then logs --follow and wait.
5. When done: voyager-cloud release <machine> and tell me the cost it prints. If access is refused, show me the
   billing link from the error. Docs: https://docs.voyager.so/api/machines/overview
```

To render with [Vork](https://github.com/voyager-so/vork), use the prompt in [Render with Vork](https://docs.voyager.so/api/machines/vork.md) instead. Agents that work through MCP can use the [cloud machines MCP server](https://docs.voyager.so/api/machines/mcp.md).

## Give your agent these docs

These docs are published in forms agents read directly.

| Format | Where | Use it for |
| - | - | - |
| **llms.txt** | [docs.voyager.so/llms.txt](https://docs.voyager.so/llms.txt) | An index of every page with a one-line summary. [llms-full.txt](https://docs.voyager.so/llms-full.txt) has every page in one file. |
| **Markdown** | Add `.md` to any page URL, such as [docs.voyager.so/api/jobs.md](https://docs.voyager.so/api/jobs.md) | One page as plain Markdown. |
| **MCP server** | `https://docs.voyager.so/mcp` | Lets the agent search and read these docs while it works. |
| **OpenAPI** | [api.voyager.so/v1/openapi.json](https://api.voyager.so/v1/openapi.json) | The full machine-readable API: every endpoint, field and error. Generate a client from it, or point your agent at it. |

### Add the docs MCP server

> [tab] Claude Code
>
> ```bash theme={"system"}
> claude mcp add --transport http voyager-docs https://docs.voyager.so/mcp
> ```

> [tab] Codex
>
> ```bash theme={"system"}
> codex mcp add voyager-docs --url https://docs.voyager.so/mcp
> ```
>
> Or add it to `~/.codex/config.toml`:
>
> ```toml theme={"system"}
> [mcp_servers.voyager-docs]
> url = "https://docs.voyager.so/mcp"
> ```

> [tab] Cursor
>
> Open **Cursor Settings → MCP** and add a server, or add this to `~/.cursor/mcp.json` (or `.cursor/mcp.json` in your project):
>
> ```json theme={"system"}
> {
>   "mcpServers": {
>     "voyager-docs": {
>       "url": "https://docs.voyager.so/mcp"
>     }
>   }
> }
> ```

The docs server only reads documentation. It can't generate anything or see your account.

## Don't want to write code?

To generate from ChatGPT, Claude or Codex without an API key or any code, connect Voyager's hosted MCP server instead. It uses the same models and credits. See [Connect your AI](https://docs.voyager.so/connect/overview.md).


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