OCR model
Read the text in photos, scans and screenshots.
assetfeed-ocr-v1
Reading text from images
Our own OCR model. Send images to the chat endpoint and you get back the text in them.
- Model ID
- assetfeed/assetfeed-ocr-v1
- Endpoint
- POST /chat/completions with images as URLs or base64
- Limits
- Up to 8 images per request, each up to 15 MB
- Output
- The text found in the images, as plain text. The prompt text is ignored.
- Scripts
- Latin, Cyrillic, Arabic, Hebrew, Devanagari, Bengali, Gujarati, Ethiopic, Korean, Chinese and Japanese
- Price
- 1 credit per 4 imagesOn the Free plan: 1 credit per 2 images
Use your AssetFeed API key. Get an API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | assetfeed/assetfeed-ocr-v1 |
| messages | object[] | Yes | A user message whose content has 1 to 8 image_url parts. Each url is an http(s) link or a base64 data URL (PNG, JPEG, WebP or GIF). |
Example request
curl -X POST "https://api.assetfeed.com/api/v1/models/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "assetfeed/assetfeed-ocr-v1",
"messages": [
{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": "https://example.com/receipt.jpg"}}
]
}
]
}'Example response
{
"id": "chatcmpl-123",
"object": "chat.completion",
"model": "assetfeed/assetfeed-ocr-v1",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Coffee shop\nLatte 4.50\nTotal 4.50"
},
"finish_reason": "stop"
}
]
}