openapi: 3.2.0 info: title: OCR Features Identity Parser API version: '2.0' description: Your project description servers: - url: https://api.edenai.run/v2 tags: - name: Identity Parser paths: /ocr/identity_parser/: post: operationId: ocr_identity_parser_create description: 'Available Providers |Provider|Model|Version|Price|Billing unit| |----|----|-------|-----|------------| |**amazon**|-|`boto3 (v1.15.18)`|0.025 (per 1 page)|1 page |**base64**|-|`latest`|0.2 (per 1 page)|1 page |**microsoft**|-|`rest API 4.0 (2024-02-29-preview)`|0.01 (per 1 page)|1 page |**mindee**|-|`v2`|0.1 (per 1 page)|1 page |**klippa**|-|`v1`|0.1 (per 1 file)|1 file |**affinda**|-|`v3`|0.07 (per 1 file)|1 file |**openai**|**gpt-4o**|`v1`|0.02 (per 1 page)|1 page Supported Languages |Name|Value| |----|-----| |**Afrikaans**|`af`| |**Albanian**|`sq`| |**Arabic**|`ar`| |**Bengali**|`bn`| |**Bulgarian**|`bg`| |**Chinese**|`zh`| |**Croatian**|`hr`| |**Czech**|`cs`| |**Danish**|`da`| |**Dutch**|`nl`| |**English**|`en`| |**Estonian**|`et`| |**Finnish**|`fi`| |**French**|`fr`| |**German**|`de`| |**Gujarati**|`gu`| |**Hebrew**|`he`| |**Hindi**|`hi`| |**Hungarian**|`hu`| |**Indonesian**|`id`| |**Italian**|`it`| |**Japanese**|`ja`| |**Kannada**|`kn`| |**Korean**|`ko`| |**Latvian**|`lv`| |**Lithuanian**|`lt`| |**Macedonian**|`mk`| |**Malayalam**|`ml`| |**Marathi**|`mr`| |**Modern Greek (1453-)**|`el`| |**Nepali (macrolanguage)**|`ne`| |**Norwegian**|`no`| |**Panjabi**|`pa`| |**Persian**|`fa`| |**Polish**|`pl`| |**Portuguese**|`pt`| |**Romanian**|`ro`| |**Russian**|`ru`| |**Slovak**|`sk`| |**Slovenian**|`sl`| |**Somali**|`so`| |**Spanish**|`es`| |**Swahili (macrolanguage)**|`sw`| |**Swedish**|`sv`| |**Tagalog**|`tl`| |**Tamil**|`ta`| |**Telugu**|`te`| |**Thai**|`th`| |**Turkish**|`tr`| |**Ukrainian**|`uk`| |**Urdu**|`ur`| |**Vietnamese**|`vi`| Supported Detailed Languages |Name|Value| |----|-----| |**Auto detection**|`auto-detect`| |**Chinese (China)**|`zh-cn`| |**Chinese (Taiwan)**|`zh-tw`| |**English (United States)**|`en-US`| |**French (France)**|`fr-FR`| |**German (Germany)**|`de-DE`| |**Italian (Italy)**|`it-IT`| |**Portuguese (Portugal)**|`pt-PT`| |**Spanish (Spain)**|`es-ES`| Supported Models Default Models |Name|Value| |----|-----| |**openai**|`gpt-4o`|' summary: Identity Parser tags: - Identity Parser requestBody: content: application/json: schema: $ref: '#/components/schemas/ocridentity_parserIdentityParserRequest' examples: RequestExample: value: providers: openai,amazon,microsoft,mindee,klippa,base64,affinda file_url: http://edenai-resource-example.pdf summary: Request Example multipart/form-data: schema: $ref: '#/components/schemas/ocridentity_parserIdentityParserRequest' examples: RequestExample: value: providers: openai,amazon,microsoft,mindee,klippa,base64,affinda file: /edenai/edenai/features/ocr/samples/data/passport-US.pdf summary: Request Example required: true security: - FeatureApiAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ocridentity_parserResponseModel' examples: ResponseExample: value: openai: extracted_data: - last_name: value: DOLORES confidence: 0.96 given_names: - value: Jane confidence: 0.97 birth_place: value: null confidence: null birth_date: value: '1985-05-15' confidence: 0.96 issuance_date: value: '2022-01-20' confidence: 0.95 expire_date: value: '2032-01-19' confidence: 0.96 document_id: value: B12345678 confidence: 0.96 issuing_state: value: null confidence: null address: value: null confidence: null age: value: null confidence: null country: name: Canada alpha2: CA alpha3: CAN confidence: null document_type: value: Id confidence: 0.96 gender: value: F confidence: 0.96 image_id: - value: '' confidence: null - value: '' confidence: null image_signature: [] mrz: value: 'I It can be in the following format: {\"google\" : \"google_model\", \"ibm\": \"ibm_model\"...}.\n " providers: type: array items: type: string minLength: 1 description: 'It can be one (ex: **''amazon''** or **''google''**) or multiple provider(s) (ex: **''amazon,microsoft,google''**) that the data will be redirected to in order to get the processed results.
Providers can also be invoked with specific models (ex: providers: **''amazon/model1, amazon/model2, google/model3''**)' fallback_providers: type: array items: type: string default: [] description: "Providers in this list will be used as fallback if the call to provider in `providers` parameter fails.\n To use this feature, you must input **only one** provider in the `providers` parameter. but you can put up to 5 fallbacks.\n\nThey will be tried in the same order they are input, and it will stop to the first provider who doesn't fail.\n\n\n*Doesn't work with async subfeatures.*\n " maxItems: 5 response_as_dict: type: boolean default: true description: "Optional : When set to **true** (default), the response is an object of responses with providers names as keys :
\n ``` {\"google\" : { \"status\": \"success\", ... }, } ```
\n When set to **false** the response structure is a list of response objects :
\n ``` [{\"status\": \"success\", \"provider\": \"google\" ... }, ] ```.
\n " attributes_as_list: type: boolean default: false description: "Optional : When set to **false** (default) the structure of the extracted items is list of objects having different attributes :
\n ```{'items': [{\"attribute_1\": \"x1\",\"attribute_2\": \"y2\"}, ... ]}```
\n When it is set to **true**, the response contains an object with each attribute as a list :
\n ```{ \"attribute_1\": [\"x1\",\"x2\", ...], \"attribute_2\": [y1, y2, ...]}``` " show_base_64: type: boolean default: true show_original_response: type: boolean default: false description: "Optional : Shows the original response of the provider.
\n When set to **true**, a new attribute *original_response* will appear in the response object." file: type: string format: binary description: 'File to analyse in binary format to be used with *content-type*: **multipart/form-data**
**Does not work with application/json !**' file_url: type: - string - 'null' format: uri description: 'File **URL** to analyse to be used with with *content-type*: **application/json**.' file_password: type: - string - 'null' description: If your PDF file has a password, you can pass it here! maxLength: 200 convert_to_pdf: type: - boolean - 'null' default: false description: Boolean value to specify weather to convert the doc/docx files to pdf format to be accepted by a majority of the providers required: - providers ItemIdentityParserDataClass: properties: value: default: null title: Value type: string confidence: default: null title: Confidence type: integer title: ItemIdentityParserDataClass type: object ocridentity_parserIdentityParserDataClass: properties: extracted_data: items: $ref: '#/components/schemas/InfosIdentityParserDataClass' title: Extracted Data type: array original_response: default: null description: original response sent by the provider, hidden by default, show it by passing the `show_original_response` field to `true` in your request title: Original Response status: allOf: - $ref: '#/components/schemas/StatusEnum' title: Status required: - status title: ocridentity_parserIdentityParserDataClass type: object FieldError: type: object properties: : type: array items: type: string required: - StatusEnum: enum: - sucess - fail type: string NotFoundResponse: type: object properties: details: type: string default: Not Found NestedError: type: object properties: type: type: string message: type: string required: - message - type Error: type: object properties: error: $ref: '#/components/schemas/NestedError' required: - error InfosIdentityParserDataClass: properties: last_name: $ref: '#/components/schemas/ItemIdentityParserDataClass' given_names: items: $ref: '#/components/schemas/ItemIdentityParserDataClass' title: Given Names type: array birth_place: $ref: '#/components/schemas/ItemIdentityParserDataClass' birth_date: $ref: '#/components/schemas/ItemIdentityParserDataClass' issuance_date: $ref: '#/components/schemas/ItemIdentityParserDataClass' expire_date: $ref: '#/components/schemas/ItemIdentityParserDataClass' document_id: $ref: '#/components/schemas/ItemIdentityParserDataClass' issuing_state: $ref: '#/components/schemas/ItemIdentityParserDataClass' address: $ref: '#/components/schemas/ItemIdentityParserDataClass' age: $ref: '#/components/schemas/ItemIdentityParserDataClass' country: $ref: '#/components/schemas/Country' document_type: $ref: '#/components/schemas/ItemIdentityParserDataClass' gender: $ref: '#/components/schemas/ItemIdentityParserDataClass' image_id: items: $ref: '#/components/schemas/ItemIdentityParserDataClass' title: Image Id type: array image_signature: items: $ref: '#/components/schemas/ItemIdentityParserDataClass' title: Image Signature type: array mrz: $ref: '#/components/schemas/ItemIdentityParserDataClass' nationality: $ref: '#/components/schemas/ItemIdentityParserDataClass' required: - last_name - birth_place - birth_date - issuance_date - expire_date - document_id - issuing_state - address - age - country - document_type - gender - mrz - nationality title: InfosIdentityParserDataClass type: object Country: properties: name: title: Name type: string alpha2: title: Alpha2 type: string alpha3: title: Alpha3 type: string confidence: default: null title: Confidence type: integer required: - name - alpha2 - alpha3 title: Country type: object NestedBadRequest: type: object properties: type: type: string message: $ref: '#/components/schemas/FieldError' required: - message - type BadRequest: type: object properties: error: $ref: '#/components/schemas/NestedBadRequest' required: - error securitySchemes: FeatureApiAuth: type: http scheme: bearer bearerFormat: JWT