Reference · Errors
Photta API errors every type and what to do
In one sentence
Every Photta API failure returns the same shape: a status, an `error.type`, a message and a `request_id`. Retry 429 after the Retry-After header and 5xx with backoff; fix 400, 401 and 402 in your own code.
- Errors: 7 error types
- Retry-After: Retry-After: 30s
- Limits: 600 requests/min
Every figure on this page comes from the Photta API docs · checked
Error types
The complete list the API documentation publishes.
- 400
invalid_request_error - The request is malformed or contains invalid parameters.
- 401
authentication_error - The API key is missing, invalid, or expired.
- 402
insufficient_credits_error - Your account does not have enough credits.
- 404
not_found_error - The requested resource does not exist.
- 409
conflict_error - The request conflicts with current state — e.g. your concurrent-batch cap is reached.
- 429
rate_limit_error - Too many requests. Slow down and retry.Retry-After: 30
- 500
api_error - An internal server error occurred. Retry later.
The shape of an error
The same envelope on every endpoint, whatever went wrong.
{
"error": {
"type": "rate_limit_error",
"message": "Rate limit exceeded."
},
"request_id": "req_xxxxxxxx"
}Handling failures
Respect Retry-After
A 429 carries a Retry-After header. Wait that many seconds, then retry with exponential backoff — retrying immediately only pushes the next window further away.
Failures refund credits
A generation that fails after being accepted refunds its credits automatically, so a retry does not double-charge.
Quote the request id
Every response carries a `request_id`. Log it. It is the fastest way for support to find one specific failure among thousands.
409 is a queue signal
A conflict means your plan’s concurrent-batch cap is reached. Poll the batch already in flight until it resolves, then resubmit — do not spin.
Questions about API errors
What does an error body look like?
An `error` object with a `type` and a `message`, alongside the `request_id`. The type is stable and machine-readable; the message is for humans and may change.
Which errors are worth retrying?
429 after waiting the Retry-After seconds, and 5xx with exponential backoff. A 400, 401 or 402 will fail the same way until something on your side changes.
What does a 402 mean?
`insufficient_credits_error` — the account does not hold enough credits for the call, or for the whole reservation in a batch. Nothing is generated and nothing is charged.
How do I report a failure?
Send the `request_id`, the endpoint and the time. That triple identifies the exact call; the image itself is not needed to look it up.
Endpoints and references
Capabilities
Virtual try-on API for apparel
REST API that places apparel on AI mannequins. Asynchronous, 1.5–4 minute generation, 5 credits at 2K, 6 at 4K. cURL, Node.js and Python examples.
ReadCapabilities
Jewelry try-on API for necklaces, rings, bracelets and earrings
Place necklaces, rings, bracelets and earrings on AI models via REST. 5 credits at 2K, close-up mannequins built-in, reflection-aware rendering from the Photta docs.
ReadCapabilities
Ghost mannequin API for hollow-man product photos
AI ghost mannequin endpoint. Remove the mannequin from a garment photo and preserve interior detail. 3D or flat-lay, batch processing, 4 credits at 2K.
ReadReference
First Photta image in under five minutes.
Sign up, generate an API key, run your first cURL call, poll until it completes, persist the result. Five steps, documented end-to-end.
ReadReference
Photta API authentication
How to authenticate against the Photta API: the Authorization header, the key prefix, where keys are created, and how to rotate one safely.
ReadReference
Photta API pricing
What each Photta API endpoint costs in credits at 2K and 4K, how charging and refunds work, and which endpoints are free. No per-image money price.
ReadReference
Photta API rate limits
The Photta API rate limit, its window, the Retry-After header, the polling interval and the per-plan concurrency caps, all read from the API documentation.
ReadReference
Photta API resource endpoints
List mannequins, poses, backgrounds, footwear and brand labels, upload your own, and read your credit balance. The lookups behind every generation.
Read
Every figure on this page comes from the Photta API docs · checked
Try the API in five minutes
Generate a Photta API key, paste the cURL snippet above, and you'll have your first on-model image before the coffee finishes brewing.
- 7 error types
- Retry-After: 30s
- 600 requests/min