GoldBean API

Unified gateway for 7 Chinese LLMs. One key, OpenAI-compatible, 25-40% cheaper.

7 Providers OpenAI Compatible Free Tier Playground
Get started: Try Playground | GitHub | Recharge

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

ProviderEndpointModels
DeepSeekPOST /ai/ds/chatdeepseek-v4-pro, deepseek-v4-flash
KimiPOST /ai/kimi/chatkimi-k2.6, kimi-k2.7-code
DoubaoPOST /ai/doubao/chatdoubao-seed-2-0-pro, doubao-mini-260428, doubao-lite-260428
QwenPOST /ai/qwen/chatqwen-3.5-turbo, qwen-plus
HunyuanPOST /ai/hy3/chathunyuan-large
BaiduPOST /ai/baidu/chatERNIE-4.5
GLMPOST /ai/glm/chatGLM-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

TierPriceModels
Budget$0.05-$0.08 / M tokensDeepSeek Flash
Standard$0.225-$1.20 / M tokensDeepSeek Pro, Doubao Mini
Premium$1.50-$2.50 / M tokensKimi, ERNIE, Qwen

Free Tier

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

CodeMeaning
200Success
401Invalid API key
429Rate limit or insufficient balance
500Upstream 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