2KEN2KEN

grok-4.5

Save 98%

≤ 200,000 tokens

输入价Save 98%
$0.05 / 1M tokens官方 $2 / 1M tokens
输出价Save 98%
$0.15 / 1M tokens官方 $6 / 1M tokens
缓存读价Save 98%
$0.0075 / 1M tokens官方 $0.3 / 1M tokens

兜底档

输入价Save 98%
$0.1 / 1M tokens官方 $4 / 1M tokens
输出价Save 98%
$0.3 / 1M tokens官方 $12 / 1M tokens
缓存读价Save 98%
$0.015 / 1M tokens官方 $0.6 / 1M tokens

PLAYGROUND

Input

Temperature

Max tokens

Stream

Output

运行后将显示助手回复

EXAMPLES

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

如何使用

三步完成接入。模型 ID 固定为 grok-4.5

  1. 1

    获取 API Key

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

  2. 2

    指向统一端点

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

  3. 3

    发送 Chat Completions

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

Developer docs

API

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

OpenAI · Chat API

grok-4.5 Chat Completions

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

01

Endpoint

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

调用流程

  1. 1
    Bearer 鉴权

    Header 携带 Authorization: Bearer

  2. 2
    提交 messages

    返回 choices[0].message 与 usage。

03

调用要点

  • 模型grok-4.5
  • 兼容可切换 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": "grok-4.5",
    "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 即可继续调用。

一个密钥,全部模型

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

按量透明计费

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