API Quick Start
The SmartDocs AI Studio APIs can be run and tested using Postman. Postman is an API platform for building and using APIs. Follow the steps below to set up the APIs with Postman:
Set Up APIs
Create Project(s) in SmartDocs AI Studio
If you have not had a project in your SmartDocs AI Studio business or you would like to set up another project for testing the APIs, follow this guide to create Project(s).
Create an API key
- Login to SmartDocs AI Studio, navigate to Settings > API keys, click Create API Key
- Select the Project(s) which you would like to link the API key to. Then click "Next".
![](https://files.readme.io/e9c9174-image.png)
-
Enter the expiration date / time and description if necessary. If expiration date / time is provide, the API Key will become inactive automatically when reaching the expiration date / time.
Note
You will need to take note of the API key. It is required for running the APIs later and you will be unable to view the API key again.
Retrieve the Project ID
The Project ID can be obtained from the URL when you are logged in and select a project.
The URL is in this format
<https://doc.com.ai/#/business/${businessId}/project/${projectId}
>
Take note of the Project ID. We will need it for running the APIs later.
Import the Postman collection
Click the button below to import the SmartDocs AI Studio Postman collection to your device.
Set Postman collection variables
There are 5 variables in the SmartDocs AI Studio API collection:
baseUrl
apiKey
projectId
fileId
workflowKey
baseUrl
The baseUrl is already set in the collection variables.
https://smartdocs-web.doc.com.ai/api/v1
apiKey
Paste the API Key obtained from above into the Postman collection.
projectId
Paste the Project ID obtained from above into the Postman collection.
With the above three variables set, you will be able to run the Upload Single File and Upload Multiple Files API requests.
![](https://files.readme.io/ab3feae-image.png)
fileId
The fileId
can be obtained from the return response of the Upload Single File or Upload Multiple Files API.
workflowKey
The workflowKey
can be obtained from the response of the Check Prediction Status API.
With the above variables are set for the collection, you will then be able to run any API within the collection.
API Info
Below is a brief introduction to the fundamental APIs in SmartDocs AI Studio: upload files, predict and retrieve prediction results.
The fundamental APIs
Upload Single File
A workflow is automatically created when file(s) is uploaded. The Upload Single FileAPI returns basic information for the workflow, including its id
and status
.
Upload Multiple Files
Similar tot he Upload Single File API, the Upload Multiple Files API returns workflow and file information, but in array of objects.
Check prediction status
This API returns the `workflowStatus (i.e. prediction status for a file), as well as other file metadata.
Download original PDF file
This API returns a link for downloading PDF file uploaded to the project.
Download prediction result
This API returns a link for downloading the prediction results for a file.
Other APIs
Documentation for other APIs can be found inside the Postman collection. See this guide for more information.
Updated 4 months ago