● 主节点
https://api.203236.xyz
运行中
打开
○ 备用节点
https://jvzwdrhp.cn-hk1.rainapp.top
运行中
打开

🔑 身份认证

所有 API 请求需在 HTTP Header 中携带 API Key 以 Bearer Token 方式认证。

Authorization: Bearer sk-xxxxxxxxxxxxxxxx

🔗 端点总览

所有接口均兼容 OpenAI API 格式,可无缝替换使用。

GET/v1/models
curl https://jvzwdrhp.cn-hk1.rainapp.top/v1/models \ -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx"
POST/v1/chat/completions
curl https://jvzwdrhp.cn-hk1.rainapp.top/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \ -d '{"model":"gpt-4o","messages":[{"role":"user","content":"你好!"}],"temperature":0.7}'
POST/v1/completions
curl https://jvzwdrhp.cn-hk1.rainapp.top/v1/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \ -d '{"model":"gpt-4o","prompt":"人工智能的未来是","max_tokens":500}'
POST/v1/embeddings
curl https://jvzwdrhp.cn-hk1.rainapp.top/v1/embeddings \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \ -d '{"model":"text-embedding-3-small","input":"需要生成向量的文本内容"}'
POST/v1/images/generations
curl https://jvzwdrhp.cn-hk1.rainapp.top/v1/images/generations \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \ -d '{"model":"dall-e-3","prompt":"一只可爱的橘猫在键盘上睡觉","n":1,"size":"1024x1024"}'
POST/v1/audio/transcriptions
curl https://jvzwdrhp.cn-hk1.rainapp.top/v1/audio/transcriptions \ -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \ -F "file=@/path/to/audio.mp3" \ -F "model=whisper-1" \ -F "language=zh"
POST/v1/audio/translations
curl https://jvzwdrhp.cn-hk1.rainapp.top/v1/audio/translations \ -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \ -F "file=@/path/to/audio.mp3" \ -F "model=whisper-1"

📋 模型列表

查询当前服务可用的所有 AI 模型。

GET/v1/models
cURL
curl https://jvzwdrhp.cn-hk1.rainapp.top/v1/models \
  -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx"
▶ 在线测试
JSON
{
  "object": "list",
  "data": [
    { "id": "gpt-4o", "object": "model", "created": 1710000000, "owned_by": "system" }
  ]
}

💬 聊天补全

核心对话接口。传入消息列表,返回模型生成的回复。完全兼容 OpenAI Chat Completions 格式。

POST/v1/chat/completions
cURL
curl https://jvzwdrhp.cn-hk1.rainapp.top/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \
  -d '{
  "model": "gpt-4o",
  "messages": [
    {"role": "system", "content": "你是一个有用的助手"},
    {"role": "user", "content": "你好!"}
  ],
  "temperature": 0.7,
  "max_tokens": 2048
}'
参数类型必需说明
modelstring必需模型 ID,如 gpt-4o
messagesarray必需消息列表,支持 system / user / assistant
temperaturenumber可选采样温度 0~2,默认 1
max_tokensinteger可选最大生成 token 数
top_pnumber可选核采样参数,默认 1
streamboolean可选是否流式返回,默认 false
frequency_penaltynumber可选频率惩罚 -2~2
presence_penaltynumber可选存在惩罚 -2~2
▶ 在线测试
JSON
{
  "id": "chatcmpl-xxx",
  "object": "chat.completion",
  "created": 1710000000,
  "model": "gpt-4o",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "你好!有什么可以帮助你的?" },
      "finish_reason": "stop"
    }
  ],
  "usage": { "prompt_tokens": 25, "completion_tokens": 12, "total_tokens": 37 }
}

📝 文本补全

传统文本补全接口,传入提示文本返回续写内容。

POST/v1/completions
cURL
curl https://jvzwdrhp.cn-hk1.rainapp.top/v1/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \
  -d '{
  "model": "gpt-4o",
  "prompt": "人工智能的未来是",
  "max_tokens": 500
}'
参数类型必需说明
modelstring必需模型 ID
promptstring必需输入提示文本
max_tokensinteger可选最大生成数,默认 256
temperaturenumber可选采样温度 0~2

📐 向量嵌入

将文本转换为高维向量,适用于语义搜索、聚类等场景。

POST/v1/embeddings
cURL
curl https://jvzwdrhp.cn-hk1.rainapp.top/v1/embeddings \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \
  -d '{
  "model": "text-embedding-3-small",
  "input": "需要生成向量的文本内容"
}'
参数类型必需说明
modelstring必需嵌入模型 ID,如 text-embedding-3-small
inputstring/array必需输入文本,支持批量数组
encoding_formatstring可选返回格式:floatbase64
JSON
{
  "object": "list",
  "data": [{ "object": "embedding", "index": 0, "embedding": [-0.0069, 0.0142] }],
  "model": "text-embedding-3-small",
  "usage": { "prompt_tokens": 8, "total_tokens": 8 }
}

🎨 图像生成

根据文本描述生成图像,支持 DALL·E 系列模型。

POST/v1/images/generations
cURL
curl https://jvzwdrhp.cn-hk1.rainapp.top/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \
  -d '{
  "model": "dall-e-3",
  "prompt": "一只可爱的橘猫在键盘上睡觉",
  "n": 1,
  "size": "1024x1024"
}'
参数类型必需说明
modelstring必需图像模型,如 dall-e-3
promptstring必需图像描述提示词
ninteger可选生成数量,默认 1
sizestring可选尺寸:1024x1024 / 1792x1024
qualitystring可选质量:standard / hd

🎤 语音转文字

将音频文件转录为文字,支持多语言。

POST/v1/audio/transcriptions
cURL
curl https://jvzwdrhp.cn-hk1.rainapp.top/v1/audio/transcriptions \
  -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \
  -F "file=@/path/to/audio.mp3" \
  -F "model=whisper-1" \
  -F "language=zh"
参数类型必需说明
filefile必需音频文件(multipart/form-data)
modelstring必需语音模型,如 whisper-1
languagestring可选语言代码,如 zh / en
response_formatstring可选格式:json / text / srt

🌐 语音翻译

将音频翻译为英文文字。

POST/v1/audio/translations
cURL
curl https://jvzwdrhp.cn-hk1.rainapp.top/v1/audio/translations \
  -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \
  -F "file=@/path/to/audio.mp3" \
  -F "model=whisper-1"

🚀 快速上手

各语言调用示例,直接复制即可运行。

Python
from openai import OpenAI

client = OpenAI(
    api_key="sk-xxxxxxxxxxxxxxxx",
    base_url="https://jvzwdrhp.cn-hk1.rainapp.top/v1"
)

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "你好!"}]
)
print(response.choices[0].message.content)
Node.js
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "sk-xxxxxxxxxxxxxxxx",
  baseURL: "https://jvzwdrhp.cn-hk1.rainapp.top/v1",
});

const response = await client.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "你好!" }],
});

console.log(response.choices[0].message.content);
Python · 备用节点
from openai import OpenAI

# 使用备用节点
client = OpenAI(
    api_key="sk-xxxxxxxxxxxxxxxx",
    base_url="https://api.203236.xyz/v1"
)

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello!"}]
)