Getting started

Quickstart

Make your first v1 API request in under five minutes.

4 min read

This quickstart walks through creating an API key, submitting a generation, and polling for the result. The public API is URL-only: input media goes in as URLs and outputs come back as URLs.

1. Create an API key

Open the API keys page from your profile menu, click New API key, pick the project the key should be bound to, and grant access on the generations module. The key is bound to that single project for its lifetime — every request you make is auto-scoped to it.

You'll only see the full key once — copy it immediately and store it somewhere safe. Revoking and re-creating is the only recovery path.

2. Submit a generation

POST to /v1/generations with your prompt and a modelId. The call returns immediately with a generationId — the job runs asynchronously.

1curl -X POST $BASE_URL/v1/generations \
2 -H "x-api-key: $SIXART_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "prompt": "A futuristic city with neon lights at sunset",
6 "modelId": "nano-banana",
7 "attachments": [],
8 "aspectRatio": "16:9",
9 "options": { "resolution": "1K" }
10}'

3. Poll for the result

GET /v1/generations/:id until status is completed or failed. Polling every ~2 seconds is fine.

1curl $BASE_URL/v1/generations/$GENERATION_ID \
2 -H "x-api-key: $SIXART_KEY"

Image generations usually complete in under 30 seconds. Video can take 1–3 minutes. Audio is somewhere in between.

Next steps