深色模式
🚀 5 分钟快速开始
面向新手:跟着以下步骤,从零开始完成注册、购买、兑换、创建密钥并发出第一次 API 请求。
第一步:注册账号
- 浏览器打开 https://fast.drivecode.top/register
- 输入邮箱地址和密码
- 点击注册,登录后进入控制台
第二步:购买兑换码(如已有余额可跳过)
如果账户已有余额,请直接跳到第三步。
- 打开 https://shop.drivecode.top
- 选择合适面额的 "余额兑换码"
- 填写联系方式并完成付款
- 付款成功后等待 1~3 分钟,刷新订单页面即可看到兑换码
第三步:兑换余额
- 进入 https://fast.drivecode.top/redeem
- 完整复制兑换码(注意区分大小写)
- 粘贴到兑换框,点击确认
- 页面提示成功后,在控制台查看新余额
⚠️ 安全提醒
- 兑换码区分大小写,复制时确认没有多余空格
- 每个兑换码只能成功使用一次
- 不要将兑换码截图发到任何群聊或社交平台
第四步:创建 API Key
- 进入 https://fast.drivecode.top/keys
- 点击 "创建新密钥"
- 输入密钥名称(例如
claude test) - 点击确认创建密钥
- 点击确认,立即复制并保存 API Key(页面关闭后不再显示)
第五步:发出第一次 API 请求
用以下命令测试你的 API Key 是否正常工作(替换 sk-xxxxxxxxxxxxxxxx 为真实的 Key):
powershell
$env:API_KEY = "sk-xxxxxxxxxxxxxxxx"
$body = @{
model = "<MODEL_ID>"
max_tokens = 1024
messages = @(
@{ role = "user"; content = "请用一句话介绍你自己" }
)
} | ConvertTo-Json -Depth 10 -Compress
curl.exe https://fast.drivecode.top/v1/messages `
-H "x-api-key: $env:API_KEY" `
-H "anthropic-version: 2023-06-01" `
-H "Content-Type: application/json" `
-d $bodypowershell
$env:API_KEY = "sk-xxxxxxxxxxxxxxxx"
$body = @{
model = "<MODEL_ID>"
messages = @(
@{ role = "user"; content = "请用一句话介绍你自己" }
)
} | ConvertTo-Json -Depth 10 -Compress
curl.exe https://fast.drivecode.top/v1/chat/completions `
-H "Authorization: Bearer $env:API_KEY" `
-H "Content-Type: application/json" `
-d $bodypowershell
$env:API_KEY = "sk-xxxxxxxxxxxxxxxx"
$body = @{
model = "<MODEL_ID>"
input = "请用一句话介绍你自己"
} | ConvertTo-Json -Depth 10 -Compress
curl.exe https://fast.drivecode.top/v1/responses `
-H "Authorization: Bearer $env:API_KEY" `
-H "Content-Type: application/json" `
-d $body模型名称从 /v1/models 接口获取后替换 <MODEL_ID>。
Anthropic 示例中的
max_tokens是必填的输出上限;anthropic-version: 2023-06-01是当前稳定 API schema 版本,不应按当前年份改写。
💡 如何选择协议?
- Claude Code / Anthropic SDK → 用 Claude 协议
- Codex CLI → 必须使用 OpenAI Responses API
- Cursor / 常规 OpenAI 兼容客户端 → 通常使用 Chat Completions
- Python OpenAI SDK → 新项目优先使用 Responses,也可按模型兼容性使用 Chat Completions
- 只是想快速测试 → 用免费模型,不消耗余额
第六步:查询可用模型
当前可用的模型列表可能随时更新,建议请求前先查询:
powershell
curl.exe https://fast.drivecode.top/v1/models `
-H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx"返回结果中 id 字段即为候选模型名称。复制后还要用你准备使用的接口发送一次请求,确认该模型支持 Responses、Chat Completions 或 Anthropic Messages。
第七步:查看使用记录
- 进入 https://fast.drivecode.top/usage
- 确认刚才的请求已记录在列表中
- 查看 Token 数量 和 实际扣费(免费模型显示为 $0)
如果记录了刚才的请求 → 接入成功 ✅