API reference
List project generations
List generations for a project. Review Diffio API behavior, response fields, setup details, and production workflows.
List generations for a project.
POST
/v1/list_project_generationsEndpoint
HTTP request
https://api.diffio.ai/v1/list_project_generationsUse POST with a JSON body.
Permissions
read
API keys must be active.
Authentication
Send the API key on every request using one of the supported headers.
Authorization: Bearer <apiKey>X-Api-Key: <apiKey>Xi-Api-Key: <apiKey>
Request
Provide the project id to list its generations.
Body fields
| Field | Type | Required | Description |
|---|---|---|---|
apiProjectId | string | Yes | Project identifier returned by create_project. |
cURL
curl -X POST "https://api.diffio.ai/v1/list_project_generations" \ -H "Authorization: Bearer $DIFFIO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "apiProjectId": "proj-123" }'Response
Returns a list of generations for the project.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
apiProjectId | string | Yes | Project identifier for the request. |
generations | array | Yes | List of generation objects. |
generations[].generationId | string | Yes | Generation identifier. |
generations[].status | string | Yes | Current generation status. |
generations[].modelKey | string | Yes | Model key used for the generation. |
generations[].progress | number | No | Progress percentage when available. |
generations[].createdAt | string | Yes | Creation timestamp in ISO 8601 format. |
generations[].updatedAt | string | Yes | Last updated timestamp in ISO 8601 format. |
Successful response
{ "apiProjectId": "proj-123", "generations": [ { "generationId": "gen-123", "status": "processing", "modelKey": "diffio-2", "progress": 45, "createdAt": "2025-01-05T12:40:00Z", "updatedAt": "2025-01-05T12:41:00Z" } ]}Return codes
200Success, treated as complete.: Generation list returned.204Success, treated as empty response.: CORS preflight when method is OPTIONS.400Bad request, treated as client error.: Invalid JSON body, apiProjectId must be provided as a string.401Unauthorized, treated as auth error.: Missing API key, or invalid API key.403Forbidden, treated as permission error.: API key is not active, missing read permission, or does not own the project.404Not found, treated as missing resource.: API project not found.405Client error, treated as fix required.: Method is not POST.500Server error, treated as retryable.: Failed to load generations.
Notes
- apiProjectId is required.
- Returns only generations owned by the API key.
- Results are sorted by createdAt in descending order, updatedAt is used when createdAt is missing.
- progress can be null when the generation has not reported progress.
