List available styles
GET/v1/styles
List the visual styles that can be passed as style_id when creating a visual request.
The id of any entry is accepted directly as style_id. Custom styles created in the
Napkin app are not listed here yet; their ids are shown in the app.
Responses
- 200
- 401
- 403
- 429
- 500
Styles listed successfully
The bearer token was accepted once and is no longer usable. Mint or refresh a token; retrying the same one never succeeds.
No usable credential was sent, the credential is not one this API accepts, the grant lacks the scope, or the resource belongs to another caller.
Three different refusals share this status, and the retry advice differs for each, so branch on error rather than on the status.
- rate_limit_exceeded: a per-second, minute, hour or day window is full. Wait the Retry-After seconds and retry. This is the only one of the three that carries that header or the window fields.
- generation_limit_exceeded: the account's lifetime generation allowance is spent. Waiting never clears it; contact us to raise the limit. It carries limit and used instead.
- too_many_failed_attempts: repeated bad credentials from this address are being refused. Fix the credential before calling again; retrying with the same one extends the refusal.
Response Headers
Seconds to wait before retrying. Sent only for rate_limit_exceeded.
45Requests allowed in the window named by X-RateLimit-Window. Sent by POST /v1/visual, the only rate-limited endpoint, once a call has reached its limiter: a refusal that answers earlier, such as 403, 405, 413 or a 429 for repeated bad credentials, carries none of these four headers. Your own numbers depend on your plan, so read them here rather than assuming a figure. A value of 0 with window fallback means the limiter could not be reached and the call was let through; treat it as no reading, not as a limit of zero.
10Requests left in that window. Pace on this rather than on a fixed delay.
7Unix timestamp when that window resets
1704067260The window the two counts above describe. It is the window with the fewest requests left in absolute terms, not the one nearest its own limit proportionally, so a successful call usually reports second: the per-second allowance is the smallest number on every tier. Read the pair as how many you may send right now rather than as naming the quota that will stop you next. The value fallback means the limiter could not be reached.
minuteThe call failed on our side and may be retried