API errors, retries and limits

Use the HTTP status and stable error.code to decide what to do next. Preserve error.request_id for support; do not expose API keys or resumable upload URLs in logs.

Error envelope

{
  "error": {
    "code": "invalid_api_key",
    "message": "The API key is invalid, expired, or revoked.",
    "request_id": "REQUEST_ID_FROM_RESPONSE",
    "details": {}
  }
}

Responses also contain X-Request-Id. Success responses use data, so check the status before reading a successful result shape.

Retry rules

ResponseAction
401 invalid_api_keyVerify Authorization, expiry and revocation. Replace the credential if necessary.
403 insufficient_scope or account/plan restrictionCorrect permission or account state; repeated identical requests will not help.
400 / 415 / 422 validation errorCorrect the request or media according to error.code and message.
409 conflictCheck idempotency, file allocation or dataset state before retrying.
429Honor Retry-After; distinguish rate limiting from a full training queue.
500 / 503 or uncertain network responseBack off. Retry an identical POST with its original Idempotency-Key.

Use bounded retries and save operation state. The Python and Node.js examples illustrate stateful recovery. Do not replace an uncertain training request with a new key: that can create another job.

Idempotency

POST requests require an Idempotency-Key containing 1–128 printable nonspace ASCII characters. Generate a unique value for each logical operation and store it before sending. Reuse it for an identical retry. Reusing a key for a changed body returns idempotency_conflict.

Results are retained for seven days. The operation is scoped to the account and endpoint path. Key rotation within the same account does not mean you should generate a new operation key for an uncertain retry.

Completion batches are separate operations
Calling dataset complete can validate only part of a large dataset. Retry a failed or uncertain batch with the same key; after a successful validating response, use a new key for the next batch. Replaying the same successful key does not request the next batch.

Validation errors

CodeLikely correction
invalid_content_type / invalid_jsonSend application/json and a valid JSON body to metadata endpoints.
request_too_largeKeep JSON metadata within 65,536 bytes; upload media to the storage URL.
invalid_pathUse a safe relative path; nested directories only for dataset input.
unsupported_media_typeMatch the extension, MIME type and selected input type.
media_metadata_unavailableCheck the original media/container; use a supported conventional export when appropriate.
invalid_input_typeUse the correct regular or panoramic input category.
insufficient_inputSupply sufficient photo/video coverage.
dataset_not_readyComplete validation until status is ready.
inactive_parameterRemove settings that are not active at the selected quality level.
invalid_configurationUse values permitted by the current configuration schema.
file_already_completeContinue with the dataset instead of uploading an already validated file again.

Rate and account limits

The current API allows 120 authenticated requests per key per minute and 300 per account per minute. More keys do not bypass the account limit. Read Retry-After when rate_limit_exceeded is returned.

Separate errors identify account allowances: plan_limit_exceeded, project_limit_exceeded, training_concurrency_exceeded, model_not_allowed and api_allowance_exceeded. Check the UTC monthly API point balance with GET /usage and the operational input limits with GET /capabilities.

See capabilities for API ceilings, datasets for file validation and pricing for current plans.

API errors, retries and limits – Developers | Splatware Docs