Dualyne documentation

Dualyne gives you every major AI model through one OpenAI-compatible endpoint. If your code already calls OpenAI, you only change two values.

Base URL: https://api.dualyne.com/v1

Quickstart

1. Connect a wallet and create a key in the dashboard. 2. Set it as an environment variable. 3. Point your SDK at Dualyne.

export DUALYNE_KEY="dly_live_..."

import os
from openai import OpenAI
client = OpenAI(base_url="https://api.dualyne.com/v1", api_key=os.environ["DUALYNE_KEY"])
reply = client.chat.completions.create(
    model="claude-swift",
    messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)

Authentication

Send your key as a bearer token on every request. Keys belong to the wallet that created them and stop working the moment you revoke them.

Authorization: Bearer dly_live_...

Never put a key in front-end code or a public repository. If a key leaks, revoke it in the dashboard and create a new one. Dualyne stores only a hash of each key, so a lost key can't be shown again.

Chat completions

POST/v1/chat/completions

FieldTypeDescription
modelstringModel id from the models list, for example gemini
messagesarrayConversation turns with role and content
streambooleanSend tokens as they are generated
max_tokensintegerUpper limit on the answer length (capped per tier, see below)
toolsarrayFunction definitions the model may call

Other OpenAI fields such as temperature, response_format and stream_options pass through unchanged. Tool calling and JSON mode work on models whose provider supports them. The response's model field names the exact model version that answered. n must be 1.

Models

GET/v1/models returns every model your key can use. Explorer wallets see fast models; Holder and Builder see the full catalog.

Model idProviderRuns onTier
claude-swiftAnthropicClaude Haiku 4.5Explorer
claude-balancedAnthropicClaude Sonnet 4.5Holder
claude-deepAnthropicClaude Opus 4.5Holder
gptOpenAIGPT-5Holder
geminiGoogleGemini 2.5 ProHolder
llamaMetaLlama 3.3 70B InstructExplorer
deepseekDeepSeekDeepSeek V3.1Explorer
mistralMistralMistral Small 3.2 24BExplorer

Each id is a stable name for a model family. When a newer version replaces the one listed under "Runs on", this table and the catalog update, and your code keeps working without changes.

Streaming

Set "stream": true to receive server-sent events. Each event carries a small piece of the answer; the last one is data: [DONE]. Lines starting with : are keep-alive comments and can be ignored (the OpenAI SDKs do this for you).

for chunk in client.chat.completions.create(model="gpt", messages=msgs, stream=True):
    print(chunk.choices[0].delta.content or "", end="")
curl -N https://api.dualyne.com/v1/chat/completions \
  -H "Authorization: Bearer $DUALYNE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-swift", "stream": true,
       "messages": [{"role": "user", "content": "Hello"}]}'

To get token counts at the end of a stream, send "stream_options": {"include_usage": true}. The final chunk then carries usage and an empty choices list, so check the list before reading from it.

Limits and billing

TierRequests per dayMax answer lengthKeysCost
Explorer201,000 tokens1Free
Holder2504,000 tokens5Free, funded by the treasury
BuilderNo capModel limitUnlimitedModel cost + 15%, prepaid in USDG or ETH

Allowances reset at 00:00 UTC. Explorer and Holder responses include x-dualyne-remaining so your app can see how many requests are left today. A larger max_tokens than your tier allows is lowered to the cap. Each key can send up to 120 requests a minute.

Builder wallets top up with USDG or ETH from the dashboard. Each request reserves its worst-case cost (model price + 15%) and is then charged the real amount; the difference goes straight back to your balance. The dashboard lists every top-up and what each key spent.

Free tiers share a daily budget paid for by the treasury. On the rare day it runs out, free requests return 429 until 00:00 UTC; Builder requests keep working.

Errors

StatusMeaningWhat to do
400The request body is invalidRead the message; it names the field
401Key missing, wrong or revokedCheck the key or create a new one
402Builder credit too low for this requestTop up in the dashboard, or lower max_tokens
403Model not in your tierHold the token or top up credits
404Unknown model idUse an id from GET /v1/models
429Daily allowance used up, too many requests per minute, or free capacity briefly full (budget_busy)Wait for the time in the Retry-After header, or top up credits
502The model provider failedRetry once, or switch models

Errors use the OpenAI format, so SDKs raise them as normal exceptions:

{
  "error": {
    "message": "Daily allowance used up (20 requests for Explorer). It resets at 00:00 UTC.",
    "type": "rate_limit_error",
    "code": "quota_exceeded"
  }
}

Connect a wallet

Your wallet is your account. You'll sign one message to prove it's yours. No transaction, no gas.

No wallet found in this browser. Pick one below, then come back to this page.

Get a wallet