---
agent:
  instructions: "Search the site by keyword or question. The search API returns Markdown."
  endpoint: "https://platform.invideo.io/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# For AI agents

> How an AI agent signs up, creates a key, and calls invideo Platform.

Use these docs and discovery endpoints to connect an AI agent to invideo Platform.

## Read the docs as markdown

- [/llms.txt](/llms.txt): every page of the docs and every model, as links to markdown.
- [/llms-full.txt](/llms-full.txt): all docs and all model pages in one file.
- [OpenAPI](https://platform-api.invideo.io/v1/openapi.json) describes the API endpoints and their request and response schemas.
- Any page as markdown: add `.md` to its URL (`/docs/quickstart.md`, `/models/nano-banana-2-1.md`), or send `Accept: text/markdown`.

## Find models without a key

```bash
curl https://platform-api.invideo.io/v1/catalog
curl https://platform-api.invideo.io/v1/catalog/nano-banana-2-1
```

The list has each model's `id`, `name`, maker (`provider`), `modality`, `modes` and list `prices`. One model adds `input_schema` (a JSON Schema of `input`, per mode) and `output`. See [Catalogue](/docs/catalog).

## Get an API key

A key belongs to a workspace, and a person makes it:

1. Sign up at [platform.invideo.io/signup](/signup) with an email address. A code is sent to the email; entering it signs in. An agent with access to the inbox can do this itself.
2. If the console shows **Request access**, send the company name and the use case. Access is given by email.
3. Open [platform.invideo.io/api-keys](/api-keys), select **Create key**, and copy the key. It starts with `iv_` and is shown once.

Store the key as `INVIDEO_API_KEY` in the environment, never in code or a repository. A leaked key must be deleted in the console at once (see [Security](/docs/security)).

## Call a model

```bash
curl -X POST https://platform-api.invideo.io/v1/request \
  -H "Authorization: Bearer $INVIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: my-task-42" \
  -d '{"model": "nano-banana-2-1", "mode": "generate", "input": {"prompt": "a lighthouse at dusk"}}'
```

Then `GET /v1/request/{id}` every 2 to 5 seconds until `status` is `succeeded` or `failed`. Files are in `output.files[].url` (valid for one hour).

## Rules that save retries

- Send only the keys of the model's `input_schema`: an unknown key is refused with `422 invalid_input`, and `detail[].loc` names the field.
- Always send an `Idempotency-Key` on a submit you may retry: the same key never runs twice.
- On `429`, wait the `Retry-After` seconds. On `5xx`, retry with the same `Idempotency-Key`.
- A `failed` request costs nothing. `error.retryable` says if the same input can succeed later.
- Files as input: an `https` URL or a `data:` URI (see [Files](/docs/files)).

## Every endpoint

See the [API reference](/docs/api-reference).
