Get started
Dagon Inference documentation
Dagon Inference is a metered gateway in front of upstream model providers. You call it with any OpenAI or Anthropic SDK, each request goes to the cheapest healthy provider serving its model id, and you pay that provider's token price plus 10% from a prepaid balance or per request in USDC. Every request gets an Ed25519 signed receipt.
Base URLs
| Client | Base URL | Endpoints |
|---|---|---|
| OpenAI SDKs | https://inference.dagon.so/v1 | /v1/chat/completions, /v1/responses |
| Anthropic SDKs | https://inference.dagon.so | /v1/messages, /v1/messages/count_tokens |
Authenticate with Authorization: Bearer <key> (Anthropic SDKs may send x-api-key instead). Keys start with gk_ (prepaid). Without a key, the inference endpoints answer 402 with x402 payment requirements.
How a request is handled
- Authenticate the key, or price a keyless request for x402.
- Hold the request's maximum cost against the balance: an upper bound of the prompt plus the full output cap, at the rates of the dearest route that may serve it, plus the markup. Short of funds:
402 insufficient_credits, and nothing is sent upstream. - Route to the cheapest healthy provider serving the model id and endpoint, falling back to the next before any output.
- Capture the provider's reported usage, release the rest of the hold, and sign a receipt naming the provider and price version.
Details: Models and pricing, Receipts.
Where to go next
Machine-readable files
GET /v1/models: the live, canonical model and price list. No key needed.- /models.json and /models.md: a build snapshot of the same list.
- /changelog.xml (Atom) and /changelog.json: every change to that list, dated: new, removed and renamed models, refusal labels, providers and prices (read it here).
- /openapi.json: OpenAPI 3.1 description of the public API.
- /llms.txt and /llms-full.txt: the API summarised for language models.
Not affiliated
Dagon Inference is not affiliated with OpenAI, Anthropic or the upstream providers. Compatibility refers only to request formats. It is operated by Inkwell Finance, Inc. d/b/a Dagon.
Last updated