ReplicateDocument to textComing soon
datalab-to/ocr
datalab-to/ocr is a document to text tool from Replicate that runs in the background and returns structured JSON. Coming soon: listed with its price, not yet open to runs.
This tool is listed but not yet available to run.
Priced by usagePricing
$2.60 per 1,000 pages. Measured from the input file.
Limits
- Runs
- In the background
- Returns
- json
- Longest queue wait
- 3600s
- Run deadline
- 1800s
- Largest inline input
- 1024 KB
- Largest input file
- 500 MB
- Largest output
- 4768 MB
- Outputs per run
- 16
Input
| Field | Kind | Default | Description |
|---|---|---|---|
file required | text | — | Input file. Must be one of: .pdf, .doc, .docx, .ppt, .pptx, .png, .jpg, .jpeg, .webp |
max_pages | number (whole) 1 to … | — | Maximum number of pages to process. Cannot be specified if page_range is set - these parameters are mutually exclusive |
visualize | true or false | false | Draw red polygons on the input image(s) to visualize detected text regions and return the annotated images |
page_range | text | — | Page range to parse, comma separated like 0,5-10,20. Example: '0,2-4' will process pages 0, 2, 3, and 4. Cannot be specified if max_pages is set - these parameters are mutually exclusive |
skip_cache | true or false | false | Bypass the server-side cache and force re-processing. By default, identical requests are cached to save time and cost. Enable this to get fresh results |
return_pages | true or false | false | Return detailed page information including text lines, bounding boxes, polygons, and character-level data. When disabled, only text and page_count will be returned |
Same request in code
curl https://api.spiral.ai/v1/runs \
-H "Authorization: Bearer $SPIRAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"provider": "replicate",
"model": "datalab-to/ocr",
"input": {
"file": "<file>"
}
}'