# 二维码生成接口 API Documentation

> 生成指定内容的二维码，识别率高，支持自定义容错级别和大小。

## Overview

This document describes how to call the **二维码生成接口** API.

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

## 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://apis.xiaobao.ink/api/qrcode/get`
- **Content-Type**: `application/json` (request body commonly `application/json` or `application/x-www-form-urlencoded` for POST)
- **HTTP Method**: `GET`

### Request Parameters

| Parameter | Required | Description |
|-----------|----------|-------------|
| `text` | Yes | 二维码内容 |
| `format` | Yes | image 输出的格式类型：默认为空 输出参数，填入：image  直接输出二维码 |

> **Note**: `key` (API key) is required for authenticated calls even if omitted from the parameter list above.

### Request Example

```
https://apis.xiaobao.ink/api/qrcode/get?key=YOUR_API_KEY
```

## Error Codes

| Status / code | Description |
|---------------|-------------|
| 200 / success | Request successful |
| 400 | Invalid request parameters |
| 401 | Authentication failed, please check API Key |
| 402 | Insufficient account balance / points |
| 429 | Request rate limit exceeded |
| 500 | Internal server error |

## 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}`)._
