Import Text File

Supametas.ai allows users to upload custom files. Through the API, you can upload source data to your data storage in Supametas.ai. Based on your needs, the file will be stored and parsed accordingly.

Endpoint: POST: {{BaseUrl}}/file-task

Request body:

{
    "file": {},
    "data" : {
  	"getDemandFormat": "",
  	"customKeys": [
   	    {
    		"key": "",
        	"desc": ""
    	    }
  	]  
    }
}

Response (Data part):

{
  "num": 0,
  "taskId": "xxxx010"
}

Request Body

Parameter
Type
Required
Description

file

FILE

YES

Supported types:

.docx .pdf .txt .md .json

data

OBJECT

YES

-getDemandFormat

STRING

YES

Output document format

1 : json

2 : markdown

-title

INTEGER

YES

Text title

1 : get

0 : don't get

-contentDetails

INTEGER

YES

Text details

1 : get

0 : don't get

-customKeys

STRING

NO

Custom fields

–-key

STRING

NO

Custom field key

–-desc

STRING

NO

Custom field description

Response Body (Data Part):

Parameter
Type
Description

num

INTEGER

Number of files processed

taskId

STRING

Import task ID, which can be used to query task status

Last updated