Printy3D

Reference

Errors

Every error is one JSON problem document (RFC 9457) with a stable code. Branch on the code; show the detail to people.

The problem document#

Errors answer with a 4xx or 5xx status and application/problem+json:

402 Payment Required
{
  "type": "https://docs.printy3d.com/errors/insufficient_credits",
  "title": "insufficient credits",
  "status": 402,
  "code": "insufficient_credits",
  "detail": "This job needs 1800 credits held while it runs; 312 are available.",
  "instance": "/v1/jobs",
  "request_id": "01JB7Q4V6Y8M2N3P4R5S6T7V8W",
  "errors": [],
  "required": 1800,
  "available": 312
}
  • code is stable: use it in your code. title and detail are for people and may change.
  • errors lists field-level failures ({field, message}) for validation_failed.
  • Some codes add fields beside the standard ones, such as required and available above or reason on capacity_exhausted.
  • request_id matches the X-Request-Id response header. You may send your own X-Request-Id (8–64 letters, digits, _ or -); quote it when you contact support.

Error codes#

StatuscodeMeaning
400malformed_requestThe body is not valid JSON or the request cannot be parsed.
401unauthenticatedNo API key, or the Authorization header is malformed.
401invalid_api_keyThe key is unknown, revoked or expired.
402insufficient_creditsA live job's hold exceeds your available credits. Extras: required, available.
403insufficient_scopeThe key lacks the scope this endpoint needs.
403org_requiredThe credential is not tied to an account.
403origin_not_allowedA browser request from an origin that is not allowed. Call the API from your server.
403ip_not_allowedThe request comes from an IP address the key's allow-list does not include.
403account_pendingLive work for an account the Printy3D team has not approved yet: "This account is waiting for approval by the Printy3D team; live jobs start once it is approved. Test keys run simulated jobs meanwhile."
404not_foundNo such object in your account and mode. Objects of other accounts are always 404.
405method_not_allowedThe path exists but not with this method.
409conflictThe request conflicts with the current state: a file that is not ready, an upload with parts missing, a key already rotated, 25 active keys, a 21st webhook endpoint of one mode, an evaluation of a job that is not a succeeded Exact Check or whose measurements have expired.
409job_not_cancellableThe job has already succeeded or failed.
409idempotency_in_progressReserved, not returned today: two requests with the same Idempotency-Key at the same time are taken in turn, and the second waits for the first, then replays it.
410expiredThe file or output is past its retention period and was deleted.
413file_too_largeThe upload is larger than its upload lane or your plan allows.
415unsupported_formatThe bytes are not a format Printy3D accepts.
422validation_failedA field is missing, unknown or out of range; errors lists each one.
422idempotency_key_reusedThe same Idempotency-Key was sent with a different body.
422input_too_largeThe input exceeds a size limit of the job, such as a splat count.
429rate_limitedToo many requests for this key. Always with Retry-After.
429concurrency_limitToo many active jobs for your plan. Always with Retry-After.
429quota_exceededA plan quota is used up, such as input storage. Always with Retry-After.
500internalAn error on our side. Quote the request_id when you report it.
501feature_unavailableNot available to this account or key: the resumable upload before approval, a format or tool not enabled, an export conversion with a test key, a live Exact Check where it is not set up.
503service_unavailableA dependency is briefly unavailable. Always with Retry-After.
503capacity_exhaustedNo GPU can start a live job now, or no Exact Check worker is running for a live cad_check; nothing was queued or held. reason: paused, spend_limit, no_gpu_available, controller_offline or cad_unavailable. Always with Retry-After.

The spec's ErrorCode also lists bootstrap_invalid, image_not_allowed, lease_expired, lease_terminal, contracts_mismatch: they belong to the internal worker plane and are never returned to an API key.

Handling errors#

StatusWhat to do
400, 404, 405, 413, 415, 422Fix the request; retrying it unchanged fails again.
401, 403Check the key, its mode and its scopes; for account_pending, use a test key (simulated jobs) until your account is approved.
501The feature is not open to this key or account: for an export conversion, use a live key; for a resumable upload, wait for approval.
402Wait for running jobs to release their holds, or add credits.
409Read the detail: wait for the file to be ready, finish the upload, or retry an in-progress idempotent request.
429, 503Wait for Retry-After, then retry with the same Idempotency-Key.
500, 502, 504Retry idempotent requests with backoff; report the request_id if it persists.