API reference

List project generations

List generations for a project.

List generations for a project.

POST/v1/list_project_generationsPermissions: read

Endpoint

HTTP request

https://api.diffio.ai/v1/list_project_generations

Use 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

FieldTypeRequiredDescription
apiProjectIdstringYesProject 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

FieldTypeRequiredDescription
apiProjectIdstringYesProject identifier for the request.
generationsarrayYesList of generation objects.
generations[].generationIdstringYesGeneration identifier.
generations[].statusstringYesCurrent generation status.
generations[].modelKeystringYesModel key used for the generation.
generations[].progressnumberNoProgress percentage when available.
generations[].createdAtstringYesCreation timestamp in ISO 8601 format.
generations[].updatedAtstringYesLast 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.