ocr
Ocr
OCR endpoint for extracting text from documents and images.
Supports two input modes:
1. JSON body (Mistral OCR API compatible):
curl -X POST "http://localhost:4000/v1/ocr" -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H "Content-Type: application/json" -d '{
"model": "mistral-ocr",
"document": {
"type": "document_url",
"document_url": "https://arxiv.org/pdf/2201.04234"
}
}'
2. Multipart form file upload:
curl -X POST "http://localhost:4000/v1/ocr" -H "Authorization: Bearer $LITELLM_MASTER_KEY" -F "model=mistral-ocr" -F "file=@document.pdf"
Response format is normalized to the LiteLLM OCR schema by default. Providers that support it (Azure Document Intelligence) can return their own payload instead, with cost tracking unchanged, via x-req-format: native (or "req_format": "native" in the body).
post/ocr
Request
- Base URL: https://docs.litellm.com.cn (the document declares no server; this is the origin it was published from)
- URL: https://docs.litellm.com.cn/ocr
- Auth: API key in header x-litellm-api-key
Response
Successful Response
unknown required
Changes
No recorded changes to this operation across all 1 revision of this API.