Launch a Training Job
You can see the OpenAPI specifications of the SliceX AI Trainer API in the dev portal. It shows you your API Key, describes the endpoints and the input/output formats. You can start a training job on the command line.
The SliceX AI Trainer main URL endpoint is:
https://api.slicex.ai/trainer/language
You can start a training job with a POST request to the following endpoint:
api.slicex.ai/trainer/language/training-jobs
You need to pass a few arguments in the requests, such as the model name, the dataset URL, the model type, family and size. Other parameters are optional. head to the Customize a Training Job section for more information about the request parameters. The dataset also needs to follow a specific format, which varies by task type. See the Dataset Requirements section for details.
Currently the model families we support are:
- Papaya for text classification (mini/base)
- Dragonfruit for question answering (mini/base)
- Grapefruit for sequence labeling (mini/base)
The model name must be under 25 characters, lowercase and without any custom symbol (such as ?, _, !).
The dataset URL needs to be open and downloadable. For Google Drive URLs, please set them to public. Check out a quick tutorial on how to generate your own dataset links for training here.
An example request could follow the following template:
curl -X POST \
"https://api.slicex.ai/trainer/language/training-jobs" \
-H "accept: application/json" \
-H "x-api-key: API_KEY" \
-H "Content-Type: application/json" \
-d "{ \"dataset_url\": \"DATASET_URL\"}"
The response will contain the MODEL_ID, which is necessary in order to use the model later. If you miss that response, you can always retrieve it later.
You can monitor a training job with a GET request to the following endpoint:
api.slicex.ai/trainer/language/training-jobs/{model_id}
An example request is:
curl -X GET \
"https://api.slicex.ai/trainer/language/training-jobs/MODEL_ID" \
-H "accept: application/json" \
-H "x-api-key: API_KEY"
Check out the Model Management section for more details on how to monitor your jobs, retrieve model information and job status, etc.
Note that depending on our servers’ status and utilization rate, your job may not start immediately. You can monitor a training job at any time- see the Model Management section for more details. If you are still unsure about the successful creation and queuing of your job and/or require more assistance, please refer to the Troubleshooting section.
The SliceX AI Trainer currently has a limit of one training job at a time per account.
The training costs depend on the task, the model parameters and the dataset size. For information about training costs, please refer to the Pricing Calculator section.
:::