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

# Reference

> Authentication, request shape, responses, and limits for the AirGraphic API.

The OpenAPI reference is generated from the checked-in `openapi.json` file.

## Authentication

Use a bearer API key created in `/app/api-keys`.

```bash theme={null}
# docs-example: auth-header
Authorization: Bearer ag_your_api_key
```

API keys inherit the workspace plan, credits, saved brands, and rate limits.
Revoked keys return `401`.

## Endpoints

### `POST /api/generate`

Queues one infographic generation and returns `202` with a `jobId`.

Supported JSON primary sources:

* `sourceUrl`
* `sourceText`
* `sourceImage` data URI

Supported multipart primary source fields:

* `sourcePdf`
* `sourcePptx`
* `sourceImage`

`referenceImage` is separate. It guides visual style or asset use but does not
count as the source material.

### `POST /api/meme`

Queues one researched meme generation and returns `202` with a `jobId` after
culture scouting, template matching, and creative selection. Memes cost 2
credits.

Supported JSON primary sources:

* `sourceUrl`
* `sourceText`
* `sourceImage` data URI

Supported multipart primary source fields:

* `sourcePdf`
* `sourcePptx`
* `sourceImage`

Optional hints:

* `brandUrl`
* `brandProfileId`
* `audienceNote`
* `avoidNote`
* `styleNotes`
* `aspectRatio` (`1:1`, `4:5`, `9:16`, `16:9`)
* `outputFormat`

### `GET /api/jobs/{id}`

Returns the latest job state. Completed jobs include `imageUrl`.

## Rate limits

| Plan    | API limit                            |
| ------- | ------------------------------------ |
| Free    | 5 requests per hour, 25 per day      |
| Creator | 30 requests per minute, 300 per day  |
| Pro     | 90 requests per minute, 1500 per day |

Rate-limited responses include `x-ratelimit-limit`, `x-ratelimit-remaining`,
and `x-ratelimit-reset` headers.
