POST /v1/training/jobs.
Choose a dataset format
Each line in the file must be one JSON object. Use one consistent shape throughout a dataset.Named entity recognition
Usetext plus an entities list of [span, label] pairs. Every span must
appear in the text, but matching is case-insensitive: "ada lovelace" is valid
for "Ada Lovelace". Include negative examples with an empty list.
Classification
Uselabel for single-label data or labels for multi-label data. Use the
same field in every row.
GLiNER2 library format
NER and classification uploads also accept GLiNER2’s canonicalinput and
output shape. For NER, map each entity label to its matching spans:
classifications can contain one or several tasks in each
row:
text, label, labels, or entities with
input and output fields in the same row.
Joint NER and classification
A row can contain bothentities and label to train both heads. Keep that
same joint shape in every row, and do not mix single-label label with
multi-label labels.
Decoder
Setdataset_type to decoder and give every row a messages array with chat
roles and content.
The dataset service accepts decoder datasets for fine-tune-agent and storage
workflows. Config jobs reject decoder base models, so don’t treat
dataset_type: decoder as a direct config-job decoder-training path.
Interactive jobs don’t accept a dataset name; read and tokenize the examples
in your application, then send tokenized datums as shown in the
Decoder Quickstart.Upload a dataset
1. Reserve an upload URL
presigned_url, a dataset_id, and a
version_number. The commands above retain all three values. Upload the exact
file bytes to the presigned URL:
2. Process the uploaded file
202. Poll the dataset by name and select the entry whose
version_number exactly matches the upload response. Continue until that
version’s status is ready or failed. If it is failed, stop and surface
its processing_error; do not submit that version to training.
Start training
Pass the exact dataset name to the training-job create endpoint:GET /v1/base-models?supports_training=true immediately before submission to select a
currently trainable base model.

