API Overview
Dria exposes an OpenAI-compatible REST API at:Base URL
Endpoints
| 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 |
Authentication
All requests (except/v1/auth/wallet) require a Bearer token:
Response format
Responses follow the OpenAI format. For example, a chat completion returns:Errors
Errors return standard HTTP status codes with a text body:| 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 |