---
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/"
---

# Authentication

> Send your API key as a Bearer token. Keys belong to a workspace.

Every call needs an API key in the `Authorization` header (the catalogue does not):

```bash
curl https://platform-api.invideo.io/v1/models \
  -H "Authorization: Bearer $INVIDEO_API_KEY"
```

## Keys

- Each API key belongs to a **workspace**. Every key of a workspace shares its models, its limits and its spend.
- Make and delete keys in the console, under [API keys](/api-keys). You can view a key only when you create it.
- A key starts with `iv_` and has 75 characters: `iv_` + 22 characters + `_` + 49 characters.
- Delete a key and it stops at once. Make a new key before you delete the old one to rotate without downtime.

## Keep keys secret

- Call the API from your server. Never put a key in a browser, a mobile app or a public repository.
- Use one key per app or environment, so you can turn one off without stopping the others.
- If a key leaks, delete it in the console at once. See [Security](/docs/security).

## Errors

A missing, invalid, disabled or expired key returns `401`:

```json
{ "error": "unauthorized", "message": "..." }
```
