
GLM-OCR
GLM-OCR reads documents in pictures: it writes out the text of a page, tables as HTML and formulas as LaTeX, and can…
Fine-tunableFLORENCE_2_LARGEMicrosoft's Florence-2 Large looks at an image and captions it, reads its text, boxes the objects in it, or finds the things a phrase names.

| Name | Type | Required | Default | Details |
|---|---|---|---|---|
image | file | Yes | — | The image to analyse: PNG, JPEG or WebP, at most 20 MB, 8192 pixels a side and 40 megapixels. image/png, jpeg, webp |
max_new_tokens | integer | No | 1024 | Upper bound on the length of the generated answer. 1–1024 |
task | text | No | caption | caption, detailed_caption or more_detailed_caption describe the image; ocr reads its text and ocr_with_region also boxes each line; object_detection and dense_region_caption box the objects; phrase_grounding boxes the things named in text. Allowed: caption, detailed_caption, more_detailed_caption, ocr, ocr_with_region, object_detection, dense_region_caption, phrase_grounding |
text | text | When task = phrase_grounding | — | Only for phrase_grounding: a caption or phrases naming what to find in the image, without "<". Max 256 characters |
Output. JSON: {"task": ..., "result": ..., "image_size": [width, height]}; result is text for the caption and ocr tasks, {"bboxes": [[x1, y1, x2, y2], ...], "labels": [...]} for the region tasks and {"quad_boxes": [...], "labels": [...]} for ocr_with_region.
Send your API key in the X-API-Key header. The run is asynchronous: submit it, then poll it until it finishes. Create an API key.
curl -X POST "https://api.kainguru.com/api/v1/executions?mlFlowId=FLORENCE_2_LARGE" \
-H "X-API-Key: kg_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"input": {
"image": "https://example.com/input.png",
"max_new_tokens": 1024,
"task": "caption"
},
"outputFormat": "json"
}'
# Poll until the execution reaches a terminal state
curl "https://api.kainguru.com/api/v1/executions/{executionId}" \
-H "X-API-Key: kg_your_api_key"from kainguru import KainguruClient
with KainguruClient(api_key="kg_your_api_key", base_url="https://api.kainguru.com/api") as client:
submitted = client.executions.execute(
"FLORENCE_2_LARGE",
{
"image": "https://example.com/input.png",
"max_new_tokens": 1024,
"task": "caption"
},
output_format="json",
)
result = client.executions.await_completion(submitted.id)
print(result.execution.output)You can fine-tune Florence-2 Large on your own data and run the tuned model through the same API. Dataset: A JSONL manifest plus the images it names, one {"file", "task", "target"} per line; target is text, or {"bboxes" or "quad_boxes": [...], "labels": [...]} in pixels. 4 to 5000 examples, 4 GB in all, 20 MB a file. More limits: Good to know, in the README.
The steps are in the docs.
Price per request: 0.0437 credits ($0.000437). The price is shown again before every run; all prices are on the pricing page.

GLM-OCR reads documents in pictures: it writes out the text of a page, tables as HTML and formulas as LaTeX, and can…
Fine-tunable
Moondream 2 is a small vision model: it answers questions about a picture, writes short, normal or long captions and…
Fine-tunable
Reads the structure of a table in an image, finding its rows, columns, column headers, projected row headers and…
Fine-tunable
Describes a photo in a sentence or answers a question about it in plain English.
Fine-tunable
Finds the layout of a document page, such as text blocks, titles, section headers, tables, pictures, captions…
Fine-tunable
EasyOCR finds the lines of text in a photo or a scan and reads each one, returning every line with its box and its…
Fine-tunable