Quick Start
curl https://goldbean-api.xyz/ai/ds/chat \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-pro",
"messages": [{"role": "user", "content": "Hello"}]
}'
Available Endpoints
| Provider | Endpoint | Models |
|---|---|---|
| DeepSeek | POST /ai/ds/chat | deepseek-v4-pro, deepseek-v4-flash |
| Kimi | POST /ai/kimi/chat | kimi-k2.6, kimi-k2.7-code |
| Doubao | POST /ai/doubao/chat | doubao-seed-2-0-pro, doubao-mini-260428, doubao-lite-260428 |
| Qwen | POST /ai/qwen/chat | qwen-3.5-turbo, qwen-plus |
| Hunyuan | POST /ai/hy3/chat | hunyuan-large |
| Baidu | POST /ai/baidu/chat | ERNIE-4.5 |
| GLM | POST /ai/glm/chat | GLM-4 |
Request Format
All endpoints accept standard OpenAI-compatible JSON:
{
"model": "deepseek-v4-pro",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Hello" }
],
"temperature": 0.7,
"max_tokens": 2048,
"stream": false
}
Important Rules
Temperature Constraint
Kimi models ONLY accept temperature=1. Passing any other value will result in an error.
Model Switching
To switch providers, only change the endpoint path and model name. The request body format stays identical:
// DeepSeek
fetch('/ai/ds/chat', { body: JSON.stringify({ model: 'deepseek-v4-pro', ... }) });
// Switch to Kimi
fetch('/ai/kimi/chat', { body: JSON.stringify({ model: 'kimi-k2.6', temperature: 1, ... }) });
Pricing Tiers
| Tier | Price | Models |
|---|---|---|
| Budget | $0.05-$0.08 / M tokens | DeepSeek Flash |
| Standard | $0.225-$1.20 / M tokens | DeepSeek Pro, Doubao Mini |
| Premium | $1.50-$2.50 / M tokens | Kimi, ERNIE, Qwen |
Free Tier
- Anonymous: 20 calls/day per IP
- Registered: 200 calls/day
- Paid: 2,000 calls/day
SDK
npm install goldbean-client
import { GoldBeanClient } from 'goldbean-client';
const client = new GoldBeanClient({
apiKey: 'YOUR_KEY',
baseURL: 'https://goldbean-api.xyz'
});
const response = await client.chat('/ai/ds/chat', {
model: 'deepseek-v4-pro',
messages: [{ role: 'user', content: 'Hello' }]
});
Cursor Integration
Add .cursorrules to your project root for one-click GoldBean access in Cursor IDE:
https://goldbean-api.xyz/.cursorrules
Error Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 401 | Invalid API key |
| 429 | Rate limit or insufficient balance |
| 500 | Upstream provider error |
MCP Protocol
GoldBean exposes 51 tools via Model Context Protocol:
GET https://goldbean-api.xyz/.well-known/mcp.json
Questions? Open an issue on GitHub or email wuzenghai616@gmail.com