Synesta API
Synesta generates images, video, music, voice and 3D models. The same models as on the site are available through the REST API for your code. MCP for AI agents (Claude, ChatGPT) is a separate product on a subscription: synesta.ai/mcp.
Run your first request
Key, balance and a first generation in five minutes.
Get an API keyKeys, API balance and top-ups in the console.
Make a request
Every model starts the same way: POST /generations with an Idempotency-Key header. The body depends on the type and the model; take the model id from GET /models.
bash
curl -X POST https://api.synesta.ai/v1/generations \
-H "Authorization: Bearer $SYNESTA_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"type":"image","model":"MODEL_ID","prompt":"A lighthouse at dawn","max_credits":20}'js
const res = await fetch('https://api.synesta.ai/v1/generations', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SYNESTA_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({ type: 'image', model: 'MODEL_ID', prompt: 'A lighthouse at dawn', max_credits: 20 }),
});
const { data } = await res.json();python
import os, uuid, requests
res = requests.post(
"https://api.synesta.ai/v1/generations",
headers={
"Authorization": f"Bearer {os.environ['SYNESTA_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={"type": "image", "model": "MODEL_ID", "prompt": "A lighthouse at dawn", "max_credits": 20},
)
data = res.json()["data"]The answer is 202 with the generation in its initial status. Success is an object in data:
json
{ "data": { "id": 123, "status": "running", "cost_credits": 8 } }Then call GET /generations/{id} until status is done or failed. On done the file links are in outputs[].url.
Choose your path
Your code over REST
Price, launch, polling, result.
Before productionLifecycle, idempotency, errors and limits.
Your own input filesAn image, video or audio into reference_ids.
A failed generation is refunded. Results are stored by Synesta; links in outputs lead there, not to the model provider.
What you can do
- Models. A list with the lowest price and what each model accepts:
GET /models,GET /models/{id}. See Models. - Price before launch.
POST /estimatereturns the price in credits and in dollars and charges nothing. - Launch.
POST /generationswith anIdempotency-Keyheader: a repeated request is never charged twice. - Result.
GET /generations/{id}untildoneorfailed. A failed generation is refunded. - References.
POST /references: a file, a link or base64, then the id goes intoreference_ids.
Related topics
- How the API works: price, launch, polling, result.
- API reference: every operation from the OpenAPI specification.
- Console: keys, API balance, top-ups.
- llms.txt and llms-full.txt: these docs for AI agents.
- Terms of use: sections «API» and «API balance».