Errors
Errors look like {"error": {"type", "code", "message", "param"?, "docs_url", "request_id"}}. No error is ever charged.
| HTTP | Code | What to do |
|---|---|---|
| 400 | missing_param |
A required field (model, input, or a model option like labels) is missing. param names it. |
| 400 | invalid_param |
An option has the wrong type or is out of range. The message says the allowed values. |
| 400 | unknown_param |
The model has no option by that name (often a typo). The message lists the valid options. |
| 400 | invalid_input |
input isn't the right kind (e.g. an array for a model that takes one input). |
| 400 | empty_input |
An input text is empty or only whitespace. |
| 400 | invalid_json |
The body isn't valid JSON. |
| 400 | invalid_schema |
Mold's schema isn't a usable JSON Schema object. |
| 400 | unsupported_image / unsupported_audio |
We couldn't decode the file. |
| 400 | input_unreachable |
We couldn't download the URL (DNS, timeout, HTTP error, or a private address). |
| 401 | missing_api_key |
Send Authorization: Bearer gwl_.... |
| 401 | invalid_api_key |
The key was revoked, expired or mistyped. Create a new one. |
| 402 | insufficient_balance |
Add credit at add_credit_url or turn on auto top-up, then retry. |
| 402 | monthly_cap_reached |
The account's monthly cap is reached. Raise it in billing settings. |
| 402 | key_limit_reached |
This key's monthly limit is reached. Raise it or use another key. |
| 403 | model_not_allowed |
This key is restricted to other models. |
| 404 | model_not_found |
Check the id against GET /v1/models. |
| 409 | idempotency_key_reused |
The same Idempotency-Key was sent with a different body. |
| 413 | input_too_large |
The text or file is over the model's limit (on its page). Split it. |
| 429 | rate_limited |
Wait for Retry-After seconds, or batch inputs into fewer requests. |
| 500 | internal_error |
Our bug. Retry once; write to hello@greatwork.company with the request_id if it repeats. |
| 502 | model_error |
The model failed on this specific input. Retrying the same input usually fails the same way. |
| 503 | busy / engine_unavailable |
Every worker is busy or restarting. Retry with backoff (1 s, 2 s, 4 s). |