List Generations

Retrieve a paginated list of all your past generation jobs, sorted by creation date (newest first). Useful for building generation history UIs or auditing usage.

GET/api/generations

Parameters

pagenumberOptional

The page number to retrieve. Defaults to 1.

limitnumberOptional

Number of results per page. Max 50, defaults to 20.

Responses

200Success — returns a paginated list.
{
  "data": [
    {
      "id": "cmr1aqro8000104i8z6h3v57h",
      "status": "COMPLETED",
      "modelId": "gemini-2.5-flash-image",
      "type": "IMAGE",
      "createdAt": "2024-05-15T10:30:00Z",
      "asset": {
        "url": "https://pub-xxx.r2.dev/users/.../generation.png",
        "mimeType": "image/png"
      }
    },
    {
      "id": "cmr13w0yg001cl4m63345370w",
      "status": "COMPLETED",
      "modelId": "sora-2",
      "type": "VIDEO",
      "createdAt": "2024-05-14T14:20:00Z",
      "asset": {
        "url": "https://pub-xxx.r2.dev/users/.../generation.mp4",
        "mimeType": "video/mp4"
      }
    }
  ],
  "pagination": {
    "total": 24,
    "page": 1,
    "limit": 10,
    "totalPages": 3
  }
}
curl -X GET "https://editlyplatform-ed06row0u-editly.vercel.app/api/generations?page=1&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"