# Baidu AI Cloud — LLM Models on FluxA

Baidu Qianfan model gateway. OpenAI-compatible API across DeepSeek, ERNIE, GLM, Kimi, MiniMax and more.

## Models & Pricing

Rates in **Units per 1M tokens**. 1 USDC buys 100,000 Units, and 1 MC buys 100,000 Units. See https://agentmarket.fluxapay.xyz/currency.md

| Model ID | Display | Categories | Interfaces | Input (Units/1M) | Output (Units/1M) |
|----------|---------|------------|------------|------------------|-------------------|
| anthropic/claude-opus-5-5 | Claude Opus 5.5 | text, vision, thinking | messages | 288,000 | 1,440,000 |
| anthropic/claude-fable-5 | Claude Fable 5 | text, vision, thinking | messages | 720,000 | 3,600,000 |
| anthropic/claude-opus-5 | Claude Opus 5 | text, vision, thinking | messages | 340,000 | 1,700,000 |
| anthropic/claude-opus-4-8 | Claude Opus 4.8 | text, vision, thinking | messages | 340,000 | 1,700,000 |
| anthropic/claude-opus-4-7 | Claude Opus 4.7 | text, vision, thinking | messages | 340,000 | 1,700,000 |
| anthropic/claude-opus-4-6 | Claude Opus 4.6 | text, vision, thinking | messages | 340,000 | 1,700,000 |
| anthropic/claude-sonnet-5 | Claude Sonnet 5 | text, vision, thinking | messages | 136,000 | 680,000 |
| anthropic/claude-sonnet-4-6 | Claude Sonnet 4.6 | text, vision, thinking | messages | 204,000 | 1,020,000 |
| anthropic/claude-haiku-4-5-20251001 | Claude Haiku 4.5 | text, vision, thinking | messages | 68,000 | 340,000 |
| openai/gpt-6-astra | GPT 6 Astra | text, vision, thinking | chat | 680,000 | 3,400,000 |
| openai/gpt-6-sol | GPT 6 Sol | text, vision, thinking | chat | 136,000 | 680,000 |
| openai/gpt-6-luna | GPT 6 Luna | text, vision, thinking | chat | 6,800 | 34,000 |
| openai/gpt-5.6-sol | GPT 5.6 Sol | text, vision, thinking | chat | 272,000 | 1,360,000 |
| openai/gpt-5.6-terra | GPT 5.6 Terra | text, vision, thinking | chat | 136,000 | 816,000 |
| openai/gpt-5.6-luna | GPT 5.6 Luna | text, vision, thinking | chat | 13,600 | 81,600 |
| deepseek/deepseek-v4-pro | Deepseek V4 Pro | text, thinking | chat | 118,000 | 237,000 |
| deepseek/deepseek-v3.2 | DeepSeek V3.2 | text, thinking | chat | 20,000 | 29,000 |
| moonshotai/kimi-k3 | Kimi K3 | text, vision, thinking | chat | 192,000 | 962,000 |
| moonshotai/kimi-k2.7-code | Kimi K2.7 Code | text, vision, thinking | chat | 96,000 | 399,000 |
| moonshotai/kimi-k2.6 | Kimi K2.6 | text | chat | 67,000 | 280,000 |
| z-ai/glm-5.3 | GLM 5.3 | text, thinking | chat | 59,200 | 207,000 |
| z-ai/glm-5.3-flash | GLM 5.3 Flash | text, thinking | chat | 5,900 | 20,700 |
| z-ai/glm-5 | GLM-5 | thinking | chat | 70,000 | 224,000 |
| z-ai/glm-5.1 | GLM 5.1 | text | chat | 98,000 | 308,000 |
| bytedance-seed/doubao-seed-2-0-mini-260215 | Doubao Seed 2.0 Mini | text, thinking | chat | 3,000 | 29,600 |

## Calling Models

OpenAI Chat Completions wire format, for every model whose Interfaces include `chat`. Drop-in for any OpenAI client, just swap the `baseURL`:

