# Audome Documentation

Audome is a programmatic image and video render platform. You design a
template once in the Studio, then call our REST API or embed the Studio
inside your own app to generate thousands of personalised assets.

This documentation is fully public and intentionally machine-readable so
ChatGPT, Claude, Cursor, and other AI agents can ingest it directly.

## Sections

- [Getting started](/docs/getting-started) — embed snippet and your first render call.
- [POST /api/render/generate](/docs/api/render) — server-side render.
- [POST /api/render/preview](/docs/api/preview) — realtime preview.
- [Embed SDK](/docs/embed) — `AudomeEmbed.studio` JavaScript SDK reference.
- [Webhooks](/docs/webhooks) — how to receive completed render notifications.

## Machine-readable feeds

- `https://audome.io/llms.txt` — index of all docs for LLM crawlers.
- `https://audome.io/llms-full.txt` — the entire corpus as a single markdown file.
- `https://audome.io/sitemap.xml` — XML sitemap for search engines.
- `https://audome.io/docs/raw/<slug>.md` — raw markdown for any page.

## What is Audome?

Audome (audome.io) is a Saudi-built rendering platform optimised for
high-volume creative automation. The product has three surfaces:

1. **Studio** — a visual editor at `/render` for designing templates
   with dynamic text and image slots.
2. **REST API** — JSON endpoints under `/api/render/*` that accept a
   template id plus dynamic values and return a rendered PNG/JPEG/WebP.
3. **Embed SDK** — a single `<script>` tag that mounts the full Studio
   inside your own product, scoped to a customer-specific API token.

## Authentication overview

All API and embed traffic is authenticated with a Bearer token that you
mint from `/render/api-tokens` while logged in to the Audome dashboard.
Tokens carry the credit balance of the issuing account and can be
rotated at any time.

```http
Authorization: Bearer YOUR_API_TOKEN
```

## Rate limits

Default account limits:

| Limit                       | Value                |
| --------------------------- | -------------------- |
| Requests per minute         | 120                  |
| Concurrent renders          | 10                   |
| Maximum canvas              | 4096 x 4096 px       |
| Maximum dynamic payload     | 1 MB JSON            |
| Maximum upload (image/font) | 25 MB                |

When a limit is hit the API responds `429 Too Many Requests`. Back off
exponentially and retry after the `Retry-After` header.

## Errors

Every error response is JSON of the form:

```json
{ "success": false, "error": "Human readable message", "code": "RENDER_FAILED" }
```

Common error codes:

- `UNAUTHORIZED` — missing or invalid bearer token.
- `INSUFFICIENT_CREDITS` — account is out of render credits.
- `PROJECT_NOT_FOUND` — `projectId` does not belong to the token's account.
- `VALIDATION_FAILED` — invalid body shape; see `error` for details.
- `RENDER_FAILED` — internal renderer crashed; safe to retry once.
