# 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 Unit = $0.00001; 100,000 Units = $1).

| Model ID | Display | Categories | Input (Units/1M) | Output (Units/1M) |
|----------|---------|------------|------------------|-------------------|
| deepseek-v4-pro | Deepseek V4 Pro | text, thinking | 118,000 | 237,000 |
| deepseek-v4-flash | Deepseek V4 Flash | text, thinking | 10,000 | 20,000 |
| deepseek-v3.2 | DeepSeek V3.2 | text, thinking | 20,000 | 29,000 |
| ernie-5.0-thinking-preview | ERNIE 5.0 (Thinking) | thinking | 140,000 | 560,000 |
| glm-5 | GLM-5 | thinking | 70,000 | 224,000 |
| deepseek-v3.2-think | DeepSeek V3.2 (Thinking) | thinking | 20,000 | 29,000 |
| kimi-k2.5 | Kimi K2.5 | thinking | 42,000 | 210,000 |
| glm-5.2 | GLM 5.2 | text, thinking | 93,000 | 300,000 |
| minimax-m2.5 | MiniMax M2.5 | thinking | 21,000 | 84,000 |
| glm-5.1 | GLM 5.1 | text | 98,000 | 308,000 |
| kimi-k2.6 | Kimi K2.6 | text | 67,000 | 280,000 |

## Calling Models

OpenAI Chat Completions wire format. Drop-in for any OpenAI client, just swap the `baseURL`:

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

```bash
curl -X POST https://proxy-monetize.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://proxy-monetize.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.

## Wallet Operations for Baidu AI Cloud

```bash
# balance
curl -H "Authorization: Bearer <credential>" https://proxy-monetize.fluxapay.xyz/llm/wallet/balances/baidu-ai-cloud
# spending history
curl -H "Authorization: Bearer <credential>" "https://proxy-monetize.fluxapay.xyz/llm/wallet/ledger/baidu-ai-cloud?kind=spend&limit=20"
# topup (after explicit user confirmation)
curl -X POST -H "Authorization: Bearer <credential>" -H "Content-Type: application/json" \
  -d '{"vendorSlug":"baidu-ai-cloud","packageSlug":"<bundle-slug>"}' https://proxy-monetize.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://monetize.fluxapay.xyz/api/llm/skills.md
```

---

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