Skip to main content

Error

Every error from /v1/ has this shape. Branch on error.details.error_code, never on the message.

typerequired
Constant value: error
error objectrequired
typestringrequired

Possible values: [invalid_request_error, authentication_error, permission_error, not_found_error, conflict_error, billing_error, rate_limit_error, overloaded_error, api_error]

messagestringrequired

For people. May change.

details objectrequired
error_codestringrequired

Possible values: [invalid_series, body_too_large, missing_content_sha256, missing_api_key, invalid_api_key, key_disabled, key_expired, missing_scope, test_key_demo_only, terms_not_accepted, not_found, out_of_order, idempotency_conflict, too_many_keys, credit_balance_too_low, rate_limited, upload_quota_reached, storage_unreachable, enforced_spend_limit_reached, customer_spend_limit_reached, service_capacity, internal, invalid_content_sha256, edge_mismatch, edge_invalid]

problems object[]
  • Array [
  • indexinteger
    problemstring
  • ]
  • request_idstringrequired
    Error
    {
    "error": {
    "type": "invalid_request_error",
    "message": "string",
    "details": {
    "error_code": "invalid_series",
    "problems": [
    {
    "index": 0,
    "problem": "string"
    }
    ]
    }
    },
    "request_id": "string"
    }