2KEN2KEN

gpt-5.4

Save 91%
输入价Save 91%
$0.22 / 1M tokens官方 $2.5 / 1M tokens
输出价Save 91%
$1.32 / 1M tokens官方 $15 / 1M tokens
缓存读价Save 91%
$0.022 / 1M tokens官方 $0.25 / 1M tokens

PLAYGROUND

Input

Temperature

Max tokens

Stream

Output

运行后将显示助手回复

EXAMPLES

点击示例可载入 Playground 预设参数,并跳转到试用区。

如何使用

三步完成接入。模型 ID 固定为 gpt-5.4

  1. 1

    获取 API Key

    在 2KEN 控制台创建密钥。文本、图像、视频共用一个 Key。

  2. 2

    指向统一端点

    Base URL 设为 https://api.2ken.com/v1,model 填 gpt-5.4

  3. 3

    发送 Chat Completions

    使用 messages 数组提交 system / user,读取 choices 与 usage 结算。

Developer docs

API

OpenAI 兼容同步接口。一次请求拿到助手回复与 token 用量。

OpenAI · Chat API

gpt-5.4 Chat Completions

使用统一 OpenAI 兼容端点调用 gpt-5.4。一次请求返回助手消息与 usage。

01

Endpoint

POST
Chat Completions/v1/chat/completions
试用
02

调用流程

  1. 1
    Bearer 鉴权

    Header 携带 Authorization: Bearer

  2. 2
    提交 messages

    返回 choices[0].message 与 usage。

03

调用要点

  • 模型gpt-5.4
  • 兼容可切换 baseURL 复用现有 OpenAI SDK。
01 发送请求 POST · chat
curl --request POST \
  --url https://api.2ken.com/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gpt-5.4",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
200Chat Response
{
  "id": "chatcmpl-demo",
  "choices": [{"message": {"role": "assistant", "content": "Hello from 2KEN."}}],
  "usage": {"prompt_tokens": 8, "completion_tokens": 6}
}

为什么选择 2KEN

兼容接口,迁移成本低

现有 SDK 改 baseURL 即可继续调用。

一个密钥,全部模型

文本、图像、视频与其它模态共用账单与密钥。

按量透明计费

页面直接展示美元单价与官方对照,便于成本估算。