Supage API

支持 OpenAI API 格式的 AI 接口服务

基本信息

Base URL

https://llm.supage.eu.org/v1

无任何 token 和额度限制,有 key 就能调用。

传入任何模型名称,目前统一返回 claude-sonnet-4-6 模型的响应。

支持原生 Tool Calling、流式响应、多轮对话。

API Key 可通过向 BoB 发送指令 api apply 进行获取。

如何使用

本服务完全兼容 OpenAI API 格式,你可以在任何支持自定义 Base URL 的客户端或代码中使用:

1. 将 Base URL 设置为 https://llm.supage.eu.org/v1

2. 将 API Key 设置为你申请到的 su-xxx 格式的密钥

3. 模型名称可以填任意值(如 claude-sonnet-4-6),均会正常响应

4. 请求通过 Authorization: Bearer su-你的key 进行鉴权

接口列表

POST /v1/chat/completions

对话补全,支持流式和非流式响应、Tool Calling、多轮对话

GET /v1/models

获取可用模型列表

基本支持 OpenAI API 格式的任何调用方式,未列出的接口如有需要可自行尝试。

请求参数

model — 模型名称,可填任意值,如 claude-sonnet-4-6

messages — 消息数组,支持 system / user / assistant / tool 角色

stream — 是否流式返回,truefalse,默认 false

tools — Tool Calling 工具定义(可选),格式同 OpenAI Function Calling

tool_choice — 工具调用策略,auto / none / 指定工具(可选)

temperature — 温度参数,0-2(可选)

max_tokens — 最大输出 token 数(可选)

调用示例

curl

curl https://llm.supage.eu.org/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer su-你的key" \
  -d '{
  "model": "claude-sonnet-4-6",
  "messages": [{"role": "user", "content": "你好"}],
  "stream": false
}'

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://llm.supage.eu.org/v1",
    api_key="su-你的key",
)

response = client.chat.completions.create(
    model="claude-sonnet-4-6",
    messages=[{"role": "user", "content": "你好"}],
)
print(response.choices[0].message.content)

Python 流式

stream = client.chat.completions.create(
    model="claude-sonnet-4-6",
    messages=[{"role": "user", "content": "你好"}],
    stream=True,
)
for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Node.js

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://llm.supage.eu.org/v1",
  apiKey: "su-你的key",
});

const res = await client.chat.completions.create({
  model: "claude-sonnet-4-6",
  messages: [{ role: "user", content: "你好" }],
});
console.log(res.choices[0].message.content);
Supage API 由可信的上游提供,请勿滥用。