Dagon InferenceDocs Console

Get started

Quickstart

Three steps: create a key, add credit, call a model. No email and no password. You can also do all of this in the console.

On this page

1. Create a key

curl -X POST https://inference.dagon.so/v1/keys

The answer is 201 with key (the secret) and data (the key's id, name and balances in micro-USD). name is optional, at most 80 characters.

Save the key now

The secret is shown once. The gateway stores only a hash, so a lost key cannot be shown again or recovered, and its balance is lost with it. Keys minted under a passkey account can be deleted and replaced.

2. Add credit

Open a hosted USDC checkout for $5 to $1,000, in whole cents:

curl https://inference.dagon.so/v1/credits/checkout \
  -H "Authorization: Bearer $DAGON_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount_usd": 20}'

The answer is {"session_id", "url"}. Pay on the page at https://pay.dagon.so; the credit posts once the payment is final. An agent with a Solana wallet can instead buy credits without a browser, or skip the key and pay per request with x402.

3. Call a model

curl https://inference.dagon.so/v1/chat/completions \
  -H "Authorization: Bearer $DAGON_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "abliterated-model-large-flash",
    "messages": [{"role": "user", "content": "Explain this stack trace."}],
    "max_tokens": 1024
  }'

Any listed model id works; see Models and pricing. The response is the provider's OpenAI-format answer, with x-gateway-request-id and x-gateway-receipt-id headers added.

4. Check the balance

curl https://inference.dagon.so/v1/credits -H "Authorization: Bearer $DAGON_KEY"

available is credit minus usage minus what in-flight requests hold. GET /v1/credits/history lists the last 50 credits (id, amount_micros, source, created_at).

Last updated