Extract Text from Images with OCR
Changed onUse specialized OCR vision models to extract and recognize text from images via the OpenAI-compatible chat completions API.
Request
- Base URLhttps://platform.qubrid.com/v1
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"model": "Hunyuan/Hunyuan-OCR-1B",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Extract all text from this image and preserve the layout structure.",
"image_url": {
"url": "https://example.com/document.png"
}
}
]
}
]
}Response
OCR text extraction completed successfully
Example response
{
"id": "chatcmpl-ocr-123456",
"object": "chat.completion",
"created": 1710000000,
"model": "Hunyuan/Hunyuan-OCR-1B",
"choices": [
{
"message": {
"role": "assistant",
"content": "Header: Important Document\n\nSection 1: Introduction\nThis document contains important information...\n\nSection 2: Details\nKey points and data extracted from the image..."
},
"finish_reason": "stop"
}
]
}Changes
- breaking
the
response's property type changed fromstringtoobjectfor status - breaking
the
response's property type changed fromstringtoobjectfor status - breaking
the
response's property type changed fromstringtoobjectfor status - breaking
the
response's property type changed fromstringtoobjectfor status - breaking
the
response's property type changed fromstringtoobjectfor status - breaking
the
response's property type changed fromstringtoobjectfor status - warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
removed the non-success response with the status
- info
removed the non-success response with the status
- info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status
- breaking
- info
api operation id
createVisionCompletionremoved and replaced withcreateOCRCompletion - info
api tag
OCRadded - info
api tag
Visionremoved - info
the
request property default value changed from16384to8192 - info
the
request property default value changed fromtruetofalse
- info