Extract text from an image
Creates a task to extract text from a specified image file.
API Key for authentication
In: header
The id of the file or task to operate on.
The URL to call when the task is completed or failed. If you want to receive events, you probably prefer to use webhooks
instead.
uri
The format of the text to be extracted.
The id of the file or task to operate on.
The URL to call when the task is completed or failed. If you want to receive events, you probably prefer to use webhooks
instead.
uri
The format of the text to be extracted.
The id of the file or task to operate on.
The URL to call when the task is completed or failed. If you want to receive events, you probably prefer to use webhooks
instead.
uri
The format of the text to be extracted.
The id of the file or task to operate on.
The URL to call when the task is completed or failed. If you want to receive events, you probably prefer to use webhooks
instead.
uri
The format of the text to be extracted.
An OpenAPI schema object describing the expected JSON structure. Required if format is 'json'.
Response Body
curl -X POST "https://api.scan-documents.com/v1/image-operations/extract-text" \ -H "Content-Type: application/json" \ -d '{ "input": "file_avyrvozb9302uwhq", "format": "plain" }'
{
"id": "task_euyrvozb9302uwhq",
"operation": "extract-text",
"parameters": {
"input": "file_avyrvozb9302uwhq",
"callback_url": "https://example.com/callback",
"format": "plain"
},
"status": "completed",
"result": {
"format": "plain",
"content": "This is a sample text extracted from an image."
},
"callback_url": "https://example.com/callback",
"created_at": "2021-05-01T12:00:00Z",
"updated_at": "2021-05-01T12:00:00Z"
}
{
"type": "https://scan-documents.com/docs/errors/not-found",
"title": "Not Found",
"status": 404,
"message": "{resource} with id {id} not found."
}
{
"type": "https://scan-documents.com/docs/errors/validation-error",
"title": "Validation Error",
"status": 422,
"errors": {
"{field}": [
"{error}."
]
}
}
{
"type": "https://scan-documents.com/docs/errors/rate-limit-error",
"title": "Rate Limit Exceeded",
"status": 429,
"message": "Rate limit exceeded. Please try again later or contact support."
}
{
"type": "https://scan-documents.com/docs/errors/internal-error",
"title": "An unexpected error occurred. Contact support if the problem persists.",
"status": 500,
"message": "An unexpected error occurred. Contact support if the problem persists."
}