API reference

Complete project upload

Confirm that a project upload finished and start preprocessing. Review Diffio API behavior, response fields, setup details, and production workflows.

Confirm an upload and start preprocessing. Optional: Diffio also records the upload when the session completes.

POST/v1/complete_project_uploadPermissions: write

Endpoint

HTTP request

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

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

Send the project id after the upload session completes.

Body fields

FieldTypeRequiredDescription
apiProjectIdstringYesProject identifier returned by create_project.
cURL
curl -X POST "https://api.diffio.ai/v1/complete_project_upload" \  -H "Authorization: Bearer $DIFFIO_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "apiProjectId": "proj-123"  }'

Response

Returns the project id, its upload status, and the stored size.

Response fields

FieldTypeRequiredDescription
apiProjectIdstringYesProject identifier.
statusstringYesAlways uploaded on success.
sizeBytesnumberYesSize of the stored upload in bytes.
Successful response
{  "apiProjectId": "proj-123",  "status": "uploaded",  "sizeBytes": 1234567}

Return codes

  • 200Success, treated as complete.: Upload recorded (repeated calls return the same answer).
  • 204Success, treated as empty response.: CORS preflight when method is OPTIONS.
  • 400Bad request, treated as client error.: Invalid JSON body, or 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 does not own this project, or missing write permission.
  • 404Not found, treated as missing resource.: API project not found.
  • 409Conflict, treated as not ready yet.: Upload has not completed yet (code UPLOAD_MISSING), or the project has no upload key.
  • 413Client error, treated as fix required.: Upload exceeds the size limit (code UPLOAD_TOO_LARGE).
  • 503Service unavailable, treated as retryable.: Upload storage is temporarily unavailable; retry.

Notes

  • Call it after POST {edgeBaseUrl}/v1/uploads/complete succeeds. It is idempotent.
  • Generations can be created before preprocessing finishes; they wait for the uploaded audio.