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

HTTPerror.codeWhenWhat to do
400invalid_jsonThe body is not JSONFix the body
400request_in_progressYou asked for a result before the job endedPoll the status, or use a webhook
400already_completedYou cancelled a job that already endedNothing to do
400invalid_webhook_urlwebhook_url is not https, or points at a private addressUse a public https address
401missing_api_keyNo Authorization headerSend Authorization: Key <key>
401invalid_api_keyThe key is wrong, unknown or revokedMake a new key in the console
402insufficient_balanceYour balance is under the priceAdd funds
403account_frozenThe account is frozenEmail team@arkzero.ai
404model_not_foundNo model has that idSee GET /v1/models
404request_not_foundNo request of yours has that idCheck the id and the model id
405method_not_allowedWrong HTTP method for this pathSee the Allow header
409idempotency_conflictSame Idempotency-Key, different bodyUse a new key for a new body
410quote_expiredThe X-Quote-Id is older than 15 minutes or for another bodyGet a new quote
413payload_too_largeBody over 1 MB, or an input file over 50 MBSend smaller files, by URL
422validation_errorA field fails the model's settingsFix the fields in detail
422input_fetch_failedAn input URL could not be fetched or is the wrong typeCheck the URL is public and the file type
422content_refusedThe content check refused the prompt or an inputChange the prompt or the input
429rate_limitedToo many requests this minuteWait for Retry-After
429key_spend_limit_reachedThis key hit the spend limit you setWait for reset_at, or raise the limit
429monthly_cap_reachedYour step's monthly cap is spentWait for reset_at, or add funds to move up a step
500internal_errorSomething went wrong on our sideTry again; send us the request id
503model_unavailableThe model cannot take jobs right nowTry 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.codeMeaning
content_refusedThe result was refused by the content check
supplier_failedThe model failed the job
supplier_unreachableThe model could not be reached for too long
output_unavailableThe result could not be saved
safety_check_unavailableThe content check on the result could not run
internal_errorThe job stopped on our side before it finished
expiredIt did not finish within 24 hours
cancelledYou cancelled it