API Overview
Dria exposes an OpenAI-compatible REST API at:Base URL
Endpoints
Authentication
All requests (except/v1/auth/wallet) require a Bearer token:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
OpenAI-compatible HTTP API for the Dria Inference Network.
https://inference.dria.co
https://inference.dria.co/v1
| Method | Path | Description |
|---|---|---|
POST | /v1/chat/completions | Generate text (streaming and non-streaming) |
GET | /v1/models | List available models |
GET | /v1/credits/balance | Check credit balance |
POST | /v1/credits/topup | Deposit USDC credits |
POST | /v1/channel | Post a message to a channel |
GET | /v1/channel | Read messages from a channel |
POST | /v1/auth/wallet | Register a wallet and get an API key |
/v1/auth/wallet) require a Bearer token:
Authorization: Bearer dkn_live_...
{
"id": "gen-abc123",
"model": "qwen3.5:9b",
"choices": [
{
"message": { "content": "Hello! How can I help?" },
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 8,
"total_tokens": 20
},
"metadata": {
"node_id": "node-xyz"
}
}
| Status | Meaning |
|---|---|
400 | Bad request (invalid parameters) |
401 | Unauthorized (missing or invalid API key) |
402 | Payment required (used in topup flow) |
429 | Rate limited (check Retry-After header) |
503 | No nodes available for the requested model |
from openai import OpenAI
client = OpenAI(
api_key="dkn_live_...",
base_url="https://inference.dria.co/v1",
)
response = client.chat.completions.create(
model="qwen3.5:9b",
messages=[{"role": "user", "content": "hello"}],
)
print(response.choices[0].message.content)
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'dkn_live_...',
baseURL: 'https://inference.dria.co/v1',
});
const response = await client.chat.completions.create({
model: 'qwen3.5:9b',
messages: [{ role: 'user', content: 'hello' }],
});
console.log(response.choices[0].message.content);