OpenAI-compatible

API Reference

Denarii Compute speaks the OpenAI API. If you can use openai or a compatible client, you can use us — change the base_url.

Quickstart

Get an API key on the dashboard. Then install the OpenAI SDK and point it at our endpoint:

pip install openai

from openai import OpenAI

client = OpenAI(
    base_url="https://compute.denariilabs.xyz/v1",
    api_key="sk-dc-..."
)

res = client.chat.completions.create(
    model="qwen2.5-7b",
    messages=[{"role": "user", "content": "Explain RSA in one sentence."}]
)
print(res.choices[0].message.content)

Authentication

Every request needs a bearer token in the Authorization header. Create and rotate keys on the API Keys page. Each key is shown once — save it somewhere safe.

Security: don't embed keys in client-side code. Put them behind a server you control (or use the playground for quick tests).

Models

Ten models across three tiers. Fast tier runs on our GPUs; frontier and special route through Morpheus.

Model IDTierParamsBest for
llama-3bfast3BFastest responses. Great for prototyping and simple tasks.
qwen2.5-7bfast7BBest mix of speed and quality. Most popular choice.
mistral-7bfast7BEuropean-language focused. Solid all-rounder.
hermes-8bfast8BStrong instruction following, long context.
llama-70bfrontier70BHigh-quality reasoning. Slower, frontier via Morpheus.
kimi-k2.5frontierReasoning-optimized. Strong at long-form analysis.
qwen3-235bfrontier235BFrontier-tier reasoning. Routed via Morpheus.
hermes-405bfrontier405BLargest model available. Complex tasks only.
venice-uncensoredspecialUncensored open model. Routed via Morpheus.
gpt-oss-120bspecial120BOpen-source frontier alternative.

Chat completions

Send a list of messages, get a completion. Supports temperature, max_tokens, and stream. Tool use is supported on frontier models.

POST /v1/chat/completions
Authorization: Bearer sk-dc-...

{
  "model": "qwen2.5-7b",
  "messages": [
    { "role": "system", "content": "You are concise." },
    { "role": "user", "content": "One-sentence pitch for a DeFi bot" }
  ],
  "temperature": 0.7,
  "max_tokens": 256
}

Streaming

Pass stream: trueto receive Server-Sent Events. Compatible with the OpenAI SDK's streaming iterators.

stream = client.chat.completions.create(
    model="qwen2.5-7b",
    messages=[{"role": "user", "content": "Count to five."}],
    stream=True,
)

for chunk in stream:
    delta = chunk.choices[0].delta.content
    if delta:
        print(delta, end="", flush=True)

Errors

All errors use the OpenAI error envelope. HTTP status codes follow standard semantics:

  • 400 — invalid request (missing fields, bad model ID)
  • 401 — missing or invalid API key
  • 402 — insufficient balance (pay-as-you-go) or tier exceeded
  • 429 — rate limit hit (backoff and retry)
  • 500 — inference error; request id in x-request-id

Rate limits

Rate limits are per-tier and measured in requests per minute. Concurrent requests are limited by GPU capacity — excess requests queue briefly. See your current limit on Overview.

SDKs

Anything OpenAI-compatible works — no Denarii-specific SDK required. Tested integrations:

  • openai (Python, Node) — set base_url
  • LangChain — use ChatOpenAI with the same base URL
  • LlamaIndex — use OpenAILike
  • Claude Code, Cursor, Continue — point their OpenAI provider at us

USDC payment

Top up your balance with USDC on Base instead of a credit card. From the Billing page, connect a wallet, choose an amount, sign a permit — your balance updates on confirmation.

No KYC. No card rails. Works from anywhere a wallet works.