Docs / Reference
Errors
Every error has the same body. Read error.code to decide what to do.
Error body
402 Payment Required
{
"detail": "Your balance is $0.40 and this request costs $1.75. Add funds at https://api.minicut.ai/console/billing.",
"error": {
"type": "billing_error",
"code": "insufficient_balance",
"message": "Your balance is $0.40 and this request costs $1.75. Add funds at https://api.minicut.ai/console/billing.",
"param": null,
"request_id": "req_01JA9Y7Q2K4M5N6P7R8S9T0V1W"
}
}A 422 validation_error lists every bad field in detail, and error.param names the first one:
422 Unprocessable Content
{ "detail": [{ "loc": ["body", "duration"], "msg": "must be one of 5, 10", "type": "enum" }] }Every response carries an X-Request-Id. Send it to us with any question about a call.
Codes
| HTTP | error.code | When | What to do |
|---|---|---|---|
| 400 | invalid_json | The body is not JSON | Fix the body |
| 400 | request_in_progress | You asked for a result before the job ended | Poll the status, or use a webhook |
| 400 | already_completed | You cancelled a job that already ended | Nothing to do |
| 400 | invalid_webhook_url | webhook_url is not https, or points at a private address | Use a public https address |
| 401 | missing_api_key | No Authorization header | Send Authorization: Key <key> |
| 401 | invalid_api_key | The key is wrong, unknown or revoked | Make a new key in the console |
| 402 | insufficient_balance | Your balance is under the price | Add funds |
| 403 | account_frozen | The account is frozen | Email team@arkzero.ai |
| 404 | model_not_found | No model has that id | See GET /v1/models |
| 404 | request_not_found | No request of yours has that id | Check the id and the model id |
| 405 | method_not_allowed | Wrong HTTP method for this path | See the Allow header |
| 409 | idempotency_conflict | Same Idempotency-Key, different body | Use a new key for a new body |
| 410 | quote_expired | The X-Quote-Id is older than 15 minutes or for another body | Get a new quote |
| 413 | payload_too_large | Body over 1 MB, or an input file over 50 MB | Send smaller files, by URL |
| 422 | validation_error | A field fails the model's settings | Fix the fields in detail |
| 422 | input_fetch_failed | An input URL could not be fetched or is the wrong type | Check the URL is public and the file type |
| 422 | content_refused | The content check refused the prompt or an input | Change the prompt or the input |
| 429 | rate_limited | Too many requests this minute | Wait for Retry-After |
| 429 | key_spend_limit_reached | This key hit the spend limit you set | Wait for reset_at, or raise the limit |
| 429 | monthly_cap_reached | Your step's monthly cap is spent | Wait for reset_at, or add funds to move up a step |
| 500 | internal_error | Something went wrong on our side | Try again; send us the request id |
| 503 | model_unavailable | The model cannot take jobs right now | Try again after Retry-After (60 s). Nothing was charged |
When a job fails
A job that was accepted and then failed answers its status with state and error.code, its result with 422, and its webhook with data.error.code. You are not charged for any of these.
error.code | Meaning |
|---|---|
content_refused | The result was refused by the content check |
supplier_failed | The model failed the job |
supplier_unreachable | The model could not be reached for too long |
output_unavailable | The result could not be saved |
safety_check_unavailable | The content check on the result could not run |
internal_error | The job stopped on our side before it finished |
expired | It did not finish within 24 hours |
cancelled | You cancelled it |