Skip to content

Get started

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.

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 ​

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 /estimate returns the price in credits and in dollars and charges nothing.
  • Launch. POST /generations with an Idempotency-Key header: a repeated request is never charged twice.
  • Result. GET /generations/{id} until done or failed. A failed generation is refunded.
  • References. POST /references: a file, a link or base64, then the id goes into reference_ids.