Skip to main content
POST
Document Parsing

Authorizations

x-ti-app-id
string
header
required

Please log in to TextIn and navigate to "Console - API Keys" to view x-ti-app-id

x-ti-secret-code
string
header
required

Please log in to TextIn and navigate to "Console - API Keys" to view x-ti-secret-code

Body

multipart/form-data
file
file

Upload document file, mutually exclusive with file_url

file_url
string

Document URL, mutually exclusive with file

config
object

Parsing configuration parameters

Example:

Response

Parsing Result

code
enum<integer>
required

Status code

  • 200: Success
  • 40101: x-ti-app-id or x-ti-secret-code is empty
  • 40102: x-ti-app-id or x-ti-secret-code is invalid, authentication failed
  • 40103: Client IP is not in the allowlist
  • 40003: Insufficient balance, please recharge before using
  • 40004: Parameter error, please check the technical documentation and verify the parameters
  • 40007: Robot does not exist or is not published
  • 40008: Robot is not activated, please activate it from the market before retrying
  • 40301: Image type not supported
  • 40302: Uploaded file size does not meet requirements, file size must not exceed 500M
  • 40303: File type not supported. The API will return the actual detected file type, e.g., "Current file type is .gif"
  • 40304: Image dimensions do not meet requirements. Images with aspect ratio less than 2 must have width and height between 20-20000 pixels, other images must have width and height between 20-10000 pixels
  • 40305: Recognition file not uploaded
  • 40306: QPS exceeds limit
  • 40307: Daily free quota exhausted
  • 40422: The file is corrupted
  • 40423: Password required or incorrect password
  • 40424: Page number out of range
  • 40425: The input file format is not supported
  • 40427: Input DPI is not in the allowed DPIs list (72,144,216)
  • 40428: Process office file failed or timeout
  • 40429: Unsupported Engine
  • 50207: Partial failed
  • 40400: Invalid request URL, please check if the URL is correct
  • 30203: Basic service failure, please retry later
  • 500: Internal server error
Available options:
200,
40101,
40102,
40103,
40003,
40004,
40007,
40008,
40301,
40302,
40303,
40304,
40305,
40306,
40307,
40422,
40423,
40424,
40425,
40427,
40428,
40429,
50207,
40400,
30203,
500
Example:

200

message
string
required

Status message

Example:

"success"

location
object

Error location information, returned only when parsing errors occur

data
object