`anthropic/claude-opus-5-5`, `anthropic/claude-fable-5`, `anthropic/claude-opus-5`, `anthropic/claude-opus-4-8`, `anthropic/claude-opus-4-7`, `anthropic/claude-opus-4-6`, `anthropic/claude-sonnet-5`, `anthropic/claude-sonnet-4-6`, `anthropic/claude-haiku-4-5-20251001` are not served on chat completions here: use Anthropic Messages below. A chat completions call for them is refused with HTTP 400.

**Base URL:** `https://router.fluxapay.xyz/llm/baidu-ai-cloud/v1`

```bash
curl -X POST https://router.fluxapay.xyz/llm/baidu-ai-cloud/v1/chat/completions \
  -H "Authorization: Bearer <credential>" \
  -H "Content-Type: application/json" \
  -d '{"model":"<model-id>","messages":[{"role":"user","content":"..."}]}'
```

Or with the OpenAI SDK:

```ts
import OpenAI from "openai"
const client = new OpenAI({
  baseURL: "https://router.fluxapay.xyz/llm/baidu-ai-cloud/v1",
  apiKey: process.env.AUTH, // fxa_live_... (human) or Agent VC (agent)
})
const res = await client.chat.completions.create({
  model: "<model-id>",
  messages: [{ role: "user", content: "Hello" }],
})
```

Non-streaming responses include `X-LLM-Cost-Credits` (Units charged for the call) and `X-LLM-Balance` (balance after) headers; streaming responses are metered after the stream closes, without these headers. When unsettled debt crosses the threshold, the **next call returns HTTP 402**. Settle or top up per the wallet guide.

## Anthropic Messages (Claude)

`anthropic/claude-opus-5-5`, `anthropic/claude-fable-5`, `anthropic/claude-opus-5`, `anthropic/claude-opus-4-8`, `anthropic/claude-opus-4-7`, `anthropic/claude-opus-4-6`, `anthropic/claude-sonnet-5`, `anthropic/claude-sonnet-4-6`, `anthropic/claude-haiku-4-5-20251001` are also served on Anthropic's native Messages API, with its full feature set (prompt caching with 5-minute and 1-hour writes, thinking, tools). Point any Anthropic SDK or Claude Code at the base URL; the credential goes in `x-api-key` or `Authorization: Bearer`.

**Base URL:** `https://router.fluxapay.xyz/llm/baidu-ai-cloud`

```bash
curl -X POST https://router.fluxapay.xyz/llm/baidu-ai-cloud/v1/messages \
  -H "x-api-key: <credential>" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"<claude-model-id>","max_tokens":1024,"messages":[{"role":"user","content":"..."}]}'
```

Usage, including `cache_creation_input_tokens` and `cache_read_input_tokens`, is billed at the model's input, cache-write and cache-read rates.

## Wallet Operations for Baidu AI Cloud

```bash
# balance (one balance, spends at any merchant)
curl -H "Authorization: Bearer <credential>" https://router.fluxapay.xyz/llm/wallet/balances
# spending history
curl -H "Authorization: Bearer <credential>" "https://router.fluxapay.xyz/llm/wallet/ledger/baidu-ai-cloud?kind=spend&limit=20"
# topup (after explicit user confirmation; vendorSlug optional, bookkeeping only)
curl -X POST -H "Authorization: Bearer <credential>" -H "Content-Type: application/json" \
  -d '{"packageSlug":"<bundle-slug>"}' https://router.fluxapay.xyz/llm/topup/initiate
```

## Topup Bundles

| Bundle | Cost | Units granted |
|--------|------|---------------|
| Starter (`starter`) | 5 MC ($5) | 500,000 |
| Mid (`mid`) | 10 MC ($10) | 1,000,000 |
| Pro (`pro`) | 25 MC ($25) | 2,500,000 |

**Always confirm a topup with the user before initiating it** — see the wallet guide.

## Units Wallet Guide

**Read once — credential setup, all operations, topup protocol, errors:**

```bash
curl https://agentmarket.fluxapay.xyz/api/llm/skills.md
```

---

- All merchants: `curl "https://agentmarket.fluxapay.xyz/api/discover?type=model"`
- Platform overview: https://agentmarket.fluxapay.xyz/skill.md