Reference
Errors
Errors use the OpenAI shape, so your client’s error handling works as it is. A request that fails on Rend’s side is never charged.
JSON
{
"error": {
"message": "Not enough Rend credit for this request. Add credit in Settings → Billing.",
"type": "insufficient_quota",
"code": "insufficient_credit"
}
}message is written for people and can change. Match on the status, type and code. Every reply carries an x-request-id header; include it when you contact support.
Status codes
| Status | type |
code |
What to do |
|---|---|---|---|
| 400 | invalid_request_error |
(none) | Fix the request. The message names the field. |
| 400 | invalid_request_error |
context_length_exceeded |
The conversation is longer than the model reads at once. Compact it or trim it. |
| 400 | invalid_request_error |
content_policy_violation |
A picture or video was refused. Change the prompt. Not charged. |
| 400 | invalid_request_error |
image_refused |
The picture could not be made from this request. Not charged. |
| 401 | authentication_error |
(none) | Check the key. See Authentication. |
| 402 | insufficient_quota |
insufficient_credit |
Add credit. Not charged. |
| 403 | permission_error |
adult_confirm |
Any endpoint except GET /v1/models: the account has not accepted the 18+ terms. Accept them once at rend.ai/confirm-18. Not charged. |
| 403 | permission_error |
(none) | This key or account cannot make this call. |
| 404 | invalid_request_error |
model_not_found |
Use a model from Models & pricing. |
| 404 | invalid_request_error |
(none) | Unknown endpoint, or a video id that is not yours. |
| 405 | invalid_request_error |
(none) | Wrong method, such as GET on a POST endpoint. |
| 409 | (varies) | video_not_ready |
The video hasn’t completed. Wait for completed, then download. |
| 413 | invalid_request_error |
(none) | The body is over the limit (16 MiB, or 48 MB for videos), or your storage is full. |
| 502, 503 | api_error |
(none) | Rend or the model is briefly unavailable. Not charged. Retry with backoff. |
Retrying
- Retry 502 and 503 after a short wait, doubling it each time: 1, 2, 4, 8 seconds. The OpenAI SDKs do this for you.
- Don’t retry 400, 401, 403 or 404 unchanged. They will fail the same way.
- For videos, send an
Idempotency-Keyheader so a retried create never starts a second take.
What you pay when something goes wrong
- Rend’s side failed (5xx, an outage): nothing. A request that runs out of time pays for what already ran.
- Refused before it ran (4xx): nothing.
- You cancelled, or the stream lost its reader: what ran until then.
- Out of credit mid-request: what ran until the credit ran out.
- A picture or video was refused or failed: nothing.