# 用户存储配额查询 API Documentation

> 查询当前 API Key 用户的存储免费额度、已用与超额。需实名认证。免费默认 100MB；超出按每 10MB = 1 算力（上传时计费）。查询不扣点。

## Overview

This document describes how to call the **用户存储配额查询** API.

- **Model / path slug**: `file/quota`
- **Task type**: `sync` (`sync` = synchronous, `async` = create task then poll / callback)
- **HTML docs**: `/doc/50`

## Authentication

All API requests require your platform API key as the query parameter `key`:

```
?key=YOUR_API_KEY
```

Get API Key:
1. Sign in to the console
2. Open [API Key Management](/user/key) and create or copy your key
3. Append `key=YOUR_API_KEY` to the request URL (or pass it in form/JSON when the endpoint accepts it)

---

## API Information

- **URL**: `GET https://xiaoapis.com/api/file/quota`
- **Content-Type**: `application/json` (request body commonly `application/json` or `application/x-www-form-urlencoded` for POST)
- **HTTP Method**: `GET`

### Request Example

```
https://xiaoapis.com/api/file/quota?key=你的密钥
```

## Details

## 接口说明：

返回 storage_quota / storage_used / storage_remain（字节）及人类可读字段。免费默认 500MB。

## Response Example

```json
{
    "code": 200,
    "msg": "查询成功",
    "data": {
        "storage_quota": 524288000,
        "storage_used": 0,
        "storage_remain": 524288000,
        "storage_quota_human": "500 MB",
        "file_count": 0
    }
}
```

## Error Codes

| 状态码 | 说明 |
| --- | --- |
| 200 | 成功 |
| 401/403 | 密钥无效 |

## Usage Flow

1. Obtain your API Key from the console
2. Call the endpoint with `key` and required parameters
3. Parse the JSON (or binary) response according to the examples above

---

_Generated for AI / LLM consumption. Source of truth: `api_list` (same as HTML `/doc/{id}`)._
