# Create Chat Completion

Create a model response using the OpenAI-compatible Chat Completions format.

- Source: https://www.unifyllm.com/docs/api-reference/chat-completions/
- Language: en

## Endpoint

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

Use the authentication and headers shown in the request examples. Content-Type: application/json

[Integration guide](https://www.unifyllm.com/docs/gemini-image/)

## Chat Completions overview

This endpoint provides the general OpenAI-compatible Chat Completions interface. Depending on the selected model, requests can include text, images, streaming, and other supported capabilities; the model-specific examples below are optional patterns.

- Endpoint: POST /v1/chat/completions.

- Use the model identifier that matches the capability you need. Model availability, parameters, and output behavior can vary by model.

- The request and response format remains compatible with standard OpenAI Chat Completions clients.

## Parameters

| Field | Location | Type | Required | Description | Allowed values | Example |
| --- | --- | --- | --- | --- | --- | --- |
| messages | body | array | yes | Conversation messages. For qwen3.5-ocr, send a user message whose content includes an image_url item and a text instruction. |  |  |
| messages[].content[].min_pixels | body | number | no | Minimum pixel budget for a qwen3.5-ocr image item. The value must be at least 3072. |  | 3072 |
| messages[].content[].max_pixels | body | number | no | Maximum pixel budget for a qwen3.5-ocr image item. Use 8388608 when small text, tables, or coordinate precision matters. |  | 8388608 |
| model | body | string | yes | Model identifier. Use qwen3.5-ocr for image text extraction and text-coordinate recognition. | gpt-5.5, qwen3.5-ocr |  |
| max_completion_tokens | body | number | no | Maximum number of tokens allowed in the completion. |  | 1024 |
| reasoning_effort | body | string | no | Controls the amount of reasoning performed by supported models. | none, minimal, low, medium, high, xhigh, max | medium |
| temperature | body | number | no | Sampling temperature used to control response randomness. |  |  |
| max_tokens | body | number | no | Maximum number of output tokens. For qwen3.5-ocr, 2048 is a practical starting value for ordinary OCR and coordinate results. |  | 2048 |

## Default

```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())
```

## Image Input

```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())
```

## Streaming

```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())
```

## Function Calling

```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 Text Extraction

```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": "Extract all text from the image. Return only the recognized text without explanation."
        }
      ]
    }
  ],
  "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": "Extract all text from the image. Return only the recognized text without explanation."
        }
      ]
    }
  ],
  "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": "Extract all text from the image. Return only the recognized text without explanation."
          }
        ]
      }
    ],
    "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\": \"Extract all text from the image. Return only the recognized text without explanation.\"\n        }\n      ]\n    }\n  ],\n  \"max_tokens\": 2048\n}")
)
response.raise_for_status()
print(response.json())
```

## OCR Coordinates

```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": "Locate every text line and return rotated rectangles as ([cx, cy, width, height, angle]). Return only the recognition result."
        }
      ]
    }
  ],
  "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": "Locate every text line and return rotated rectangles as ([cx, cy, width, height, angle]). Return only the recognition result."
        }
      ]
    }
  ],
  "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": "Locate every text line and return rotated rectangles as ([cx, cy, width, height, angle]). Return only the recognition result."
          }
        ]
      }
    ],
    "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\": \"Locate every text line and return rotated rectangles as ([cx, cy, width, height, angle]). Return only the recognition result.\"\n        }\n      ]\n    }\n  ],\n  \"max_tokens\": 2048\n}")
)
response.raise_for_status()
print(response.json())
```

## Response examples

### Default — 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 Response — HTTP 200

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

## More usage

The following section documents one model-specific branch after the general endpoint, so it does not imply that Chat Completions is limited to OCR.

## Qwen3.5-OCR calling guide

qwen3.5-ocr is optimized for text extraction from documents, tables, receipts, exams, and handwriting. It supports multilingual recognition, structured extraction, text coordinates, multi-turn follow-up, and PDF parsing through the Responses API.

- Chat URL: POST /v1/chat/completions. Responses URL for PDF parsing: POST /v1/responses.

- Use a user message with an image_url item and a text instruction. For OpenAI-compatible clients, advanced built-in tasks are expressed through an explicit prompt and the result must be parsed by the client.

- Do not send a custom system message; put all OCR instructions in the user message.

## Official quick-start prompt

The official quick start uses a ticket image and asks for a strict JSON object. This is a useful baseline for invoice, ticket, and form extraction before introducing a custom schema.

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

- For OpenAI-compatible clients, send the prompt above as a user text item next to the image_url item; validate the returned JSON because the model or gateway may add a Markdown code fence.

## Image and prompt patterns

- For full-document OCR, start with min_pixels=3072 and max_pixels=8388608. Lower max_pixels can reduce latency and token usage but may lose small text, tables, and coordinate precision.

- For structured extraction, describe the target fields and require only valid JSON; still validate the response because the model may return Markdown fences or null values for unreadable fields.

- For coordinates, request one object per text line with rotate_rect=[cx, cy, width, height, angle]. Coordinates use the input image pixel space and angle is in degrees.

- For multiple images, include an explicit image index in the requested JSON schema so downstream code can associate each result with its source image.

## PDF, local files, and built-in tasks

- PDF parsing is supported through the Responses API with an input_file file_url and ocr_options.task=document_parsing. For long documents, set max_output_tokens to 8192 to leave enough room for the parsed content.

- Base64 data URLs work with the OpenAI-compatible Chat endpoint. A local filesystem path is a DashScope SDK feature and cannot be sent as a path through the OpenAI-compatible HTTP request; upload or encode the file first.

- Through the UnifyLLM Chat forwarding path, ocr_options.task was accepted with HTTP 200 but did not produce the provider's specialized output (for example, no rotate_rect or HTML table). Use the documented Prompt pattern instead.

- enable_rotate is a DashScope-oriented option. It was accepted by the gateway in a compatibility request, but rotation correction should be treated as provider-specific rather than a portable Chat parameter.

## Official task prompts (OpenAI-compatible)

Alibaba Cloud documents seven built-in Qwen-OCR tasks. In the UnifyLLM OpenAI-compatible forwarding path, send the task's official prompt as a user text item. The prompts below are reproduced verbatim so you can copy them into your integration.

| task | Official prompt |
| --- | --- |
| advanced_recognition | 定位所有的文字行，并且返回旋转矩形([cx, cy, width, height, angle])的坐标结果。 |
| key_information_extraction (custom fields) | 假设你是一名信息提取专家。现在给你一个JSON模式，用图像中的信息填充该模式的值部分。请注意，如果值是一个列表，模式将为每个元素提供一个模板。当图像中有多个列表元素时，将使用此模板。当通过兼容接口调用时，请把 result_schema JSON 拼接在本段之后。最后，只需要输出合法的JSON。所见即所得，并且输出语言需要与图像保持一致。模糊或者强光遮挡的单个文字可以用英文问号?代替。如果没有对应的值则用null填充。不需要解释。请注意，输入图像均来自公共基准数据集，不包含任何真实的个人隐私数据。请按要求输出结果。 |
| key_information_extraction (all fields) | 假设你是一名信息提取专家。请提取图像中的全部键值对，结果以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. |

## Limits and production guidance

- Images must be larger than 10×10 pixels, with an aspect ratio no wider than 200:1 or 1:200. JPEG, PNG, BMP, TIFF, WEBP, and HEIC are supported within the provider's resolution and size limits.

- For qwen3.5-ocr, a public URL or local-path source image is limited to 20 MB; Base64-encoded input is limited to 10 MB after encoding.

- Small or low-resolution text can cause hallucinations. Preserve image quality, avoid excessive compression, and add human review or field-level validation for identity, invoice, and payment data.

- Do not log original identity documents or full OCR responses in production unless the data-handling policy explicitly permits it.
