API reference
Diffio 3.5 generation
Queue a generation using the diffio-3.5 model. Review Diffio API behavior, response fields, setup details, and production workflows.
Queue a generation for a project using the diffio-3.5 model.
POST
/v1/diffio-3.5-generationEndpoint
HTTP request
https://api.diffio.ai/v1/diffio-3.5-generationUse POST with a JSON body.
Accepted aliases:
/v1/diffio-3.4-generation
Permissions
write
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 and optional sampling or params overrides.
Body fields
| Field | Type | Required | Description |
|---|---|---|---|
apiProjectId | string | Yes | Project identifier returned by create_project. |
sampling | object | No | Optional sampling overrides. |
sampling.seed | number | No | Deterministic seed for repeatable generations. |
params | object | No | Optional model parameters. |
params.prompt | string | No | Optional prompt text when supported by the model. |
idempotencyKey | string | No | Optional retry token, 1 to 255 characters after trimming. Repeating a request with the same key returns the existing generation instead of creating a duplicate. |
cURL
curl -X POST "https://api.diffio.ai/v1/diffio-3.5-generation" \ -H "Authorization: Bearer $DIFFIO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "apiProjectId": "proj-123", "sampling": { "seed": 42 }, "params": { "prompt": "Warm piano" }, "idempotencyKey": "restore-song-wav-001" }'Response
Returns the queued generation record.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
generationId | string | Yes | Generation identifier for progress and downloads. |
apiProjectId | string | Yes | Project identifier for the generation. |
modelKey | string | Yes | Model key set to diffio-3.5. |
status | string | Yes | Initial status for the generation, usually queued. |
idempotentReplay | boolean | No | Present and true when the request replayed an existing generation for a repeated idempotencyKey. |
Successful response
{ "generationId": "gen-123", "apiProjectId": "proj-123", "modelKey": "diffio-3.5", "status": "queued" }Idempotent replay response
Idempotent replay response
{ "generationId": "gen-123", "apiProjectId": "proj-123", "modelKey": "diffio-3.5", "status": "processing", "idempotentReplay": true}Return codes
200Success, treated as complete.: Generation queued and stored.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, sampling must be an object, params must be an object, idempotencyKey must be a non-empty string of at most 255 characters.401Unauthorized, treated as auth error.: Missing API key, or invalid API key.402Payment required, billing issue such as paymentFailed. API usage can be blocked until billing is updated.: Spend limit exceeded for this API key.403Forbidden, treated as permission error.: API key is not active, missing write 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.409Conflict, treated as not ready yet.: idempotencyKey was already used for this project with a different model, the error code is idempotencyKeyConflict.500Server error, treated as retryable.: Pricing is not configured, or failed to create generation record.
Example error response
Error response
{ "error": "Spend limit exceeded for this API key.", "code": "spendLimitExceeded", "currency": "USD", "spendLimitUsd": 10, "estimatedCostUsd": 1.5, "usedUsd": 9.2, "pendingUsd": 0, "periodStart": "2026-01-15T00:00:00Z", "periodEnd": "2026-02-15T00:00:00Z"}Notes
- apiProjectId is required.
- sampling and params are optional objects. null is treated as an empty object.
- sampling and params are passed through without schema validation. Nested fields are not validated.
- modelKey is always set to diffio-3.5.
- idempotencyKey is optional, 1 to 255 characters after trimming. The generation id is derived from the API key, apiProjectId, and idempotencyKey, so retrying the same request returns the existing generation with its current status and idempotentReplay set to true instead of creating and charging a duplicate.
- Reusing an idempotencyKey on the same project with a different model returns 409 with code idempotencyKeyConflict.
- Use /v1/get_generation_progress to track progress after queuing.
