Provider-sovereign access供应商账户自主接入

One gateway.
Your account
stays yours.
一个网关。
你的账户,
始终属于你。

Use your own OpenAI, Anthropic, or Google AI account through a controlled Jiayu route. Jiayu authorizes gateway access; the provider authorizes the model and bills usage.通过 Jiayu 受控路由接入你自己的 OpenAI、Anthropic 或 Google AI 账户。Jiayu 验证网关访问权限,供应商验证模型权限并结算用量。

  • No provider key saved不保存供应商密钥
  • 01Official provider protocol使用官方协议
  • 02Trusted server-side use可信服务端使用

Two credentials, one request一次请求,两种凭据

The request stays familiar. The responsibility stays clear.请求方式保持熟悉,责任边界始终清晰。

  1. 01
    Authorize the route验证路由权限

    Send your Jiayu key in X-Jiayu-API-Key to access the BYOK gateway.通过 X-Jiayu-API-Key 发送 Jiayu 密钥,以访问 BYOK 网关。

  2. 02
    Authorize the model验证模型权限

    Send a key from your own OpenAI, Anthropic, or Google AI account.发送你自己的 OpenAI、Anthropic 或 Google AI 账户密钥。

  3. 03
    Keep the native protocol保留原生协议

    Call the matching route with the provider's authentication and request format.使用供应商原生鉴权与请求格式调用对应路由。

Provider protocols供应商协议

Use the SDK and request shape already in your stack.继续使用技术栈中已有的 SDK 与请求结构。

Three official protocols. One controlled point of access.三种官方协议,一个受控接入点。

01 / 03

OpenAI

Native OpenAI REST and SDK requests.原生 OpenAI REST 与 SDK 请求。

Official setup官方配置
BASE URLhttps://api.jiayugate.com/byok/openai/v1
curl · Responses API
curl https://api.jiayugate.com/byok/openai/v1/responses \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "X-Jiayu-API-Key: $JIAYU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"YOUR_OPENAI_MODEL_ID","input":"Hello"}'
02 / 03

Claude

Native Anthropic Messages API requests.原生 Anthropic Messages API 请求。

Official setup官方配置
SDK BASE URLhttps://api.jiayugate.com/byok/anthropic
curl · Messages API
curl https://api.jiayugate.com/byok/anthropic/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "X-Jiayu-API-Key: $JIAYU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"YOUR_CLAUDE_MODEL_ID","max_tokens":256,"messages":[{"role":"user","content":"Hello"}]}'
03 / 03

Gemini

Google's OpenAI-compatible Gemini endpoint.Google 提供的 Gemini OpenAI 兼容端点。

Official setup官方配置
BASE URLhttps://api.jiayugate.com/byok/gemini/v1
curl · OpenAI compatibility
curl https://api.jiayugate.com/byok/gemini/v1/chat/completions \
  -H "Authorization: Bearer $GEMINI_API_KEY" \
  -H "X-Jiayu-API-Key: $JIAYU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"YOUR_GEMINI_MODEL_ID","messages":[{"role":"user","content":"Hello"}]}'

Security boundary安全边界

A boundary you can explain to your security team.一条可以向安全团队清楚解释的边界。

01

Not saved by the application应用不保存密钥Provider keys are not written to the Jiayu application database or BYOK access logs. Each key necessarily passes through Jiayu's TLS endpoint before forwarding.供应商密钥不会写入 Jiayu 应用数据库或 BYOK 访问日志。密钥会经过 Jiayu 的 TLS 端点后转发给对应供应商。

02

Server-side only仅限服务端Never place either key in browser JavaScript, mobile binaries, screenshots, chat messages, or public repositories.不要把任何密钥放进浏览器 JavaScript、移动端安装包、截图、聊天消息或公共代码仓库。

03

Provider terms still apply仍适用供应商条款Billing, model access, regional availability, rate limits, and terms remain attached to your provider account. Jiayu API is independent and is not sponsored or endorsed by these providers.计费、模型权限、地区可用性、速率限制与条款仍归属于你的供应商账户。Jiayu API 为独立服务,不代表这些供应商的赞助或认可。