This page covers the conventions that apply to every endpoint. The full,
endpoint-by-endpoint reference — generated from the API’s OpenAPI specification —
is in the groups in the sidebar:
Image Generation,
Image Editing,
Video Generation,
Model Training,
Models, and
Account & Usage. For a working end-to-end
example, see the quickstart.
Base URL
https://preview.api.samsa.ai/public/v1.
Authentication
Every request must carry an organization API key as a bearer token:Conventions
- Asynchronous jobs — generation endpoints return
202 Acceptedwith a jobid; poll the matchingGETendpoint for status, or supply awebhook_urlto be notified on completion. - Statuses — jobs move through
pending,processing, and then a terminalcompleted,failed, orcancelled. - Scopes — most endpoints require a scope on the key (for example,
images.generate);GET /meneeds only a valid key. A key missing a required scope receives403. - Errors — non-2xx responses return a structured JSON error body with a
type,code,message, andrequest_id. - Credits — actions draw from the organization’s credit pool; an exhausted
pool returns
402. - Rate limits — requests are limited per key; exceeding the limit returns
429with aRetry-Afterheader.