• Chat
  • Pricing
  • Blog
  • Downloads
  • API
    • Platform overview
    • Models
    • Rankings
    • API docs
    • Platform console
  • Company
    • About
    • Contact
    • Changelog
    • Roadmap
    • Contributors
  • Chat
  • Pricing
  • Blog
  • Downloads
  • API
    • Platform overview
    • Models
    • Rankings
    • API docs
    • Platform console
  • Company
    • About
    • Contact
    • Changelog
    • Roadmap
    • Contributors
Ditfa Platform
  • Overview
  • Models
  • Compare
  • Rankings
  • Docs
Open console
  • Overview
  • Authentication & SDKs
  • Chat completions
  • Models, key, credits
  • Billing & routing
  • Free & sponsored models
  • Errors & limits
  • Going to production
  • Plan API vs Platform
Create an API keyModel catalogGet support

Guides

Billing & routing

What a request costs, and which provider serves it.
On this page
  • Billing & credits
  • How a request is charged
  • Routing & fallback

Billing & credits#

You pay per token in USD from a prepaid wallet. Prompt tokens are billed at the input rate, cached prompt tokens at the cache-read rate when the model has one, and output tokens (including reasoning tokens) at the output rate, plus any fixed per-request fee. Some models also set a minimum charge per request.

How a request is charged

  1. Reserve. Before calling the model, the gateway holds an upper bound: the estimated prompt plus the maximum output (max_tokens, else 16,384, capped by the model). If available credits or the key's limit cannot cover it, you get 402.
  2. Settle. When the response ends, the real usage is charged and the rest of the hold is released.
  3. Release. A failed request releases the whole hold. You are never charged for 4xx errors or for 502s.

Low balance, long answers?

Set max_tokens to what you really need. The hold shrinks with it, so requests keep working on a small balance instead of failing with insufficient_credits.

Top-ups are $5 to $1,000 each and credits never expire. A low-balance email alert can be set in the settings.

Some models cost nothing to you. See Free & sponsored models.

Routing & fallback#

A model can be served by several providers. The gateway tries up to three of them in priority order and moves providers that are currently failing for several users to the back of the line.

  • If a provider times out, returns 408, 429 or 5xx, or cannot be reached, the next one is tried automatically. Nothing has been sent to you yet, so fallback is invisible.
  • A 400 from a provider means the request itself was rejected; it is not retried elsewhere.
  • You are billed at the rate of the provider that answered. The catalog shows the lowest available price; /generation shows exactly what you paid.
  • The provider policy on a key or the account (verified providers only, no prompt logging) removes providers from routing. If none are left you get 403 no_allowed_provider.
PreviousModels, key, creditsNextFree & sponsored models

On this page

  • Billing & credits
  • How a request is charged
  • Routing & fallback
Terms of ServicePrivacy PolicyRefund PolicyAcceptable UseContact

© 2026 Ditfa. All rights reserved.

TeamtemGitHubHuggingface
  • Chat
  • Pricing
  • Blog
  • Downloads
  • API
    • Platform overview
    • Models
    • Rankings
    • API docs
    • Platform console
  • Company
    • About
    • Contact
    • Changelog
    • Roadmap
    • Contributors
  • Chat
  • Pricing
  • Blog
  • Downloads
  • API
    • Platform overview
    • Models
    • Rankings
    • API docs
    • Platform console
  • Company
    • About
    • Contact
    • Changelog
    • Roadmap
    • Contributors
Ditfa Platform
  • Overview
  • Models
  • Compare
  • Rankings
  • Docs
Open console

Your analytics choice

Allow Google Analytics to measure visits and public-page clicks so we can improve Ditfa? Optional analytics stays off until you choose. Privacy policy