POST
/
api
/
ai
/
datasets
/
train-datasets
curl --request POST \
  --url https://api.worqhat.com/api/ai/datasets/train-datasets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multi-part/form-data' \
  --data '{
  "datasetId": "1234567890",
  "dataset_name": "Sample Dataset",
  "dataset_type": "self",
  "json_data": "{'\''data'\'': '\''This is a sample data'\''}",
  "training_file": "sample.csv"
}'
{
  "status": "success",
  "data": {
    "dataset_id": "0109c3db-5968-4704-b99e-84d1b8201319",
    "dataset_name": "sampled ataset",
    "dataset_description": "",
    "training_for": "Self",
    "status": "Training",
    "dataset_timestamp": {
      "_seconds": 1697742460,
      "_clock_hash": 762483
    }
  },
  "processing_time": 5359,
  "processing_id": "9cb58eda-8ff3-417c-a5d0-1b427471a3d4",
  "processing_count": 132
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multi-part/form-data
datasetId
string

The ID of the Dataset that you want to train. This is optional. If you don't pass a Dataset ID, we will generate a random ID for you. Make sure this is unique. You can pass in a old id if you want to add in more data to your existing Trained Dataset.

dataset_name
string

The Name of the Dataset that you want to train.

dataset_type
enum<string>

The Type of the Training Dataset after Saving. It can be either self or org.

Available options:
self,
org
json_data
string

The JSON Data that you want to train. You can pass in the JSON Data in the form of a stringified JSON.

training_file
string

The Training File that you want to train. You can pass in the Training File in the form of a CSV or a PDF file.

Response

200 - application/json
status
string

Status indicating the success of the Dataset Creation Process.

data
object

The information about the created dataset.

processing_time
integer

The time taken to process the request, in milliseconds.

processing_id
string

A universally unique identifier for the request. This can be used to track the request in the logs.

processing_count
integer

The number of times the request has been processed. This is what is considered in the Billing Process. This is either the number of times the image is processed or the number of words that the server processes.