Google OCR

When calling the API described on this page, the ID of a specific model is not provided. The request is made solely by specifying the correct method URL and valid parameters.

Model Overview

This API provides a feature to extract characters from images.

Setup your API Key

If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guide.

How to Make a Call

  1. Copy the code from the example below.

  2. Replace <YOUR_AIMLAPI_KEY> with your AIML API key from your personal account.

  3. Replace the URL of the image with the one you need.

  4. If you need to use different parameters, refer to the API schema below for valid values and operational logic.

  5. Save the modified code as a Python file and run it in an or via the console.

API Schema

post
Authorizations
Body
documentany ofRequired
string · uriOptional
or
stringOptional
mimeTypestring · enumOptionalPossible values:
pagesany ofOptional
or
or
or
Responses
201Success
post
POST /v1/ocr HTTP/1.1
Host: api.aimlapi.com
Authorization: Bearer <YOUR_AIMLAPI_KEY>
Content-Type: application/json
Accept: */*
Content-Length: 98

{
  "document": "https://example.com",
  "mimeType": "application/pdf",
  "pages": {
    "type": "start",
    "start": 1
  }
}
201Success

No content

Last updated

Was this helpful?