> ## 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.

# Connection and usage

> Base URL, auth, and common HTTP errors

## Wrong Base URL?

| Surface                             | Base                                                    |
| ----------------------------------- | ------------------------------------------------------- |
| AI gateway / social data (`sk-`)    | `https://api.omnimux.ai` or `https://api.omnimux.ai/v1` |
| Publishing / device-login user APIs | `https://omnimux.ai` (access token + `New-Api-User`)    |

Do not mix the two credential surfaces.

## 401 / 403 / 402 / 429

| Status  | Typical cause                             |
| ------- | ----------------------------------------- |
| **401** | Missing/invalid Bearer token              |
| **403** | Model or group not allowed for this token |
| **402** | Insufficient quota on pre-consume         |
| **429** | Rate limited                              |

## Account quota errors on OpenAI text endpoints

`POST /v1/completions`, `/v1/chat/completions`, `/v1/responses`, and `/v1/responses/compact` return **402** with `error.type` and `error.code` set to `insufficient_quota` when the local account balance or subscription quota cannot cover pre-consume. This includes zero balance and a positive balance below the required amount.

```json theme={null}
{
  "error": {
    "message": "insufficient_quota: Account balance or subscription quota is insufficient for this request. 用户余额或订阅额度不足，无法完成此次请求。 (request id: ...)",
    "type": "insufficient_quota",
    "param": "",
    "code": "insufficient_quota"
  }
}
```

A streaming request receives the same JSON error **before** an SSE stream starts. Treat this as a terminal quota failure: check the account balance or subscription allowance before trying again. Do not refresh credentials, switch channels, or retry with backoff solely because of this response. The message includes a request ID; detailed quota amounts remain in server diagnostics.

This normalization is limited to local account-quota failures on these endpoints. Token validity/quota errors, upstream provider errors, and other API protocols keep their existing contracts. A genuine 401 or permission 403 still requires an authentication/access check; an ordinary 429 remains a rate-limit response.

## Unexpected content

* Use live model ids
* Chat needs valid `messages`; social-data needs business fields
* Video poll: `GET /v1/video/generations/{task_id}` only — not `/v1/videos/*/content` for Omni Flash / MiniMax creates

## Cannot connect

* Firewall/proxy TLS to `api.omnimux.ai`
* Many OpenAI SDKs need base ending with `/v1`
* Probe with `GET /v1/models`
