Skip to content

Core concepts

Requests and lifecycle ​

Base URL ​

text
https://api.synesta.ai/v1

All 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 ​

MethodPathWhat it does
GET/accountplan, credits, API balance, key limits
GET/modelsmodels open in the API
GET/models/{id}one model and what it accepts
POST/estimateprice of a generation without starting it
POST/referencesupload a reference
POST/generationsstart a generation
GET/generationsAPI 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 ​

StageWhat the response shows
Accepted202, the generation in its initial status, cost_credits charged, queue.queued_at
Queued and runningintermediate statuses, empty outputs
Donestatus: done, outputs[] with links, finished_at
Failedstatus: 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:

FieldWhat it is
urllink to the result file
kindimage, video, audio, model (3D) or file
mimefile type
preview_urla lighter copy for display, when present
thumb_urla 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: pass meta.next_before of the previous page. On the last page next_before is null.
bash
curl "https://api.synesta.ai/v1/generations?type=video&limit=20" \
  -H "Authorization: Bearer $SYNESTA_API_KEY"