Rill.

Model API endpoints大模型 API 转发

Choose your provider and keep its SDK, model ID and API key.选择服务商,继续使用它的 SDK、模型名称和 API Key。 All provider URLs查看全部服务商地址

OpenAI Base URL
https://llmapi.ohmytoken.com/openai/v1
OpenAIhttps://llmapi.ohmytoken.com/v1
Anthropic Claudehttps://llmapi.ohmytoken.com/anthropic
Google Geminihttps://llmapi.ohmytoken.com/gemini
DeepSeekhttps://llmapi.ohmytoken.com/deepseek
Qwen · 北京https://llmapi.ohmytoken.com/qwen/compatible-mode/v1

OpenAI setupOpenAI 接入

  1. Open your client settings打开调用端设置

    Any app, SDK or agent with a "Base URL", "API Base" or "OpenAI-compatible endpoint" field.任何带有 “Base URL”“API Base” 或 “OpenAI 兼容接口” 设置的应用、SDK 或 Agent。

  2. Paste the Base URL填入 Base URL

    Exactly as shown above, ending in /v1.照上面原样填写,以 /v1 结尾。

  3. Keep your API keyAPI Key 不变

    Sent as Authorization: Bearer sk-…, exactly as with OpenAI.照常以 Authorization: Bearer sk-… 发送,与直连 OpenAI 相同。

Examples示例

# Official OpenAI SDKs and most tools read these. No code change needed.
export OPENAI_BASE_URL=https://llmapi.ohmytoken.com/v1
export OPENAI_API_KEY=sk-...   # your own key

Supported APIs支持的接口

Chat Completions✓ SSEPOST /v1/chat/completions
Responses✓ SSEPOST /v1/responses
Embeddings✓POST /v1/embeddings
Decisions✓POST /v1/decisions
Models✓GET /v1/models
Everything else under /v1其他 /v1 接口forwarded as-is原样转发images · audio · files · batches · moderations · vector_stores …
Realtime (WebSocket)not supported不支持/v1/realtime

For AI agents给 AI Agent

Paste this into an agent's instructions, or point it at https://llmapi.ohmytoken.com/llms.txt (plain text, same content).把下面这段放进 Agent 的指令里,或者让它读取 https://llmapi.ohmytoken.com/llms.txt(纯文本,内容相同)。

Use the OpenAI API through https://llmapi.ohmytoken.com/v1 instead of https://api.openai.com/v1.
- Set the OpenAI base URL to https://llmapi.ohmytoken.com/v1 (or env OPENAI_BASE_URL). Change nothing else.
- Authenticate with the user's own key: header "Authorization: Bearer $OPENAI_API_KEY".
- Request and response bodies are identical to the OpenAI API; streaming (SSE) works.
- Supported: every /v1/* HTTP endpoint (chat/completions, responses, embeddings, decisions, models, ...).
  Not supported: WebSocket / Realtime.
- Errors with OpenAI's JSON shape come from OpenAI; a 401/404 saying "Bearer" or "Unknown API route" comes from this proxy.
- Full reference: https://llmapi.ohmytoken.com/llms.txt

Troubleshooting常见问题

You see现象Meaning and fix原因与处理
404 Unknown API routeBase URL is missing /v1, or the client added a second /v1.Base URL 少了 /v1,或客户端又拼了一次 /v1。
401 … Authorization: Bearer <key>No key was sent. A 401 in OpenAI's own wording means the key itself is wrong.没有带 Key。若 401 是 OpenAI 的原文提示,说明 Key 本身不对。
403 unsupported_country_region_territoryFrom OpenAI: the caller's location is not a supported region.来自 OpenAI:调用者所在地不在支持地区。
Streaming arrives all at once流式结果一次性到达Something between you and this endpoint buffers responses. With curl, add -N.中间某层在缓冲响应;curl 请加 -N。
501 unsupported_transportWebSocket / Realtime was attempted. Use the HTTP endpoints.尝试了 WebSocket / Realtime,请改用 HTTP 接口。

Good to know须知