API reference

Diffio 3.4 generation

Queue a generation using the diffio-3.4 model.

Queue a generation for a project using the diffio-3.4 model.

POST/v1/diffio-3.4-generationPermissions: write

Endpoint

HTTP request

https://api.diffio.ai/v1/diffio-3.4-generation

Use POST with a JSON body.

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

FieldTypeRequiredDescription
apiProjectIdstringYesProject identifier returned by create_project.
samplingobjectNoOptional sampling overrides.
sampling.seednumberNoDeterministic seed for repeatable generations.
paramsobjectNoOptional model parameters.
params.promptstringNoOptional prompt text when supported by the model.
cURL
curl -X POST "https://api.diffio.ai/v1/diffio-3.4-generation" \  -H "Authorization: Bearer $DIFFIO_API_KEY" \  -H "Content-Type: application/json" \  -d '{	    "apiProjectId": "proj-123",	    "sampling": {	      "seed": 42	    },	    "params": {	      "prompt": "Warm piano"	    }	  }'

Response

Returns the queued generation record.

Response fields

FieldTypeRequiredDescription
generationIdstringYesGeneration identifier for progress and downloads.
apiProjectIdstringYesProject identifier for the generation.
modelKeystringYesModel key set to diffio-3.4.
statusstringYesInitial status for the generation, usually queued.
Successful response
{	  "generationId": "gen-123",	  "apiProjectId": "proj-123",	  "modelKey": "diffio-3.4",	  "status": "queued"	}

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.
  • 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.
  • 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.4.
  • Use /v1/get_generation_progress to track progress after queuing.