Get Generation by ID

Retrieve the current status and output asset of a specific generation job. Poll this endpoint after creating a job until the status is COMPLETED or FAILED.

GET/api/generations/:id

Parameters

idstringRequired

The unique job identifier returned from the POST /api/generations request.

Responses

200Success — job found.
{
  "id": "cmr1aot6r000004i87w38n1f6",
  "status": "COMPLETED",
  "modelId": "gemini-2.5-flash-image",
  "type": "IMAGE",
  "createdAt": "2024-05-15T10:30:00Z",
  "completedAt": "2024-05-15T10:30:28Z",
  "asset": {
    "url": "https://pub-xxx.r2.dev/users/.../generation.png",
    "mimeType": "image/png"
  }
}
200In Progress — job is still processing.
{
  "id": "cmr1aot6r000004i87w38n1f6",
  "status": "PROCESSING",
  "modelId": "sora-2",
  "type": "VIDEO",
  "createdAt": "2024-05-15T10:30:00Z",
  "asset": null
}
404Not Found — job ID does not exist or belongs to another user.
{
  "error": "Generation job not found"
}
curl -X GET https://editlyplatform-ed06row0u-editly.vercel.app/api/generations/cmr1aot6r000004i87w38n1f6 \
  -H "Authorization: Bearer YOUR_API_KEY"