/v1
Use one Jiayu API key. Available models, balance, and usage are managed in the Jiayu console.只使用一个 Jiayu API 密钥。可用模型、余额和用量均在 Jiayu 控制台中管理。
Developer documentation开发者文档
Use a familiar OpenAI-compatible request pattern. Set the base URL, provide your API key, and choose a model that is available in your console.使用熟悉的 OpenAI 兼容请求方式。设置 Base URL、提供 API 密钥,并选择控制台中实际可用的模型。
Quickstart快速开始
https://api.jiayugate.com/v1Authentication身份验证
Send your Jiayu API key in the Authorization header. Keep production keys on your server and never expose them in browser-side code or public repositories.在 Authorization 请求头中发送 Jiayu API 密钥。生产密钥应保存在服务器端,不要暴露在浏览器代码或公共仓库中。
Authorization: Bearer YOUR_API_KEY Content-Type: application/json
Endpoints接口端点
Jiayu API is designed around OpenAI-compatible request patterns. Endpoint support depends on the provider route and model selected in your console.Jiayu API 围绕 OpenAI 兼容请求方式设计。具体端点支持取决于控制台中选择的供应商路由和模型。
/v1/chat/completions/v1/responsesExamples代码示例
curl https://api.jiayugate.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-pro",
"messages": [{"role": "user", "content": "Hello"}]
}'from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.jiayugate.com/v1"
)
response = client.chat.completions.create(
model="deepseek-v4-pro",
messages=[{"role": "user", "content": "Hello"}]
)Bring your own key自带供应商密钥
BYOK is a separate access mode for users who already have an official provider account. Jiayu authorizes access to the gateway, while the provider authorizes the model and charges usage to your provider account.BYOK 是面向已有官方供应商账户用户的独立接入模式。Jiayu 负责验证网关访问权限,供应商负责验证模型权限,并将用量计入你的供应商账户。
/v1Use one Jiayu API key. Available models, balance, and usage are managed in the Jiayu console.只使用一个 Jiayu API 密钥。可用模型、余额和用量均在 Jiayu 控制台中管理。
/byok/{provider}Send a Jiayu API key and your provider key with every request. Model access and billing stay with the provider.每次请求同时发送 Jiayu API 密钥和供应商密钥。模型权限与计费仍由供应商管理。
https://api.jiayugate.com/byok/openai/v1https://api.jiayugate.com/byok/anthropichttps://api.jiayugate.com/byok/gemini/v1Availability可用范围
The current public catalog lists 41 entries across OpenAI, Anthropic, Google, DeepSeek, GLM, Qwen, and Moonshot. A listed entry is not a claim that every capability has been independently tested. Use the Model Marketplace for exact identifiers, endpoint support, current pricing, and availability.当前公开目录列出 OpenAI、Anthropic、Google、DeepSeek、GLM、Qwen 与 Moonshot 的 41 个模型条目。“已上架”不代表每项能力均已独立实测。精确模型 ID、端点支持、当前价格与可用性以模型市场为准。