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

# 查询余额

> 查询余额

* 账户管理用户 API
* 鉴权多为 access token + `New-Api-User`（设备码流程见对应页）

## 身份

| 字段 | 值       |
| -- | ------- |
| 系列 | 账户管理    |
| 能力 | 查询余额与资料 |

## 接口

| 方法    | 路径               |
| ----- | ---------------- |
| `GET` | `/api/user/self` |

Base URL：`https://omnimux.ai`

## 鉴权

| 名称              | 位置     | 类型     | 必填 | 说明                                       |
| --------------- | ------ | ------ | -- | ---------------------------------------- |
| `Authorization` | header | string | 是  | `Bearer <access_token>`（用户 access token） |
| `New-Api-User`  | header | string | 是  | 当前用户 id                                  |

## 请求体 / 参数

以右栏 cURL 与线上为准。

## 响应

### 200

成功时返回账户相关字段（如 `quota` / `used_quota`）。错误见右栏与 [错误码](/zh/faqs/connection-usage)。

<Panel>
  <RequestExample>
    ```bash curl --request GET \ theme={null}
      --url https://omnimux.ai/api/user/self \
      --header 'Authorization: Bearer <access_token>' \
      --header 'New-Api-User: <user_id>'
    ```
  </RequestExample>

  <ResponseExample>
    ```json 200 theme={null}
    {
      "success": true,
      "data": {
        "id": 1,
        "username": "demo",
        "quota": 5000000,
        "used_quota": 120000
      }
    }
    ```

    ```json 401 theme={null}
    { "success": false, "message": "Unauthorized" }
    ```

    ```json 402 theme={null}
    {
      "success": false,
      "message": "Insufficient quota. Please top up your account."
    }
    ```
  </ResponseExample>
</Panel>
