SliceX AI Trainer
SliceX AI Trainer API (1.0)
Download OpenAPI specification:Download
List Custom Models
query Parameters
modelType | string (ModelType) Enum: "binary-text-classification" "multiclass-text-classification" "multilabel-text-classification" "named-entity-recognition" "question-answering" Model type |
trainingStatus | string (TrainingJobStatus) Enum: "CREATED" "QUEUED" "RUNNING" "READY" "CANCELLED" "DELETED" "ERROR" Training Job Status |
header Parameters
x-api-key required | string (x-api-key) |
Responses
Request samples
- cURL
- Python3 (requests)
- JavaScript (axios)
curl -X 'GET' \ 'https://api.slicex.ai/trainer/language/models' \ -H 'Content-Type: application/json' \ -H 'x-api-key: YOUR_SLICEX_AI_API_KEY'
Response samples
- 200
- 422
Content type
application/json
{- "data": [
- {
- "id": "string",
- "app_id": "string",
- "name": "string",
- "training_status": "CREATED",
- "type": "binary-text-classification",
- "modality": "language",
- "created": "2019-08-24T14:15:22Z",
- "trained": "2019-08-24T14:15:22Z",
- "last_used": "2019-08-24T14:15:22Z",
- "time_to_live_days": 0
}
], - "pagination": {
- "next_page": "string",
- "url": "string"
}
}
Get Model Information
path Parameters
model_id required | string (Model Id) |
header Parameters
x-api-key required | string (x-api-key) |
Responses
Request samples
- cURL
- Python3 (requests)
- JavaScript (axios)
curl -X 'GET' \ 'https://api.slicex.ai/trainer/language/models/YOUR_MODEL_ID' \ -H 'Content-Type: application/json' \ -H 'x-api-key: YOUR_SLICEX_AI_API_KEY'
Response samples
- 200
- 422
Content type
application/json
{- "data": {
- "id": "string",
- "app_id": "string",
- "name": "string",
- "training_status": "CREATED",
- "type": "binary-text-classification",
- "modality": "language",
- "created": "2019-08-24T14:15:22Z",
- "trained": "2019-08-24T14:15:22Z",
- "last_used": "2019-08-24T14:15:22Z",
- "time_to_live_days": 0
}
}
Delete Custom Model
path Parameters
model_id required | string (Model Id) |
header Parameters
x-api-key required | string (x-api-key) |
Responses
Request samples
- cURL
- Python3 (requests)
- JavaScript (axios)
curl -X 'DELETE' \ 'https://api.slicex.ai/trainer/language/models/YOUR_MODEL_ID' \ -H 'Content-Type: application/json' \ -H 'x-api-key: YOUR_SLICEX_AI_API_KEY'
Response samples
- 422
Content type
application/json
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}
List Training Jobs
query Parameters
modelType | string (ModelType) Enum: "binary-text-classification" "multiclass-text-classification" "multilabel-text-classification" "named-entity-recognition" "question-answering" Model type |
trainingStatus | string (TrainingJobStatus) Enum: "CREATED" "QUEUED" "RUNNING" "READY" "CANCELLED" "DELETED" "ERROR" Training Job Status |
header Parameters
x-api-key required | string (x-api-key) |
Responses
Request samples
- cURL
- Python3 (requests)
- JavaScript (axios)
curl -X 'GET' \ 'https://api.slicex.ai/trainer/language/training-jobs' \ -H 'Content-Type: application/json' \ -H 'x-api-key: YOUR_SLICEX_AI_API_KEY'
Response samples
- 200
- 422
Content type
application/json
{- "data": [
- {
- "model": {
- "id": "string",
- "app_id": "string",
- "name": "string",
- "training_status": "CREATED",
- "type": "binary-text-classification",
- "modality": "language",
- "created": "2019-08-24T14:15:22Z",
- "trained": "2019-08-24T14:15:22Z",
- "last_used": "2019-08-24T14:15:22Z",
- "time_to_live_days": 0
}, - "training_stats": {
- "batch_size": 0,
- "main_eval_metric": "accuracy",
- "best_eval_metric_value": 0,
- "epoch": 0,
- "metrics": {
- "elapsed_time": [
- 0
], - "training": {
- "property1": [
- 0
], - "property2": [
- 0
]
}, - "validation": {
- "property1": [
- 0
], - "property2": [
- 0
]
}
}
}, - "status": "CREATED",
- "created": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "next_page": "string",
- "url": "string"
}
}
Create Training Job
header Parameters
x-api-key required | string (x-api-key) |
Request Body schema: application/json
required | object (Training Configuration) |
required | object (Model Configuration) |
dataset_url required | string (URL for the zip of the dataset) |
Responses
Request samples
- Payload
- cURL
- Python3 (requests)
- JavaScript (axios)
Content type
application/json
{- "training_config": {
- "batch_size": 64,
- "learning_rate": 0.001,
- "num_epochs": 10
}, - "model_config": {
- "name": "sst-sentiment-analysis",
- "type": "binary-text-classification",
- "time_to_live_days": 10
}, - "dataset_url": "string"
}
Response samples
- 201
- 422
Content type
application/json
{- "id": "string"
}
Get Training Job Information & Stats
path Parameters
model_id required | string (Model Id) |
header Parameters
x-api-key required | string (x-api-key) |
Responses
Request samples
- cURL
- Python3 (requests)
- JavaScript (axios)
curl -X 'GET' \ 'https://api.slicex.ai/trainer/language/training-jobs/YOUR_MODEL_ID' \ -H 'Content-Type: application/json' \ -H 'x-api-key: YOUR_SLICEX_AI_API_KEY'
Response samples
- 200
- 422
Content type
application/json
{- "data": {
- "model": {
- "id": "string",
- "app_id": "string",
- "name": "string",
- "training_status": "CREATED",
- "type": "binary-text-classification",
- "modality": "language",
- "created": "2019-08-24T14:15:22Z",
- "trained": "2019-08-24T14:15:22Z",
- "last_used": "2019-08-24T14:15:22Z",
- "time_to_live_days": 0
}, - "training_stats": {
- "batch_size": 0,
- "main_eval_metric": "accuracy",
- "best_eval_metric_value": 0,
- "epoch": 0,
- "metrics": {
- "elapsed_time": [
- 0
], - "training": {
- "property1": [
- 0
], - "property2": [
- 0
]
}, - "validation": {
- "property1": [
- 0
], - "property2": [
- 0
]
}
}
}, - "status": "CREATED",
- "created": "2019-08-24T14:15:22Z"
}
}
Cancel Training Job
path Parameters
model_id required | string (Model Id) |
header Parameters
x-api-key required | string (x-api-key) |
Responses
Request samples
- cURL
- Python3 (requests)
- JavaScript (axios)
curl -X 'DELETE' \ 'https://api.slicex.ai/trainer/language/training-jobs/YOUR_MODEL_ID' \ -H 'Content-Type: application/json' \ -H 'x-api-key: YOUR_SLICEX_AI_API_KEY'
Response samples
- 422
Content type
application/json
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}