Guides
Free & sponsored models
Some models cost you nothing. Free use has limits, and you are never moved to a paid route without saying so.
Who pays
The gateway decides how each request is paid, using the same rule as the catalog.
| Mode | When | You pay |
|---|---|---|
| Paid | Everything else. | The sell price, from your wallet. |
| Free | The model has an endpoint where the provider's cost and every Ditfa charge are zero: input, output, cache, per-request fee and minimum. | $0 |
| Sponsored | An active sponsored offer covers the model, on endpoints run by Ditfa. | $0. Ditfa pays the provider. |
- A model with zero token prices but a per-request fee or a minimum charge is paid, and is never labelled Free.
- Marketplace (seller) endpoints are never covered by a sponsorship.
- Free use is always limited, because the provider's free quota is shared by every Ditfa customer. Limits can apply per user, per key, across all users and to requests in flight. Model pages show an offer's dates, eligibility and per-user limits.
- An offer can cap the output of each request. A smaller
max_tokensyou send stays in force. - A free or sponsored request places no hold on your wallet and does not count against a key's spend limit. Allowed models, IP allowlists, expiry and provider policy still apply.
- Every successful response carries
x-ditfa-charge-modewithpaid,freeorsponsored.
When a free request is refused
While a free or sponsored route exists for a model, a refused request gets an error and is not charged.
{
"error": {
"message": "Free access limit for this model is used up. It resets at 2026-11-01T00:00:00.000Z. To use it at the normal price from your wallet, retry with the header \"X-Ditfa-Allow-Paid: true\".",
"type": "rate_limit_error",
"code": "free_quota_exceeded",
"param": null
}
}| Status | Code | Meaning | Retry? |
|---|---|---|---|
| 402 | sponsorship_exhaustedpayment_required | The sponsored offer on this model has run out of budget. | No |
| 402 | sponsorship_endedpayment_required | The free or sponsored offer on this model has ended. | No |
| 402 | sponsorship_pausedpayment_required | The free or sponsored offer on this model is paused. | No |
| 403 | free_not_eligiblepayment_required | This account does not qualify for the offer yet: it needs a verified email, or it is too new. | No |
| 403 | free_access_disabledpayment_required | Free access to this model is turned off. | No |
| 403 | sponsorship_not_startedpayment_required | The free or sponsored offer on this model has not started yet. | No |
| 403 | wallet_frozenpayment_required | This account's Platform wallet is frozen. Contact support. | No |
| 429 | free_quota_exceededrate_limit_error | Your limit on this free or sponsored model is used up. | After reset |
| 429 | free_capacity_exhaustedrate_limit_error | The allowance shared by everyone on this free or sponsored model is used up. | After reset |
| 429 | free_concurrency_limitrate_limit_error | Too many requests at once on this offer. Wait for one to finish. | Yes |
When a limit has a reset time, the message says when and the x-ditfa-free-reset header carries it as an ISO 8601 time. A failed upstream call does not use up your limit.
Paused and ended offers
A paused offer keeps refusing requests, so nothing is charged by surprise. Once Ditfa closes an offer, the model goes back to normal paid routing.
Paying the normal price
To pay the normal price when a free or sponsored request is refused, say so on that request.
curl https://gateway.ditfa.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DITFA_API_KEY" \
-H "X-Ditfa-Allow-Paid: true" \
-d '{"model": "openai/gpt-4o-mini", "messages": [{"role": "user", "content": "Hello"}]}'- The opt-in only counts after a refusal. If the offer can serve the request, it stays at $0.
- The
ditfafield is removed before the request reaches the provider. - A paid continuation is an ordinary paid request: the wallet hold,
insufficient_creditsandkey_limit_reachedapply. - It needs a paid endpoint to continue on. A model with only free endpoints keeps refusing, and so do
wallet_frozenandaccount_disabled. - The playground asks you each time.