Rill.

Use the OpenAI API through this endpoint通过这个地址调用 OpenAI API

Keep your OpenAI API key. Change only the Base URL. Every /v1 endpoint works unchanged, including streaming.保留你自己的 OpenAI API Key,只改 Base URL。所有 /v1 接口原样可用,包括流式输出。

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

Three steps三步用起来

  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://api.aiinflow.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://api.aiinflow.com/llms.txt (plain text, same content).把下面这段放进 Agent 的指令里,或者让它读取 https://api.aiinflow.com/llms.txt(纯文本,内容相同)。

Use the OpenAI API through https://api.aiinflow.com/v1 instead of https://api.openai.com/v1.
- Set the OpenAI base URL to https://api.aiinflow.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 "/v1/*" comes from this proxy.
- Full reference: https://api.aiinflow.com/llms.txt

Troubleshooting常见问题

You see现象Meaning and fix原因与处理
404 Use /v1/* for API requestsBase 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须知