> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dojah.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Generic OCR Service

> To ensure that your customer provides valid Photo ID, Images, and Documents, you can allow them to upload a photo Id, image, and Document which you can pass on to the Dojah for Generic optical character recognition process

This Easily extract text from images including from those of documents in realtime

Generic optical character recognition is a very useful AI model as it detects & extracts text from all types of images with great accuracy.

### Request

```http [POST] theme={null}
{{baseurl}}/api/v1/ml/ocr/generic
```

### Header

| Header        | Type   | Description                                                                                         |
| ------------- | ------ | --------------------------------------------------------------------------------------------------- |
| AppId         | string | Create an app to get your app ID on dashboard [here](https://app.dojah.io/developers/configuration) |
| Authorization | string | Private/secret key. Use `<key>` not `Bearer <key>`                                                  |

### Body Parameters

|Parameter | Type | Description |
\| --- | --- | --- | --- |
|img *REQUIRED* | string | Base64 value of the image. please do not include the data type example: **data:image/jpeg;base64** |

### Sample response

```json Response theme={null}
{
    "entity": {
        "data": [
            "National Identity Management System",
            "Nimc",
            "Federal Republic of Nigeria",
            "National Identification Number Slip (NINS)",
            "Address:",
            "Tracking ID:",
            "S7Y0NYFD7890123",
            "Surname:",
            "John",
            "26 JOHNSON STREET AGODO AREA",
            "NIN:",
            "70142123456",
            "First Name:",
            "Doe",
            "Issue Date:",
            "26/08/2014",
            "Middle Name: OLA-Doe",
            "IKOTUN EGBE",
            "Gender:",
            "M",
            "Lagos",
            "Note: The National Identification Number (NIN) is your identity. It is confidential and may only be released for legitimate transactions.",
            "You will be notified when your National Identity Card is ready (for any enquiries please contact)",
            "07040144452, 07040144453,",
            "National Identity Management Commission",
            "helpdesk@nimc.gov.ng",
            "www.nimc.gov.ng",
            "07040144454",
            "11. Sokode Crescent, Off Dalaba Street, Zone 5 Wuse, Abuja Nigeria"
        ]
    }
}
```

### Response Fields

| Field       | Type   | Description                                                                                                                                           |
| ----------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| entity      | object | Contains the response data                                                                                                                            |
| entity.data | array  | Ordered list of text strings extracted from the image via OCR. Each element is a distinct text block detected in the image, returned in reading order |
