extract_text
Extracts all visible text from images using OCR. Ideal for screenshots of documents, code, error messages, or any image where text content matters.
Instructions
Extract (OCR) all visible text from an image.
Ideal for screenshots of documents, code, error messages, or any image where the text content matters more than the visual appearance.
Args:
image: The image containing text (file path, URL, or base64).
language_hint: Optional hint about the text language
(e.g. "Chinese", "English", "mixed").
Helps the model focus on the right character set.
Returns: All text found in the image, preserving layout where possible.
Examples: >>> extract_text("/tmp/error_screenshot.png") >>> extract_text("/tmp/receipt.jpg", "Chinese")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | ||
| language_hint | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |