Readable Parser
Convert your documents to Markdown [For Free🔥]
v1.0.0
AI is the big thing right now, developers everywhere are tapping into its power to build all sorts of products—think Customer Service Chatbot, Document Helper, FAQ Assistant and Data Analyst. But there’s a hitch: why aren’t these AI responses as accurate as we’d like?
Let's dig into this issue. We give the AI a question and some documents it found through a search. The AI then tries to answer based on those snippets. Sure, having a well-crafted question is important, but the real key is how relevant those documents are. Matching accuracy and logical precision in the text of these similar documents are key.
So, we need a document parser that can help us convert a variety of documents (PDFs, Docs, HTML, Excel, CSV, etc.) into more readable text (like Markdown). This transformation enables AI to produce better answers.
1. Introduction
Extract Tables From Document
We provide the following Free APIs to help you convert various documents into markdown format text.
-
Request Parsing: You can use this API to parse your file or URL. The parsing process is asynchronous. After successful submission, you will receive a unique
task_id
that can be used to query the parsing status and fetch the parsed result. -
Check Parsing Status: With this API, you can check the parsing status of the document with the
task_id
. -
Fetch Parsed Result: After the parsing task is completed, you can fetch the markdown result through this API with the
task_id
.
Document | Supported |
---|---|
✅ | |
Docx | ✅ |
HTML | ✅ |
Excel | ✅ |
CSV | ✅ |
For detailed usage of the API, please refer to the API section below.
2. Auth Token
You can obtain an API Key on the Account page.
Create Your ChatofAI API Key
Remember that your API key is a secret! Do not share it with others or expose it in any client-side code (browsers, apps). Production requests must be routed through your backend server where your API key can be securely loaded from an environment variable or key management service.
All API requests should include your API key in an Authorization HTTP header as follows:
Example curl command:
Example with python
3. API
Base URL
- Production Environment: https://chatof.ai
3.1 Request Parsing
API Parameters
Name | Position | Type | Required | Description |
---|---|---|---|---|
Authorization | header | string | yes | Token, check Auth Token for details |
file | body | string (binary) | no | File, required when type is pdf, docx, csv, excel |
url | body | string | no | URL, required when type is html |
type | body | string | yes | parser type, options: pdf, docx, html, excel, csv |
options | body | string | no | JSON string, see the documentation for supported options |
Response
Response Data Structure
Name | Type | Description |
---|---|---|
code | integer | Status code of the response. |
msg | string | Message describing the status or error. |
data | object | Contains the task details. |
» task_id | string | The unique ID of the parsing task. |
3.2 Check Parsing Status
API Parameters
Name | Position | Type | Required | Description |
---|---|---|---|---|
task_id | query | string | yes | Task ID |
Authorization | header | string | yes | Token, check Auth Token for details |
Response
Response Data Structure
Name | Type | Description |
---|---|---|
code | integer | Status code of the response. |
msg | string | Message describing the status or error. |
data | object | Contains the task details. |
» status | string | Status of the parsing task. Possible values: pending , processing , success , failed . |
» error_msg | string | Error message if the task failed. |
3.3 Fetch Parsed Result
Request Parameters
Name | Position | Type | Required | Description |
---|---|---|---|---|
task_id | query | string | yes | Task ID from Request Parsing |
Authorization | header | string | yes | Token, check Auth Token for details |
Response
Response Data Structure
Name | Type | Description |
---|---|---|
code | integer | Status code of the response. |
msg | string | Message describing the status or error. |
data | object | Contains the parsed markdown details. |
» markdown | string | Parsed Markdown Text. |
4. Limits
There are restrictions on the request frequency to prevent abuse of the interface. You are limited to making 1 request per second and 100 requests per day. If you exceed this limit, your API calls will be restricted. Please note that the rate limit is applied at the user level, rather than the interface level. This means you are not allowed to make more than two simultaneous requests to the interface. If you have higher frequency requirements for your requests, please get in touch with us: support@chatof.ai