Vynaris早期测试版获取 API key

文档

将你的 agent 指向一个端点。

Vynaris 是一个兼容 OpenAI 的聊天补全网关,地址为 https://api.vynaris.com/v1。在已有客户端中替换 base URL,保留 prompt 和工具定义,并读取每个响应的回执。

三步完成。

01

获取 key

登录 app.vynaris.com/signin and copy your key. It looks like vyn_sk_live_… and is shown once, at creation — save it somewhere safe.

02

设置 base URL

将客户端的 base_url 指向 https://api.vynaris.com/v1(OpenAI 格式的客户端),或 https://api.vynaris.com (Anthropic SDK). Nothing else in your stack changes.

03

发送请求

将 model 设为 auto and let the router pick, or send a frontier model name and it gets right-sized with a receipt.

下方每个示例都使用占位 key vyn_sk_live_XXXX. Real keys come from your dashboard’s API keys page.

curl

最原始的接入方式,适合在接入 SDK 前验证 key 是否可用。

curl
curl https://api.vynaris.com/v1/chat/completions \
  -H "Authorization: Bearer vyn_sk_live_XXXX" \
  -H "Content-Type: application/json" \
  -d '{"model": "auto", "messages": [{"role": "user", "content": "Say hi in five words."}]}'

OpenAI SDK(Python)

修改 base_url 和 api_key; every other call in your codebase is unchanged.

openai_client.py
from openai import OpenAI

client = OpenAI(base_url="https://api.vynaris.com/v1", api_key="vyn_sk_live_XXXX")
resp = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Say hi in five words."}],
)
print(resp.choices[0].message.content)

OpenAI SDK(TypeScript)

Same swap in the TypeScript client — set baseURL ,并在构建客户端时设置 apiKey。

openai-client.ts
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.vynaris.com/v1",
  apiKey: "vyn_sk_live_XXXX",
});

const resp = await client.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: "Say hi in five words." }],
});
console.log(resp.choices[0].message.content);

Anthropic SDK(Python)

Anthropic SDK 可配合 base_url=https://api.vynaris.com 使用,按下方方式构建客户端。 Note: Vynaris’s native /v1/messages wire format is not yet implemented — route Anthropic-shaped traffic through the OpenAI-compatible /v1/chat/completions endpoint documented above until that lands.

anthropic_client.py
import anthropic

client = anthropic.Anthropic(base_url="https://api.vynaris.com", auth_token="vyn_sk_live_XXXX")
msg = client.messages.create(
    model="auto", max_tokens=64,
    messages=[{"role": "user", "content": "Say hi in five words."}],
)
print(msg.content)

Claude Code

Claude Code 从环境变量读取端点。以下配置会让它在当前 shell 会话中使用 Vynaris;由于 /v1/messages is not yet implemented, treat this as environment setup for future compatibility rather than a guarantee that every Claude Code call is served today.

shell
export ANTHROPIC_BASE_URL=https://api.vynaris.com
export ANTHROPIC_AUTH_TOKEN=vyn_sk_live_XXXX
claude

Cursor

在 Cursor 的模型设置中,将 Vynaris 添加为自定义的兼容 OpenAI 供应商。

Cursor 设置
# Cursor → Settings → Models → API keys
#   OpenAI API key:       vyn_sk_live_XXXX
#   Override base URL:    https://api.vynaris.com/v1
# Then pick any model and send a chat message.

Hermes(hermes-agent)

NousResearch 的 hermes-agent 在以下位置使用具名自定义供应商: ~/.hermes/config.yaml — note that OPENAI_BASE_URL does not apply to custom providers, and keys belong in an env var via key_env, never in the file. Switch models at runtime with /model custom:vynaris:auto.

~/.hermes/config.yaml + shell
# Hermes (NousResearch hermes-agent) — add Vynaris as a custom provider.
# Note: OPENAI_BASE_URL does NOT apply to custom providers; use config.yaml.

# ~/.hermes/config.yaml
custom_providers:
  - name: vynaris
    base_url: https://api.vynaris.com/v1
    key_env: VYNARIS_KEY          # keys never live in config.yaml
    api_mode: chat_completions

model:
  default: custom:vynaris:auto     # or /model custom:vynaris:auto at runtime

# shell
export VYNARIS_KEY=vyn_sk_live_XXXX
hermes --tui

OpenClaw

在以下位置将 Vynaris 添加为自定义供应商: ~/.openclaw/openclaw.json with "api": "openai-completions", then select vynaris/auto as your model.

~/.openclaw/openclaw.json
// OpenClaw → add Vynaris as a custom provider
// (~/.openclaw/openclaw.json, then pick "vynaris/auto" as your model)
{
  "models": {
    "providers": {
      "vynaris": {
        "baseUrl": "https://api.vynaris.com/v1",
        "apiKey": "vyn_sk_live_XXXX",
        "api": "openai-completions",
        "models": [{ "id": "auto", "name": "Vynaris auto-route" }]
      }
    }
  }
}

