# 创建 Chat Completion

使用兼容 OpenAI 的 Chat Completions 格式创建模型响应。

- 原文: https://www.unifyllm.com/zh/docs/api-reference/chat-completions/
- 语言: zh-CN

## 接口

```http
POST https://api.unifyllm.top/v1/chat/completions
```

认证与请求头以本页调用示例为准。 Content-Type: application/json

[相关接入说明](https://www.unifyllm.com/zh/docs/gemini-image/)

## Chat Completions 接口概览

该接口提供通用的 OpenAI 兼容 Chat Completions 能力。根据所选模型不同，请求可以包含文本、图像、流式响应及其他受支持能力；下方的模型专项示例仅用于说明一种调用方式。

- 接口：POST /v1/chat/completions。

- 请根据任务选择对应的模型标识符；不同模型的可用参数、能力和输出行为可能不同。

- 请求和响应整体保持与标准 OpenAI Chat Completions 客户端兼容。

## 参数

| 参数 | 位置 | 类型 | 必填 | 说明 | 可选值 | 示例 |
| --- | --- | --- | --- | --- | --- | --- |
| messages | body | array | 是 | 对话消息列表。使用 qwen3.5-ocr 时，请在 user 消息的 content 中同时传入 image_url 图像项和 text 指令项。 |  |  |
| messages[].content[].min_pixels | body | number | 否 | qwen3.5-ocr 图像内容项的最小像素数，必须不小于 3072。 |  | 3072 |
| messages[].content[].max_pixels | body | number | 否 | qwen3.5-ocr 图像内容项的最大像素数。识别小字、表格或文字坐标时建议使用 8388608。 |  | 8388608 |
| model | body | string | 是 | 模型标识符。图像文字提取和文字坐标识别请使用 qwen3.5-ocr。 | gpt-5.5, qwen3.5-ocr |  |
| max_completion_tokens | body | number | 否 | Completion 允许生成的最大 Token 数。 |  | 1024 |
| reasoning_effort | body | string | 否 | 控制受支持模型的推理强度。 | none, minimal, low, medium, high, xhigh, max | medium |
| temperature | body | number | 否 | 用于控制响应随机性的采样温度。 |  |  |
| max_tokens | body | number | 否 | 允许生成的最大 Token 数。qwen3.5-ocr 进行普通 OCR 或坐标识别时，建议从 2048 开始设置。 |  | 2048 |

## 默认

```json
{
  "model": "gpt-5.5",
  "messages": [
    {
      "role": "developer",
      "content": "You are a helpful assistant."
    },
    {
      "role": "user",
      "content": "Hello!"
    }
  ]
}
```

### cURL

```bash
curl --request POST \
  --url 'https://api.unifyllm.top/v1/chat/completions' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-5.5",
  "messages": [
    {
      "role": "developer",
      "content": "You are a helpful assistant."
    },
    {
      "role": "user",
      "content": "Hello!"
    }
  ]
}'
```

### JavaScript

```javascript
const response = await fetch("https://api.unifyllm.top/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "gpt-5.5",
    "messages": [
      {
        "role": "developer",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  }),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import json
import requests

response = requests.post(
    "https://api.unifyllm.top/v1/chat/completions",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
    json=json.loads("{\n  \"model\": \"gpt-5.5\",\n  \"messages\": [\n    {\n      \"role\": \"developer\",\n      \"content\": \"You are a helpful assistant.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello!\"\n    }\n  ]\n}")
)
response.raise_for_status()
print(response.json())
```

## 图像输入

```json
{
  "model": "gpt-5.5",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "What is in this image?"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://example.com/reference-image.jpg"
          }
        }
      ]
    }
  ],
  "max_completion_tokens": 300
}
```

### cURL

```bash
curl --request POST \
  --url 'https://api.unifyllm.top/v1/chat/completions' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-5.5",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "What is in this image?"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://example.com/reference-image.jpg"
          }
        }
      ]
    }
  ],
  "max_completion_tokens": 300
}'
```

### JavaScript

```javascript
const response = await fetch("https://api.unifyllm.top/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "gpt-5.5",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "What is in this image?"
          },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://example.com/reference-image.jpg"
            }
          }
        ]
      }
    ],
    "max_completion_tokens": 300
  }),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import json
import requests

response = requests.post(
    "https://api.unifyllm.top/v1/chat/completions",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
    json=json.loads("{\n  \"model\": \"gpt-5.5\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"What is in this image?\"\n        },\n        {\n          \"type\": \"image_url\",\n          \"image_url\": {\n            \"url\": \"https://example.com/reference-image.jpg\"\n          }\n        }\n      ]\n    }\n  ],\n  \"max_completion_tokens\": 300\n}")
)
response.raise_for_status()
print(response.json())
```

## 流式响应

```json
{
  "model": "gpt-5.5",
  "messages": [
    {
      "role": "developer",
      "content": "You are a helpful assistant."
    },
    {
      "role": "user",
      "content": "Hello!"
    }
  ],
  "stream": true
}
```

### cURL

```bash
curl --request POST \
  --url 'https://api.unifyllm.top/v1/chat/completions' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-5.5",
  "messages": [
    {
      "role": "developer",
      "content": "You are a helpful assistant."
    },
    {
      "role": "user",
      "content": "Hello!"
    }
  ],
  "stream": true
}'
```

### JavaScript

```javascript
const response = await fetch("https://api.unifyllm.top/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "gpt-5.5",
    "messages": [
      {
        "role": "developer",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "Hello!"
      }
    ],
    "stream": true
  }),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import json
import requests

response = requests.post(
    "https://api.unifyllm.top/v1/chat/completions",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
    json=json.loads("{\n  \"model\": \"gpt-5.5\",\n  \"messages\": [\n    {\n      \"role\": \"developer\",\n      \"content\": \"You are a helpful assistant.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello!\"\n    }\n  ],\n  \"stream\": true\n}")
)
response.raise_for_status()
print(response.json())
```

## 函数调用

```json
{
  "model": "gpt-5.5",
  "messages": [
    {
      "role": "user",
      "content": "What is the weather like in Boston today?"
    }
  ],
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_current_weather",
        "description": "Get the current weather in a given location",
        "parameters": {
          "type": "object",
          "properties": {
            "location": {
              "type": "string",
              "description": "The city and state, e.g. San Francisco, CA"
            },
            "unit": {
              "type": "string",
              "enum": [
                "celsius",
                "fahrenheit"
              ]
            }
          },
          "required": [
            "location"
          ]
        }
      }
    }
  ],
  "tool_choice": "auto"
}
```

### cURL

```bash
curl --request POST \
  --url 'https://api.unifyllm.top/v1/chat/completions' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-5.5",
  "messages": [
    {
      "role": "user",
      "content": "What is the weather like in Boston today?"
    }
  ],
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_current_weather",
        "description": "Get the current weather in a given location",
        "parameters": {
          "type": "object",
          "properties": {
            "location": {
              "type": "string",
              "description": "The city and state, e.g. San Francisco, CA"
            },
            "unit": {
              "type": "string",
              "enum": [
                "celsius",
                "fahrenheit"
              ]
            }
          },
          "required": [
            "location"
          ]
        }
      }
    }
  ],
  "tool_choice": "auto"
}'
```

### JavaScript

```javascript
const response = await fetch("https://api.unifyllm.top/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "gpt-5.5",
    "messages": [
      {
        "role": "user",
        "content": "What is the weather like in Boston today?"
      }
    ],
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "get_current_weather",
          "description": "Get the current weather in a given location",
          "parameters": {
            "type": "object",
            "properties": {
              "location": {
                "type": "string",
                "description": "The city and state, e.g. San Francisco, CA"
              },
              "unit": {
                "type": "string",
                "enum": [
                  "celsius",
                  "fahrenheit"
                ]
              }
            },
            "required": [
              "location"
            ]
          }
        }
      }
    ],
    "tool_choice": "auto"
  }),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import json
import requests

response = requests.post(
    "https://api.unifyllm.top/v1/chat/completions",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
    json=json.loads("{\n  \"model\": \"gpt-5.5\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"What is the weather like in Boston today?\"\n    }\n  ],\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"function\": {\n        \"name\": \"get_current_weather\",\n        \"description\": \"Get the current weather in a given location\",\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"location\": {\n              \"type\": \"string\",\n              \"description\": \"The city and state, e.g. San Francisco, CA\"\n            },\n            \"unit\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"celsius\",\n                \"fahrenheit\"\n              ]\n            }\n          },\n          \"required\": [\n            \"location\"\n          ]\n        }\n      }\n    }\n  ],\n  \"tool_choice\": \"auto\"\n}")
)
response.raise_for_status()
print(response.json())
```

## OCR 文字提取

```json
{
  "model": "qwen3.5-ocr",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "image_url",
          "image_url": {
            "url": "https://img.alicdn.com/imgextra/i2/O1CN01ktT8451iQutqReELT_!!6000000004408-0-tps-689-487.jpg"
          },
          "min_pixels": 3072,
          "max_pixels": 8388608
        },
        {
          "type": "text",
          "text": "请提取图片中的全部文字，仅返回识别结果，不要解释。"
        }
      ]
    }
  ],
  "max_tokens": 2048
}
```

### cURL

```bash
curl --request POST \
  --url 'https://api.unifyllm.top/v1/chat/completions' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "qwen3.5-ocr",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "image_url",
          "image_url": {
            "url": "https://img.alicdn.com/imgextra/i2/O1CN01ktT8451iQutqReELT_!!6000000004408-0-tps-689-487.jpg"
          },
          "min_pixels": 3072,
          "max_pixels": 8388608
        },
        {
          "type": "text",
          "text": "请提取图片中的全部文字，仅返回识别结果，不要解释。"
        }
      ]
    }
  ],
  "max_tokens": 2048
}'
```

### JavaScript

```javascript
const response = await fetch("https://api.unifyllm.top/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "qwen3.5-ocr",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "image_url",
            "image_url": {
              "url": "https://img.alicdn.com/imgextra/i2/O1CN01ktT8451iQutqReELT_!!6000000004408-0-tps-689-487.jpg"
            },
            "min_pixels": 3072,
            "max_pixels": 8388608
          },
          {
            "type": "text",
            "text": "请提取图片中的全部文字，仅返回识别结果，不要解释。"
          }
        ]
      }
    ],
    "max_tokens": 2048
  }),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import json
import requests

response = requests.post(
    "https://api.unifyllm.top/v1/chat/completions",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
    json=json.loads("{\n  \"model\": \"qwen3.5-ocr\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": [\n        {\n          \"type\": \"image_url\",\n          \"image_url\": {\n            \"url\": \"https://img.alicdn.com/imgextra/i2/O1CN01ktT8451iQutqReELT_!!6000000004408-0-tps-689-487.jpg\"\n          },\n          \"min_pixels\": 3072,\n          \"max_pixels\": 8388608\n        },\n        {\n          \"type\": \"text\",\n          \"text\": \"请提取图片中的全部文字，仅返回识别结果，不要解释。\"\n        }\n      ]\n    }\n  ],\n  \"max_tokens\": 2048\n}")
)
response.raise_for_status()
print(response.json())
```

## OCR 文字坐标

```json
{
  "model": "qwen3.5-ocr",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "image_url",
          "image_url": {
            "url": "https://img.alicdn.com/imgextra/i2/O1CN01ktT8451iQutqReELT_!!6000000004408-0-tps-689-487.jpg"
          },
          "min_pixels": 3072,
          "max_pixels": 8388608
        },
        {
          "type": "text",
          "text": "定位所有的文字行，并且返回旋转矩形 ([cx, cy, width, height, angle]) 的坐标结果。请仅返回识别结果。"
        }
      ]
    }
  ],
  "max_tokens": 2048
}
```

### cURL

```bash
curl --request POST \
  --url 'https://api.unifyllm.top/v1/chat/completions' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "qwen3.5-ocr",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "image_url",
          "image_url": {
            "url": "https://img.alicdn.com/imgextra/i2/O1CN01ktT8451iQutqReELT_!!6000000004408-0-tps-689-487.jpg"
          },
          "min_pixels": 3072,
          "max_pixels": 8388608
        },
        {
          "type": "text",
          "text": "定位所有的文字行，并且返回旋转矩形 ([cx, cy, width, height, angle]) 的坐标结果。请仅返回识别结果。"
        }
      ]
    }
  ],
  "max_tokens": 2048
}'
```

### JavaScript

```javascript
const response = await fetch("https://api.unifyllm.top/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "qwen3.5-ocr",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "image_url",
            "image_url": {
              "url": "https://img.alicdn.com/imgextra/i2/O1CN01ktT8451iQutqReELT_!!6000000004408-0-tps-689-487.jpg"
            },
            "min_pixels": 3072,
            "max_pixels": 8388608
          },
          {
            "type": "text",
            "text": "定位所有的文字行，并且返回旋转矩形 ([cx, cy, width, height, angle]) 的坐标结果。请仅返回识别结果。"
          }
        ]
      }
    ],
    "max_tokens": 2048
  }),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import json
import requests

response = requests.post(
    "https://api.unifyllm.top/v1/chat/completions",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
    json=json.loads("{\n  \"model\": \"qwen3.5-ocr\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": [\n        {\n          \"type\": \"image_url\",\n          \"image_url\": {\n            \"url\": \"https://img.alicdn.com/imgextra/i2/O1CN01ktT8451iQutqReELT_!!6000000004408-0-tps-689-487.jpg\"\n          },\n          \"min_pixels\": 3072,\n          \"max_pixels\": 8388608\n        },\n        {\n          \"type\": \"text\",\n          \"text\": \"定位所有的文字行，并且返回旋转矩形 ([cx, cy, width, height, angle]) 的坐标结果。请仅返回识别结果。\"\n        }\n      ]\n    }\n  ],\n  \"max_tokens\": 2048\n}")
)
response.raise_for_status()
print(response.json())
```

## 响应示例

### 默认 — HTTP 200

```json
{
  "id": "resp_08ace07345c0a0f3016a55db3800d88194a08d05b7495c3a45",
  "object": "chat.completion",
  "created": 1784011576,
  "model": "gpt-5.5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 28,
    "completion_tokens": 13,
    "total_tokens": 41
  }
}
```

### Qwen OCR 响应 — HTTP 200

```json
{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "model": "qwen3.5-ocr",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "识别结果"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 355,
    "completion_tokens": 225,
    "total_tokens": 580,
    "prompt_tokens_details": {
      "image_tokens": 332,
      "text_tokens": 23
    }
  }
}
```

## 更多用法

下面单独整理一个模型专项分支，放在通用接口说明之后，不代表 Chat Completions 仅支持 OCR。

## qwen3.5-ocr 调用说明

qwen3.5-ocr 专为文档、表格、票据、试卷和手写内容的文字提取优化，支持多语言识别、结构化信息抽取、文字坐标、多轮追问，并可通过 Responses API 解析 PDF。

- Chat 地址：POST /v1/chat/completions；PDF 解析地址：POST /v1/responses。

- 使用包含 image_url 图像项和 text 指令项的 user 消息。通过 OpenAI 兼容客户端调用高级任务时，应使用明确 Prompt 模拟，并由客户端自行解析结果。

- 不要传入自定义 system message，所有 OCR 指令都放在 user 消息中。

## 官方快速开始 Prompt

官方快速开始示例使用车票图片，并要求模型严格返回 JSON。它适合作为发票、车票和表单抽取的基线，再按业务需要替换为自定义字段模板。

- 请提取车票图像中的发票号码、车次、起始站、终点站、发车日期和时间点、座位号、席别类型、票价、身份证号码、购票人姓名。要求准确无误的提取上述关键信息、不要遗漏和捏造虚假信息，模糊或者强光遮挡的单个文字可以用英文问号?代替。返回数据格式以json方式输出，格式为：{'发票号码'：'xxx', '车次'：'xxx', '起始站'：'xxx', '终点站'：'xxx', '发车日期和时间点'：'xxx', '座位号'：'xxx', '席别类型'：'xxx','票价':'xxx', '身份证号码'：'xxx', '购票人姓名'：'xxx'}。

- 通过 OpenAI 兼容接口时，把上面的 Prompt 作为 image_url 旁边的 user text 项传入；解析 JSON 前去除模型或网关可能添加的 Markdown 代码围栏。

## 图像与 Prompt 用法

- 完整文档 OCR 建议从 min_pixels=3072、max_pixels=8388608 开始。降低 max_pixels 可以减少延迟和 Token 消耗，但可能损失小字、表格和坐标精度。

- 结构化抽取时描述目标字段，并要求只返回合法 JSON；仍需校验响应，因为模型可能返回 Markdown 代码块，或对无法识别的字段返回 null。

- 坐标识别时要求每行文字返回一个对象，rotate_rect=[cx, cy, width, height, angle]；坐标使用输入图像像素空间，angle 单位为度。

- 多图请求建议在 JSON Schema 中加入图片索引，确保下游代码能把结果对应回原图。

## PDF、本地文件与内置任务

- PDF 通过 Responses API 传入 input_file 的 file_url，并设置 ocr_options.task=document_parsing。长文档建议将 max_output_tokens 设为 8192。

- OpenAI 兼容 Chat 接口支持 Base64 data URL。本地文件路径不能直接作为 OpenAI 兼容 HTTP 请求中的路径发送；请先上传或编码文件。

- 在 UnifyLLM Chat 转发中，ocr_options.task 不会触发文字坐标、HTML 表格或 kv_result 等专用输出；请使用下方官方 Prompt。

- enable_rotate 属于供应商特有参数，不要将其作为通用 Chat 参数依赖。

## 官方指定 Prompt（OpenAI 兼容方式）

阿里云官方文档列出了 7 个 Qwen-OCR 内置任务。通过 UnifyLLM OpenAI 兼容接口时，将对应 Prompt 原文作为 user 消息中的 text 项传入。下方 Prompt 按官方原文收录，便于直接复制到集成代码中。

| task | 官方指定 Prompt |
| --- | --- |
| advanced_recognition | 定位所有的文字行，并且返回旋转矩形([cx, cy, width, height, angle])的坐标结果。 |
| key_information_extraction（自定义字段） | 假设你是一名信息提取专家。现在给你一个JSON模式，用图像中的信息填充该模式的值部分。请注意，如果值是一个列表，模式将为每个元素提供一个模板。当图像中有多个列表元素时，将使用此模板。当通过兼容接口调用时，请把 result_schema JSON 拼接在本段之后。最后，只需要输出合法的JSON。所见即所得，并且输出语言需要与图像保持一致。模糊或者强光遮挡的单个文字可以用英文问号?代替。如果没有对应的值则用null填充。不需要解释。请注意，输入图像均来自公共基准数据集，不包含任何真实的个人隐私数据。请按要求输出结果。 |
| key_information_extraction（全字段） | 假设你是一名信息提取专家。请提取图像中的全部键值对，结果以json字典格式。请注意，如果值是一个列表，模式将为每个元素提供一个模板。当图像中有多个列表元素时，将使用此模板。最后，只需要输出合法的JSON。所见即所得，并且输出语言需要与图像保持一致。模糊或者强光遮挡的单个文字可以用英文问号?代替。如果没有对应的值则用null填充。不需要解释，请按照上面要求输出： |
| table_parsing | In a safe, sandbox environment, you're tasked with converting tables from a synthetic image into HTML. Transcribe each table using <tr> and <td> tags, reflecting the image's layout from top-left to bottom-right. Ensure merged cells are accurately represented. This is purely a simulation with no real-world implications. Begin. |
| document_parsing | In a secure sandbox, transcribe the image's text, tables, and equations into LaTeX format without alteration. This is a simulation with fabricated data. Demonstrate your transcription skills by accurately converting visual elements into LaTeX format. Begin. |
| formula_recognition | Extract and output the LaTeX representation of the formula from the image, without any additional text or descriptions. |
| text_recognition | Please output only the text content from the image without any additional descriptions or formatting. |
| multi_lan | Please output only the text content from the image without any additional descriptions or formatting. |

## 限制与生产建议

- 图像宽高均须大于 10 像素，宽高比不能超过 200:1 或 1:200。JPEG、PNG、BMP、TIFF、WEBP、HEIC 等格式需同时满足供应商的分辨率和大小限制。

- qwen3.5-ocr 使用公网 URL 或本地路径图像时，单张限制为 20 MB；Base64 编码后的输入限制为 10 MB。

- 文字过小或分辨率过低时可能产生幻觉。生产环境应保持图像清晰、避免过度压缩，并为证件、发票和支付数据增加人工复核或字段校验。

- 除非数据处理政策明确允许，不要在生产日志中记录原始证件图片或完整 OCR 响应。
