Skip to content

快速开始

简介

PudBot 是一个多模型 API 中转服务,支持 Claude、GPT、Grok、Gemini 等主流大模型,提供高速稳定的 API 访问。

接入地址

项目
API Base URLhttps://token.pudbot.com
API Key 格式sk- 开头
API 兼容格式Anthropic Messages API

三步接入

1. 获取 API Key

登录 PudBot 控制台,在「API Keys」页面创建 Key。

2. 配置客户端

根据你使用的客户端,选择对应的接入方式:

3. 验证连接

bash
curl https://token.pudbot.com/v1/messages \
  -H "x-api-key: sk-你的APIKey" \
  -H "content-type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-sonnet-5",
    "max_tokens": 64,
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

返回类似下面的 JSON 说明接入成功:

json
{
  "id": "msg_xxx",
  "type": "message",
  "role": "assistant",
  "content": [{"type": "text", "text": "Hello! How can I help you?"}],
  "model": "claude-sonnet-5",
  "stop_reason": "end_turn"
}

下一步