Requests
Headers
Every request and response header the API uses.
Request headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <api-key>. See Authentication. |
Content-Type | No | The API reads the body as JSON, whatever this header says. The examples in these docs send application/json. |
Idempotency-Key | No | On create generation only: 1 to 255 printable ASCII characters. See Generations. |
Response headers
| Header | Returned | Description |
|---|---|---|
Request-Id | Every response from an endpoint | req_ followed by lowercase letters and digits. Error bodies repeat it as request_id. Include it when you contact support. |
Cache-Control | Every response from an endpoint | no-store. Do not cache API responses. |
Content-Type | Every response from an endpoint | application/json |
Responses sent before an endpoint runs, such as 405 for an unsupported method, have no Request-Id header and no JSON body.