---
title: AI Image Optical Character Recognition (OCR) API
slug: extract-text-from-image
url: https://apyhub.com/apyhub/service/extract-text-from-image
provider: ApyHub
categories: [Artificial Intelligence, Data Extraction, Image Processing]
tags: [image, ocr, ai]
auth: api_key
---

# AI Image Optical Character Recognition (OCR) API

Extract text from image files or image URLs. Returns structured OCR output via Azure Vision Read API or ApyHub OCR for parsing and indexing.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/ai/image/ocr/file` | What it does Uploads an image file and extracts text from it. The response returns a data object co… | 500 |
| POST | `/ai/image/ocr/url` | What it does Extracts text from an image located at a URL and returns the OCR result in a data obje… | 500 |

## About

## What it does
Image Text Extraction turns an image into text. Send a file upload or an image URL, optionally include a BCP-47 `language` code, and get extracted text back in `data.azure` or `data.apyhub` depending on the service you request.

Use the `/file` endpoint when you already have the image in your request body. Use `/url` when the image lives at a public URI. Both endpoints accept `requested_service` with `azure` or `apyhub`, so you can route OCR through Azure Vision Read API or ApyHub OCR. The file upload endpoint also supports Azure-specific credential fields in the body, and the URL endpoint accepts an `azure` object with custom Azure credentials.

This is a fit for receipt capture, document indexing, screenshot parsing, and any workflow where you need machine-readable text from an image. The response is structured, so you can pass the extracted text into search, review, classification, or downstream validation steps without manual copying.

| Provider (requested_service) | Atoms |
|------------------------------|------:|
| Azure                        |   500 |
| ApyHub                       |  2000 |

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/apyhub/service/extract-text-from-image
