模型广场
208 个模型,按国内/海外、厂商、模态与能力筛选。
进入模型广场完全兼容 OpenAI API 协议。改两行代码——Base URL + API Key——即可在现有项目中使用模型广场的全部模型。
密钥在控制台「应用管理」中创建。请勿把 Key 写入前端代码或公开仓库。
FluxAPI 是 Tkone 对外的统一大模型调用接口,完全兼容 OpenAI API 协议。任何支持 OpenAI SDK / API 规范的客户端、框架与应用都可以直接使用。
| 步骤 | 操作 | 位置 |
|---|---|---|
| ① | 注册账号并完成登录 | 注册页 |
| ② | 创建应用,获取 API Key(sk- 开头) | 控制台 → 应用管理 |
| ③ | 确认可用模型与价格 | 模型广场 / 价格 |
| ④ | 用 Base URL + API Key 发起调用 | 任意 OpenAI 兼容环境 |
curl https://tkonegeo.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxx" \
-d '{
"model": "anthropic/claude-fable-5.1",
"messages": [{"role": "user", "content": "你好"}],
"stream": true
}'
from openai import OpenAI
client = OpenAI(
api_key="sk-xxxx",
base_url="https://tkonegeo.com/v1"
)
response = client.chat.completions.create(
model="anthropic/claude-fable-5.1",
messages=[{"role": "user", "content": "你好"}],
stream=True
)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "sk-xxxx",
baseURL: "https://tkonegeo.com/v1",
});
const stream = await client.chat.completions.create({
model: "anthropic/claude-fable-5.1",
messages: [{ role: "user", content: "你好" }],
stream: true,
});
所有网关接口通过 HTTP Header 携带 API Key 鉴权。请在控制台「应用管理」中创建应用后获取 Key。
Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxBase URL 为 https://tkonegeo.com/v1,协议为 OpenAI API 兼容,JSON 请求/响应,流式为 SSE。
/v1/models列出当前 API Key 可用的所有模型。
curl https://tkonegeo.com/v1/models \
-H "Authorization: Bearer sk-xxxx"/v1/models/{model}获取指定模型的详细信息。
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 模型 ID,例如 anthropic/claude-fable-5.1 |
/v1/chat/completionsChat Completions 接口,兼容 OpenAI 格式,支持流式响应(SSE)。
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 模型 ID |
messages | array | 是 | 消息数组 [{role, content}] |
stream | bool | 否 | 是否流式响应,默认 false |
temperature | float | 否 | 采样温度 0–2 |
max_tokens | int | 否 | 最大生成 Token 数 |
top_p | float | 否 | 核采样概率 |
frequency_penalty | float | 否 | 频率惩罚 -2 到 2 |
presence_penalty | float | 否 | 存在惩罚 -2 到 2 |
from openai import OpenAI
client = OpenAI(
api_key="sk-xxxx",
base_url="https://tkonegeo.com/v1"
)
stream = client.chat.completions.create(
model="anthropic/claude-fable-5.1",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "用三句话解释什么是 Token。"},
],
stream=True,
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
curl https://tkonegeo.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxx" \
-d '{
"model": "anthropic/claude-fable-5.1",
"messages": [{"role": "user", "content": "你好"}],
"stream": true
}'
/v1/completions文本补全接口(Legacy)。参数:model、prompt、stream、max_tokens、temperature。
/v1/edits文本编辑接口,根据指令修改输入文本。参数:model、input、instruction、temperature、top_p。
/v1/embeddings生成文本的向量嵌入。
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 模型 ID |
input | string | array | 是 | 输入文本或文本数组 |
encoding_format | string | 否 | float 或 base64 |
curl https://tkonegeo.com/v1/embeddings \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxx" \
-d '{"model": "<model>", "input": "Tkone"}'/v1/images/generations根据提示词生成图像。
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 模型 ID |
prompt | string | 是 | 图像描述提示词 |
n | int | 否 | 生成数量,默认 1 |
size | string | 否 | 图像尺寸,如 1024x1024 |
quality | string | 否 | standard 或 hd |
response_format | string | 否 | url 或 b64_json |
curl https://tkonegeo.com/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxx" \
-d '{"model": "<model>", "prompt": "一座绿白配色的未来 AI 工厂", "n": 1, "size": "1024x1024"}'/v1/audio/transcriptions语音转文本(需 multipart/form-data 上传音频文件)。
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
file | file | 是 | 音频文件 |
model | string | 是 | 模型 ID |
language | string | 否 | 音频语言(ISO-639-1) |
prompt | string | 否 | 引导文本 |
response_format | string | 否 | json / text / srt / verbose_json / vtt |
temperature | float | 否 | 采样温度 |
/v1/audio/translations将音频翻译为英文文本。参数与转写接口类似:file、model、prompt、response_format、temperature。
/v1/audio/speech文本转语音。参数:model、input、voice、response_format、speed。
multipart/form-data,不要手动设置 Content-Type: application/json。/v1/moderations检查文本是否违反内容安全策略。
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
input | string | array | 是 | 待检查的文本 |
model | string | 否 | 审核模型 ID |
curl https://tkonegeo.com/v1/moderations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxx" \
-d '{"input": "需要审核的文本"}'返回 OpenAI 标准格式,用量在 usage 字段。把 prompt_tokens 与 completion_tokens 入库,即可做自己的成本分析。
{
"id": "chatcmpl-xxx",
"model": "anthropic/claude-fable-5.1",
"choices": [{ "message": { "role": "assistant", "content": "..." } }],
"usage": {
"prompt_tokens": 15,
"completion_tokens": 42,
"total_tokens": 57
}
}第三方客户端也可手动填写:Base URL = https://tkonegeo.com/v1,API Key = 你的应用 Key。
模型广场展示所有可用模型的输入/输出单价,单位 CNY / 1M tokens;视频、图像模型按秒或按张计价。价格来自平台模型广场,Tkone 不额外隐藏系数。
模型广场数据可公开读取,无需鉴权:
GET https://tkonegeo.com/api/marketplace/models?page=1&page_size=60
# 返回 total、facets 与 items;price.input / price.output 单位为 CNY / 1M tokens本次扣费 = 输入 tokens × 输入单价 + 输出 tokens × 输出单价。输出单价通常高于输入单价;具体价格以模型广场为准。
应用管理页支持对每个应用 Key 独立设置:
| 设置 | 说明 |
|---|---|
| 额度上限 | 该应用累计最多消耗的额度,防失控 |
| 有效期 | 过期自动失效 |
| 模型范围 | 限定该应用只能调用哪些模型 |
| 状态 | 启用 / 禁用,禁用后 Key 立即失效 |
多项目/多人使用建议:一人一应用、一项目一应用,单独设额度上限,便于隔离与撤销。
| HTTP 状态码 | 说明 | 处理 |
|---|---|---|
| 200 | 请求成功 | — |
| 400 | 请求参数错误 | 检查请求参数 |
| 401 | API Key 无效或已禁用 | 检查 Key 状态与有效期 |
| 403 | 无权使用模型 | 检查应用的模型范围 |
| 404 | 模型不存在或无可用渠道 | 确认模型名称正确 |
| 429 | 额度不足或触发限流 | 充值或降低并发稍后重试 |
| 500 | 上游渠道波动 | 稍后重试,持续失败联系平台支持 |
{
"error": {
"message": "错误描述",
"type": "invalid_request_error",
"code": "401"
}
}https://tkonegeo.com/v1,API Key 换成你的应用 Key。