Generate an image, video, music or sound
Start an AI generation; the result lands in the project media. Credits are reserved now and settled when it ends (released when it fails). wait (seconds, up to 25) answers with the finished generation when it is done by then; otherwise 202 with its status: poll GET /projects/{id}/generations/{operationId}. Required API key scopes: `projects:read`, `media:write`.
Authorization
apiKeyAuth Path Parameters
Resource identifier
Query Parameters
Seconds to wait for the result
0 <= value <= 25Request Body
application/json
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v2/projects/string/generations" \ -H "Content-Type: application/json" \ -d '{ "kind": "image", "prompt": "A pumpkin field at golden hour, wide shot", "aspectRatio": "3:2" }'{ "success": true, "data": { "id": "aiop_01J", "projectId": "project_01J", "kind": "image", "status": "completed", "model": "openai/gpt-image-2.6/sunburst", "prompt": "A pumpkin field at golden hour", "progress": 100, "credits": 12, "media": { "id": "media_01J", "name": "pumpkin-field.png", "kind": "image", "mimeType": "image/png", "width": 1536, "height": 1024 }, "createdAt": "2026-11-11T09:00:00.000Z", "updatedAt": "2026-11-11T09:00:21.000Z", "completedAt": "2026-11-11T09:00:21.000Z" }}List a project's generations GET
Newest first; kind filters (comma separated), before and limit page through them. Required API key scopes: `projects:read`.
Get a generation GET
Status, progress and, once completed, the result media. wait (seconds, up to 25) holds the answer until the generation ends or the time is up. Required API key scopes: `projects:read`.