Pi coding agent

Pi(badlogic/pi-mono)从以下位置读取自定义供应商: ~/.pi/agent/models.json, hot-reloaded when you open /model. Use a distinct key env var: Pi’s precedence rules let OPENAI_API_KEY 静默覆盖配置文件中的密钥。对于其他接入方式:在其供应商配置的位置填入 base URL 和密钥,然后使用 /v1/ping.

~/.pi/agent/models.json
// Pi coding agent (badlogic/pi-mono) — ~/.pi/agent/models.json
// Reloads automatically when you open /model — no restart needed.
{
  "providers": {
    "vynaris": {
      "baseUrl": "https://api.vynaris.com/v1",
      "api": "openai-completions",
      "apiKey": "$VYNARIS_KEY",
      "models": [
        { "id": "auto", "name": "Vynaris Auto",
          "input": ["text"], "contextWindow": 128000, "maxTokens": 16384 }
      ]
    }
  }
}

// shell — use a distinct env name: Pi lets OPENAI_API_KEY override
// models.json keys, so don't reuse it for Vynaris.
// export VYNARIS_KEY=vyn_sk_live_XXXX
// then pick the model via /model → vynaris → auto

每次请求选择一个低拒答模型。

使用标准的兼容 OpenAI 聊天补全端点,并将下列任一精确 ID 填入 model。这些请求会绕过自动模型选择。 为保证匿名性和数据安全而设的高价费率。

托管模型请求
curl https://api.vynaris.com/v1/chat/completions \
  -H "Authorization: Bearer vyn_sk_live_XXXX" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "vynaris/qwen3.6-35b-a3b-uncensored",
    "messages": [{"role":"user","content":"Review this authorized test plan..."}],
    "stream": true
  }'

私有容量启动并加载模型权重时,空闲后的首次请求可能耗时更长。并发请求会使用共享排队容量;不要为每个终端用户新建 worker。即使 API key 启用了对话记录捕获,也绝不会保留这四个模型 ID 的 prompt 和输出正文。会保留账单元数据,包括模型、账户、token 数、价格、延迟、状态和请求 ID。

仅限用于合法且经授权的工作。禁止儿童性剥削、人口贩运或剥削,以及非自愿性内容。仅测试你拥有或获授权评估的系统和数据。 Compare model cards and tradeoffs →

每个响应都带有自己的回执。

每个响应正文均包含一个 vynaris 块;同样的信息也会通过 x-vynaris-* 响应头返回,因此无需解析正文即可读取。

响应正文(摘录)
{
  "id": "chatcmpl-8f2a91",
  "choices": [ { "message": { "role": "assistant", "content": "..." } } ],
  "vynaris": {
    "request_id": "req_8f2a91",
    "requested_model": "gpt-4o",
    "served_model": "qwen3-8b-ft",
    "cost_usd": "0.000418",
    "direct_equivalent_usd": "0.01820000"
  }
}
响应头
x-vynaris-request-id: req_8f2a91
x-vynaris-served-model: qwen3-8b-ft
x-vynaris-cost-usd: 0.000418
x-vynaris-baseline-usd: 0.0182
x-vynaris-saved: 98%

direct_equivalent_usd 指的是 requested_model would have cost at list price for the same tokens — the number the savings percentage is computed from.

可能出现的问题,以及对应处理方法。

401 — 未授权

key 缺失、格式错误或已撤销。错误消息会指出具体问题(例如“key 已撤销”而非“未提供 key”),不会只给出笼统的认证失败信息。

402 — 额度不足

Your balance (or this key’s spend cap) hit zero, or a hosted uncensored model was called by an account that is not on the $50 L or $150 XL plan. Nothing was sent upstream and nothing was charged. Hosted-model access responses use code hosted_model_plan_required. This is terminal for the request — do not retry it. Top up or raise the key’s cap, then send a new request.

502 — 上游错误

所服务模型的供应商发生故障或超时。失败的上游调用不会收费,可以安全重试。

Fund your balance in XMR, privately.

Vynaris is the only AI API you can pay for in Monero that refunds bad answers. Pay with Monero for complete payment privacy: no card, no name, no billing address, and no payment processor between you and our wallet.

查询余额和请求历史。

Both endpoints take the same Authorization: Bearer 密钥。

验证 key
curl https://api.vynaris.com/v1/ping -H "Authorization: Bearer vyn_sk_live_XXXX"
查看余额和用量
curl https://api.vynaris.com/v1/usage -H "Authorization: Bearer vyn_sk_live_XXXX"
获取账本
curl https://api.vynaris.com/v1/ledger -H "Authorization: Bearer vyn_sk_live_XXXX"