Requests and lifecycle
Base URL
text
https://api.synesta.ai/v1All requests go over HTTPS with a JSON body (Content-Type: application/json). The exception is a file upload to POST /references as multipart/form-data.
Operations
| Method | Path | What it does |
|---|---|---|
| GET | /account | plan, credits, API balance, key limits |
| GET | /models | models open in the API |
| GET | /models/{id} | one model and what it accepts |
| POST | /estimate | price of a generation without starting it |
| POST | /references | upload a reference |
| POST | /generations | start a generation |
| GET | /generations | API generations, newest first |
| GET | /generations/{id} | status and result of one generation |
Fields and responses of each operation are in the API reference.
Generation lifecycle
| Stage | What the response shows |
|---|---|
| Accepted | 202, the generation in its initial status, cost_credits charged, queue.queued_at |
| Queued and running | intermediate statuses, empty outputs |
| Done | status: done, outputs[] with links, finished_at |
| Failed | status: failed, error with a code, refunded: true, credits_refunded |
Intermediate statuses may change; rely only on the two final ones: done and failed.
applied in a generation lists the parameters it actually ran with: aspect, resolution, duration, number of references. A field you did not send shows its default.
Result
Each item of outputs:
| Field | What it is |
|---|---|
url | link to the result file |
kind | image, video, audio, model (3D) or file |
mime | file type |
preview_url | a lighter copy for display, when present |
thumb_url | a thumbnail, when present |
Files are stored by Synesta, not by the model provider. The generation is also visible in your account on the site.
Listing generations
GET /generations returns generations started through the REST API, newest first.
type· one type only;limit· page size, 20 by default, 50 at most;before· cursor: passmeta.next_beforeof the previous page. On the last pagenext_beforeisnull.
bash
curl "https://api.synesta.ai/v1/generations?type=video&limit=20" \
-H "Authorization: Bearer $SYNESTA_API_KEY"