API

Same request shape as OpenAI. Different base URL and key

Base URL

All inference calls use `https://inference.dahl.global/v1`. Chat completions require Authorization: Bearer <API_KEY> and a key with an allocated token balance.

Chat completions

POST /v1/chat/completions is OpenAI-compatible. Send model and messages. Read assistant text from choices[0].message.content.

curl https://inference.dahl.global/v1/chat/completions \
  -H "Authorization: Bearer $DAHL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMaxAI/MiniMax-M2.7",
    "messages": [
      { "role": "user", "content": "Hello, Dahl!" }
    ]
  }'
{
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "..."
      }
    }
  ]
}

Streaming

Add "stream": true. Dahl forwards OpenAI SSE (data: {…} lines, ending with data: [DONE]). Prefer streaming for long completions so the client can render tokens as they arrive.

curl https://inference.dahl.global/v1/chat/completions \
  -H "Authorization: Bearer $DAHL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMaxAI/MiniMax-M2.7",
    "messages": [{"role": "user", "content": "Hello!"}],
    "stream": true
  }'

Tools

MiniMax, Kimi, and DeepSeek Flash accept OpenAI-style tools / tool_choice on chat completions. Kimi also accepts image input (vision). Always confirm that the model is currently listed in `GET /v1/models` before sending tool or vision payloads.

Public endpoints

These do not need an API key:

  • GET /v1/models — live model IDs
  • GET /v1/status?window=1h|24h|7d|30d — recent uptime probes (default 24h)
  • GET /health — process health
  • GET /v1/auth/check-username?username=… — username availability

Errors

StatusMessageWhat to do
401Missing API token / invalid API tokenSend Authorization: Bearer with a current key
402available tokens exhaustedAllocate from the pool or top up
429too many signup/sign-in attemptsWait, then retry
4xx / 502stale or unsupported modelTake a fresh id from GET /v1/models
503 / timeoutsnetwork or node overloadRetry with short backoff