> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omnimux.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Public hosts only: console https://omnimux.ai/dashboard · API https://api.omnimux.ai · docs https://docs.omnimux.ai.
> Gateway auth is Authorization: Bearer sk-… on https://api.omnimux.ai/v1 (OpenAI-compatible Chat Completions and related paths).
> Discover pages from /llms.txt; full site dump /llms-full.txt; product skill /skill.md; docs search MCP /mcp. Prefer .md page URLs for Markdown.
> Default docs locale is en; zh mirrors the same relative paths. Do not invent model ids not present on live pricing or the complete API pages.

# Cost optimization

> Control spend under OmniMux quota, precharge, and settlement

## How billing is shown

User-facing balance uses **积分 (points)**. Internal raw quota converts as:

* `raw_quota ÷ 500000 = USD`
* **1 USD = 10 积分**

Use the [console](https://omnimux.ai/dashboard) for balance and usage. Account APIs (access token) expose profile/quota fields.

## How to control cost and quality via model tiers & dynamic groups

OmniMux provides native **stateless per-request group routing**, allowing you to choose between cost optimization and production stability with a single API key:

### 1. Three invocation modes

| Tier                         | Request Syntax                                                                                                         | Typical Use Case                     | Billing & Routing                                                                                                |
| :--------------------------- | :--------------------------------------------------------------------------------------------------------------------- | :----------------------------------- | :--------------------------------------------------------------------------------------------------------------- |
| **Default Auto Mode**        | Bare model name<br />`"model": "seedance-2-5"`                                                                         | Onboarding, drafts, batch creation   | Default for new keys. Resolves lowest-cost channels first with automatic cross-group retry for SLA protection.   |
| **Global Standard Tier**     | Add `@standard` suffix<br />`"model": "seedance-2-5@standard"`<br />or `-H "X-Omnimux-Group: standard"`                | Production pipelines, official SLA   | Fixed **1.0 base multiplier**, routed to official or premier enterprise lines.                                   |
| **Model-Specific Discounts** | Add model-specific group<br />`"model": "seedance-2-5@seedance-cheap"`<br />`"model": "gemini-3.8-flash@gemini-cheap"` | Massive scaling, cost-sensitive jobs | Fixed custom discount (e.g. 75% off for Seedance Cheap, 70% off for Gemini Cheap), physically isolated channels. |

### 2. Code examples

#### Method A: Model Suffix Syntax (Recommended for all clients/SDKs)

```json theme={null}
{
  "model": "seedance-2-5@seedance-cheap",
  "prompt": "A peaceful ocean wave at sunrise, 4k"
}
```

#### Method B: HTTP Header (Ideal for backend service integration)

```bash theme={null}
curl -X POST "https://api.omnimux.ai/v1/chat/completions" \
  -H "Authorization: Bearer sk-your-token" \
  -H "Content-Type: application/json" \
  -H "X-Omnimux-Group: gemini-cheap" \
  -d '{
    "model": "gemini-3.8-flash",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
```

***

## How to reduce cost

1. **Pick the right model** — cheaper/smaller models for simple jobs; enum lists capability, not equal price.
2. **Cap generation** — set sensible `max_tokens` / `max_completion_tokens`.
3. **Bound multipliers** — image `n`, video duration, resolution affect precharge/settlement; out-of-range values return 400.
4. **Async video** — create often **precharges**, then **settles** on completion/refund path. Use realistic duration/specs.
5. **Cache** — cache identical chat or social-data reads on the client.
6. **Streaming** — `stream: true` can improve UX; abort early only if your product allows and you understand billing still follows live settlement.
7. **Watch 402** — insufficient balance fails pre-consume with **402** `insufficient_quota`.

## Avoid

* Load-testing expensive video/image models with production keys
* Calling raw\_quota “积分” in product UI
* Guessing non-live model ids

<Card title="Console" icon="dollar-sign" href="https://omnimux.ai/dashboard">
  Balance, logs, and model access
</Card>
