---
title: "AI10 Generate an OCR recognition task"
method: POST
path: "/ai/ocr/task/create"
tags: ["Patsnap OCR"]
---

# AI10 Generate an OCR recognition task

`POST /ai/ocr/task/create`

## Request

- Base URL: `https://connect.patsnap.com`
- URL: `https://connect.patsnap.com/ai/ocr/task/create`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/docs/ai/ocr/task/create/post.ts> (a function with typed inputs; its response is checked against the schema)

This interface provides the task of creating and downloading OCR recognition, generating jobs_id, through jobs_id  Go to "[AI10] query and export the OCR recognition results".
OCR recognition supports recognizing numbers, text information, table contents, and more in images or scanned PDF files. Additionally, it can analyze the layout and provide OCR recognition results in multiple formats that closely resemble the structure of the original document.

## Request body

- AI10TaskCreateRequest
  - `document` string, required: The images or scanned PDF files that require OCR recognition.
  - `document_type` string, required: The types of files that require OCR include: pdf, png, jpg.
  - `ocr_format` string, required: Search for the type of OCR recoginition results, doc/html/xls/ppt/txt
  - `document_lang` unknown[]: <p>Language(s) of the text in the file to be recognized for OCR (multiple selections allowed), for example:</p><p>Simplified Chinese</p><p>Abkhaz</p><p>Adyghe</p><p>Afrikaans</p><p>Agul</p><p>Albanian</p><p>Altai</p><p>Arabic (Saudi Arabia)</p><p>Armenian (Eastern)</p><p>Armenian (Western)</p><p>Armenian (Grabar)</p><p>Avar</p><p>Aymara</p><p>Azeri (Cyrillic)</p><p>Azeri (Latin)</p><p>Bashkir</p><p>Basque</p><p>Belarusian</p><p>Bemba</p><p>Blackfoot</p><p>Breton</p><p>Bugotu</p><p>Bulgarian</p><p>Buryat</p><p>Catalan</p><p>Cebuano</p><p>Chamorro</p><p>Chechen</p><p>Chinese Traditional</p><p>Chukchee</p><p>Chuvash</p><p>Corsican</p><p>Crimean Tatar</p><p>Croatian</p><p>Crow</p><p>Czech</p><p>Dakota</p><p>Danish</p><p>Dargwa</p><p>Dungan</p><p>Dutch</p><p>Dutch (Belgian)</p><p>English</p><p>Eskimo (Cyrillic)</p><p>Eskimo (Latin)</p><p>Estonian</p><p>Even</p><p>Evenki</p><p>Faroese</p><p>Fijian</p><p>Finnish</p><p>French</p><p>Frisian</p><p>Friulian</p><p>Gagauz</p><p>Galician</p><p>Ganda</p><p>German</p><p>German (Luxembourg)</p><p>German (New Spelling)</p><p>Greek</p><p>Guarani</p><p>Hani</p><p>Hausa</p><p>Hawaiian</p><p>Hebrew</p><p>Hungarian</p><p>Icelandic</p><p>Indonesian</p><p>Ingush</p><p>Irish</p><p>Italian</p><p>Japanese</p><p>Japanese (Modern)</p><p>Jingpo</p><p>Kabardian</p><p>Kalmyk</p><p>Karachay-balkar</p><p>Karakalpak</p><p>Kashubian</p><p>Kawa</p><p>Kazakh</p><p>Khakass</p><p>Khanty</p><p>Kikuyu</p><p>Kirghiz</p><p>Kongo</p><p>Korean</p><p>Korean (Hangul)</p><p>Koryak</p><p>Kpelle</p><p>Kumyk</p><p>Kurdish</p><p>Lak</p><p>Latin</p><p>Latvian</p><p>Latvian Gothic</p><p>Lezgi</p><p>Lithuanian</p><p>Luba</p><p>Macedonian</p><p>Malagasy</p><p>Malay (Malaysian)</p><p>Malinke</p><p>Maltese</p><p>Mansi</p><p>Maori</p><p>Mari</p><p>Maya</p><p>Miao</p><p>Minangkabau</p><p>Mohawk</p><p>Mongol</p><p>Mordvin</p><p>Nahuatl</p><p>Nenets</p><p>Nivkh</p><p>Nogay</p><p>Norwegian</p><p>Norwegian (Bokmal)</p><p>Norwegian (Nynorsk)</p><p>Nyanja</p><p>Occitan</p><p>Ojibway</p><p>Old English</p><p>Old French</p><p>Old German</p><p>Old Italian</p><p>Old Slavonic</p><p>Old Spanish</p><p>Ossetian</p><p>Papiamento</p><p>Polish</p><p>Portuguese</p><p>Portuguese (Brazilian)</p><p>Quechua (Bolivia)</p><p>Rhaeto-Romanic</p><p>Romanian</p><p>Romanian (Moldova)</p><p>Romany</p><p>Rundi</p><p>Russian</p><p>Russian (Old Spelling)</p><p>Russian with stress marks</p><p>Rwanda</p><p>Sami (Lappish)</p><p>Samoan</p><p>Scottish Gaelic</p><p>Selkup</p><p>Serbian (Cyrillic)</p><p>Serbian (Latin)</p><p>Shona</p><p>Slovak</p><p>Slovenian</p><p>Somali</p><p>Sorbian</p><p>Sotho</p><p>Spanish</p><p>Sunda</p><p>Swahili</p><p>Swazi</p><p>Swedish</p><p>Tabasaran</p><p>Tagalog</p><p>Tahitian</p><p>Tajik</p><p>Tatar</p><p>Thai</p><p>Tok Pisin</p><p>Tongan</p><p>Tswana</p><p>Tun</p><p>Turkish</p><p>Turkmen (Cyrillic)</p><p>Turkmen (Latin)</p><p>Tuvinian</p><p>Udmurt</p><p>Uighur (Cyrillic)</p><p>Uighur (Latin)</p><p>Ukrainian</p><p>Uzbek (Cyrillic)</p><p>Uzbek (Latin)</p><p>Vietnamese</p><p>Welsh</p><p>Wolof</p><p>Xhosa</p><p>Yakut</p><p>Yiddish</p><p>Zapotec</p><p>Zulu</p><p>Note: Default is "Simplified Chinese; Numbers; English."</p>
    - unknown

## Response `200`

Successful ai10 generate an ocr recognition task response.

- AI10TaskCreateResponse
  - `data` AI10TaskCreateOcrJobResponse
    - `job_id` string: export OCR recognition result task id.
  - `status` boolean, required: Status
  - `error_msg` string: Error Message
  - `error_code` integer, required: Error Code

## Other responses

- `201`: Created.
- `401`: Unauthorized.
- `403`: Forbidden.
- `404`: Not Found.

---

[API](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api.md) - [All operations](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/revisions/c2264a0de595?raw)
