Naar inhoud gaan
DeepTokenAI-creatieve suite
StartpaginaDashboardModellenRanglijstDocumentatiePrijzenZakelijkBlog
    Fouten

    Introduction

    • Aan de slag
    • Snelstart
    • Integraties

    API

    • Authenticatie
    • Chat-completions
    • Modellen
    • Fouten

    Billing

    • Facturering
    • Organisaties

    Introduction

    • Aan de slag
    • Snelstart
    • Integraties

    API

    • Authenticatie
    • Chat-completions
    • Modellen
    • Fouten

    Billing

    • Facturering
    • Organisaties

    Errors

    The gateway returns OpenAI-compatible error envelopes with a DeepToken-specific category header so clients can branch retry behaviour without parsing strings.

    The envelope

    {
      "error": {
        "message": "human-readable description",
        "type": "category_name",
        "code": "specific_code"
      }
    }
    

    Every response also carries an X-Gateway-Error-Category header. The category is one of:

    CategoryMeaningRetry?
    platform_errorDeepToken-side faultYes, with backoff
    upstream_errorUpstream provider 5xx / timeoutAlready retried; do not retry
    quota_errorYour wallet / per-key budget is emptyNo — top up
    user_errorBad request / unknown model / disallowed modelNo — fix request

    Common codes

    • 401 invalid_api_key — key revoked or never existed
    • 403 model_not_allowed — your key's allowlist forbids the model
    • 403 ip_not_allowed — request IP is not in the key's allowlist
    • 402 org_wallet_empty — strict-mode org wallet has zero balance
    • 403 budget_limit_exceeded — rolling per-key USD ceiling breached
    • 503 no_available_channel — no operational channel serves this model

    When you should retry

    Only retry 5xx platform_error errors and the 403 budget_limit_exceeded after the indicated window passes. Everything else is deterministic from the request — retrying without fixing the cause just wastes credits.

    Previous

    Modellen

    Next

    Facturering

    Op deze pagina

    • The envelope
    • Common codes
    • When you should retry