# Public API

> The decodx public API: what it covers, authentication and errors.

:::info[Short answer]

The decodx public API covers videos, projects, render jobs, the Brand Kit and the Library. An admin creates a service token in Settings → Advanced → Service tokens. The full reference is at https://api.decodx.ai/api-docs.

:::

## Authenticate

Send the service token in the Authorization header of each request.

```bash
curl https://api.decodx.ai/projects \
  -H "Authorization: Bearer $DECODX_TOKEN"
```

## Errors

Each error has the same body: a code, a message and, where possible, a fix.

```
400 Bad Request
{
  "code": "validation_failed",
  "message": "title: Required",
  "fix": "Send a title of 1 to 120 characters."
}
```

| Status | Meaning |
|---|---|
| 200 | The request succeeded. |
| 400 | The request is not valid. The body names the problem and the fix. |
| 401 | The token is missing or not valid. |
| 402 | Your plan does not include this feature. The code is `plan_required`. |

:::note

Goals, Social and Visibility are in the MCP server, not in the public API. The OpenAPI file is at https://api.decodx.ai/openapi.public.json.

:::
