import { createClient } from "@toloka-platform/sdk";
const client = createClient({
baseUrl: "https://platform.toloka.ai",
apiKey: process.env.TOLOKA_API_KEY!,
});
for await (const item of client.trainings.listAllRuns({
trainingId: "trg.019a0000-0000-7000-8000-000000000001"
})) {
console.log(item);
}
{
"pagination": {
"hasMore": true,
"limit": 20,
"offset": 0,
"total": 42
},
"trainingRuns": [
{
"billingStatus": "pending",
"blockedReason": "funds",
"chargedAmount": "<string>",
"configuration": {
"batchSize": 8,
"epochs": 3,
"learningRate": 0.000505,
"loraRank": 8,
"maxSequenceLength": 8224,
"method": "sft",
"source": {
"baseModelId": "qwen3-4b",
"type": "base_model"
},
"training": {
"datasetId": "<string>",
"itemFilter": {
"fieldSources": [
{
"fieldId": "<string>",
"sources": [
{
"type": "user",
"userId": "<string>"
}
]
}
],
"fieldValues": [
{
"fieldId": "<string>",
"jsonPath": "<string>",
"operator": "text_eq",
"value": "<string>",
"latestOnly": true,
"sources": []
}
],
"missingRevisionFields": [
"<string>"
],
"excludeParts": [
{
"fieldId": "<string>",
"names": [
"<string>"
]
}
],
"parts": {
"fieldId": "<string>",
"names": [
"<string>"
]
},
"slice": {
"sliceId": "<string>"
}
}
},
"sliceId": "<string>",
"splitFieldId": "<string>",
"trainParts": [
"<string>"
],
"validation": {
"datasetId": "<string>",
"itemFilter": {
"fieldSources": [
{
"fieldId": "<string>",
"sources": [
{
"type": "user",
"userId": "<string>"
}
]
}
],
"fieldValues": [
{
"fieldId": "<string>",
"jsonPath": "<string>",
"operator": "text_eq",
"value": "<string>",
"latestOnly": true,
"sources": []
}
],
"missingRevisionFields": [
"<string>"
],
"excludeParts": [
{
"fieldId": "<string>",
"names": [
"<string>"
]
}
],
"parts": {
"fieldId": "<string>",
"names": [
"<string>"
]
},
"slice": {
"sliceId": "<string>"
}
}
}
},
"createdAt": "2023-11-07T05:31:56Z",
"error": {
"code": "data_export_failed",
"message": "<string>",
"retryable": true
},
"estimateFingerprint": "<string>",
"estimateInputSetId": "<string>",
"id": "<string>",
"inputCutoff": "2023-11-07T05:31:56Z",
"inputs": {
"training": {
"byteSize": 4503599627370495,
"contract": "openai-chat-v1",
"datasetExportId": "<string>",
"datasetFileId": "<string>",
"datasetId": "<string>",
"format": "training-jsonl",
"itemFilter": {
"createdBefore": "2023-11-07T05:31:56Z",
"excludeParts": [
{
"fieldId": "<string>",
"names": [
"<string>"
]
}
],
"fieldSources": [
{
"fieldId": "<string>",
"sources": [
{
"type": "user",
"userId": "<string>"
}
]
}
],
"fieldValues": [
{
"fieldId": "<string>",
"jsonPath": "<string>",
"operator": "text_eq",
"value": "<string>",
"latestOnly": true,
"sources": []
}
],
"missingRevisionFields": [
"<string>"
],
"parts": {
"fieldId": "<string>",
"names": [
"<string>"
]
},
"slice": {
"sliceId": "<string>"
}
},
"report": {
"errors": [
{
"itemIndex": 4503599627370495,
"reason": "<string>"
}
],
"invalidCount": 4503599627370495,
"tokens": {
"max": 4503599627370495,
"p50": 4503599627370495,
"p95": 4503599627370495,
"estimatorVersion": "utf16-code-units-div-4-v1",
"total": 4503599627370495
},
"validCount": 4503599627370495
},
"sha256": "<string>"
},
"validation": {
"byteSize": 4503599627370495,
"contract": "openai-chat-v1",
"datasetExportId": "<string>",
"datasetFileId": "<string>",
"datasetId": "<string>",
"format": "training-jsonl",
"itemFilter": {
"createdBefore": "2023-11-07T05:31:56Z",
"excludeParts": [
{
"fieldId": "<string>",
"names": [
"<string>"
]
}
],
"fieldSources": [
{
"fieldId": "<string>",
"sources": [
{
"type": "user",
"userId": "<string>"
}
]
}
],
"fieldValues": [
{
"fieldId": "<string>",
"jsonPath": "<string>",
"operator": "text_eq",
"value": "<string>",
"latestOnly": true,
"sources": []
}
],
"missingRevisionFields": [
"<string>"
],
"parts": {
"fieldId": "<string>",
"names": [
"<string>"
]
},
"slice": {
"sliceId": "<string>"
}
},
"report": {
"errors": [
{
"itemIndex": 4503599627370495,
"reason": "<string>"
}
],
"invalidCount": 4503599627370495,
"tokens": {
"max": 4503599627370495,
"p50": 4503599627370495,
"p95": 4503599627370495,
"estimatorVersion": "utf16-code-units-div-4-v1",
"total": 4503599627370495
},
"validCount": 4503599627370495
},
"sha256": "<string>"
}
},
"maxCost": "<string>",
"message": "<string>",
"outputModelVersionId": "<string>",
"outputModelVersionName": "<string>",
"outputModelVersionRevision": 4503599627370495,
"progress": {
"message": "<string>",
"phase": "<string>",
"step": 4503599627370495,
"total": 4503599627370495
},
"quote": {
"budget": {
"estimatedGpuSeconds": 4503599627370495,
"estimatedWallSeconds": 4503599627370495,
"gpuCount": 123,
"maximumGpuSeconds": 4503599627370495,
"maximumWallSeconds": 4503599627370495,
"methodWorkUnits": 4503599627370495
},
"calculatedAt": "2023-11-07T05:31:56Z",
"capabilityVersion": "<string>",
"currency": "USD",
"cutoff": "2023-11-07T05:31:56Z",
"inputSetId": "<string>",
"inputs": {
"training": {
"datasetExportId": "<string>",
"datasetId": "<string>",
"failure": {
"code": "empty_selection",
"message": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"report": {
"errors": [
{
"itemIndex": 4503599627370495,
"reason": "<string>"
}
],
"invalidCount": 4503599627370495,
"tokens": {
"max": 4503599627370495,
"p50": 4503599627370495,
"p95": 4503599627370495,
"estimatorVersion": "utf16-code-units-div-4-v1",
"total": 4503599627370495
},
"validCount": 4503599627370495
},
"heldOutRows": 4503599627370495
},
"validation": {
"datasetExportId": "<string>",
"datasetId": "<string>",
"failure": {
"code": "empty_selection",
"message": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"report": {
"errors": [
{
"itemIndex": 4503599627370495,
"reason": "<string>"
}
],
"invalidCount": 4503599627370495,
"tokens": {
"max": 4503599627370495,
"p50": 4503599627370495,
"p95": 4503599627370495,
"estimatorVersion": "utf16-code-units-div-4-v1",
"total": 4503599627370495
},
"validCount": 4503599627370495
},
"heldOutRows": 4503599627370495
}
},
"maximumCharge": "<string>",
"pricingVersion": "<string>"
},
"status": "queued",
"trainingId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Trainings
List training runs
Return a page of runs for this training, with their configuration, status, and pagination metadata.
GET
/
trainings
/
{trainingId}
/
runs
import { createClient } from "@toloka-platform/sdk";
const client = createClient({
baseUrl: "https://platform.toloka.ai",
apiKey: process.env.TOLOKA_API_KEY!,
});
for await (const item of client.trainings.listAllRuns({
trainingId: "trg.019a0000-0000-7000-8000-000000000001"
})) {
console.log(item);
}
{
"pagination": {
"hasMore": true,
"limit": 20,
"offset": 0,
"total": 42
},
"trainingRuns": [
{
"billingStatus": "pending",
"blockedReason": "funds",
"chargedAmount": "<string>",
"configuration": {
"batchSize": 8,
"epochs": 3,
"learningRate": 0.000505,
"loraRank": 8,
"maxSequenceLength": 8224,
"method": "sft",
"source": {
"baseModelId": "qwen3-4b",
"type": "base_model"
},
"training": {
"datasetId": "<string>",
"itemFilter": {
"fieldSources": [
{
"fieldId": "<string>",
"sources": [
{
"type": "user",
"userId": "<string>"
}
]
}
],
"fieldValues": [
{
"fieldId": "<string>",
"jsonPath": "<string>",
"operator": "text_eq",
"value": "<string>",
"latestOnly": true,
"sources": []
}
],
"missingRevisionFields": [
"<string>"
],
"excludeParts": [
{
"fieldId": "<string>",
"names": [
"<string>"
]
}
],
"parts": {
"fieldId": "<string>",
"names": [
"<string>"
]
},
"slice": {
"sliceId": "<string>"
}
}
},
"sliceId": "<string>",
"splitFieldId": "<string>",
"trainParts": [
"<string>"
],
"validation": {
"datasetId": "<string>",
"itemFilter": {
"fieldSources": [
{
"fieldId": "<string>",
"sources": [
{
"type": "user",
"userId": "<string>"
}
]
}
],
"fieldValues": [
{
"fieldId": "<string>",
"jsonPath": "<string>",
"operator": "text_eq",
"value": "<string>",
"latestOnly": true,
"sources": []
}
],
"missingRevisionFields": [
"<string>"
],
"excludeParts": [
{
"fieldId": "<string>",
"names": [
"<string>"
]
}
],
"parts": {
"fieldId": "<string>",
"names": [
"<string>"
]
},
"slice": {
"sliceId": "<string>"
}
}
}
},
"createdAt": "2023-11-07T05:31:56Z",
"error": {
"code": "data_export_failed",
"message": "<string>",
"retryable": true
},
"estimateFingerprint": "<string>",
"estimateInputSetId": "<string>",
"id": "<string>",
"inputCutoff": "2023-11-07T05:31:56Z",
"inputs": {
"training": {
"byteSize": 4503599627370495,
"contract": "openai-chat-v1",
"datasetExportId": "<string>",
"datasetFileId": "<string>",
"datasetId": "<string>",
"format": "training-jsonl",
"itemFilter": {
"createdBefore": "2023-11-07T05:31:56Z",
"excludeParts": [
{
"fieldId": "<string>",
"names": [
"<string>"
]
}
],
"fieldSources": [
{
"fieldId": "<string>",
"sources": [
{
"type": "user",
"userId": "<string>"
}
]
}
],
"fieldValues": [
{
"fieldId": "<string>",
"jsonPath": "<string>",
"operator": "text_eq",
"value": "<string>",
"latestOnly": true,
"sources": []
}
],
"missingRevisionFields": [
"<string>"
],
"parts": {
"fieldId": "<string>",
"names": [
"<string>"
]
},
"slice": {
"sliceId": "<string>"
}
},
"report": {
"errors": [
{
"itemIndex": 4503599627370495,
"reason": "<string>"
}
],
"invalidCount": 4503599627370495,
"tokens": {
"max": 4503599627370495,
"p50": 4503599627370495,
"p95": 4503599627370495,
"estimatorVersion": "utf16-code-units-div-4-v1",
"total": 4503599627370495
},
"validCount": 4503599627370495
},
"sha256": "<string>"
},
"validation": {
"byteSize": 4503599627370495,
"contract": "openai-chat-v1",
"datasetExportId": "<string>",
"datasetFileId": "<string>",
"datasetId": "<string>",
"format": "training-jsonl",
"itemFilter": {
"createdBefore": "2023-11-07T05:31:56Z",
"excludeParts": [
{
"fieldId": "<string>",
"names": [
"<string>"
]
}
],
"fieldSources": [
{
"fieldId": "<string>",
"sources": [
{
"type": "user",
"userId": "<string>"
}
]
}
],
"fieldValues": [
{
"fieldId": "<string>",
"jsonPath": "<string>",
"operator": "text_eq",
"value": "<string>",
"latestOnly": true,
"sources": []
}
],
"missingRevisionFields": [
"<string>"
],
"parts": {
"fieldId": "<string>",
"names": [
"<string>"
]
},
"slice": {
"sliceId": "<string>"
}
},
"report": {
"errors": [
{
"itemIndex": 4503599627370495,
"reason": "<string>"
}
],
"invalidCount": 4503599627370495,
"tokens": {
"max": 4503599627370495,
"p50": 4503599627370495,
"p95": 4503599627370495,
"estimatorVersion": "utf16-code-units-div-4-v1",
"total": 4503599627370495
},
"validCount": 4503599627370495
},
"sha256": "<string>"
}
},
"maxCost": "<string>",
"message": "<string>",
"outputModelVersionId": "<string>",
"outputModelVersionName": "<string>",
"outputModelVersionRevision": 4503599627370495,
"progress": {
"message": "<string>",
"phase": "<string>",
"step": 4503599627370495,
"total": 4503599627370495
},
"quote": {
"budget": {
"estimatedGpuSeconds": 4503599627370495,
"estimatedWallSeconds": 4503599627370495,
"gpuCount": 123,
"maximumGpuSeconds": 4503599627370495,
"maximumWallSeconds": 4503599627370495,
"methodWorkUnits": 4503599627370495
},
"calculatedAt": "2023-11-07T05:31:56Z",
"capabilityVersion": "<string>",
"currency": "USD",
"cutoff": "2023-11-07T05:31:56Z",
"inputSetId": "<string>",
"inputs": {
"training": {
"datasetExportId": "<string>",
"datasetId": "<string>",
"failure": {
"code": "empty_selection",
"message": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"report": {
"errors": [
{
"itemIndex": 4503599627370495,
"reason": "<string>"
}
],
"invalidCount": 4503599627370495,
"tokens": {
"max": 4503599627370495,
"p50": 4503599627370495,
"p95": 4503599627370495,
"estimatorVersion": "utf16-code-units-div-4-v1",
"total": 4503599627370495
},
"validCount": 4503599627370495
},
"heldOutRows": 4503599627370495
},
"validation": {
"datasetExportId": "<string>",
"datasetId": "<string>",
"failure": {
"code": "empty_selection",
"message": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"report": {
"errors": [
{
"itemIndex": 4503599627370495,
"reason": "<string>"
}
],
"invalidCount": 4503599627370495,
"tokens": {
"max": 4503599627370495,
"p50": 4503599627370495,
"p95": 4503599627370495,
"estimatorVersion": "utf16-code-units-div-4-v1",
"total": 4503599627370495
},
"validCount": 4503599627370495
},
"heldOutRows": 4503599627370495
}
},
"maximumCharge": "<string>",
"pricingVersion": "<string>"
},
"status": "queued",
"trainingId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Authorizations
apiKeyAuthscopedTokenAuth
Enter ApiKey <your-api-key> in Authorization, including the ApiKey prefix. In cURL and Python samples, <api-key> means this full value. The TypeScript SDK adds the prefix for you.
Path Parameters
Training draft ID with prefix trg..
Pattern:
^trg\.[0-9a-f]{8}-[0-9a-f]{4}-[7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$Query Parameters
Maximum number of results to return; defaults to 20.
Required range:
1 <= x <= 100Number of results to skip before this page; defaults to 0.
Required range:
0 <= x <= 9007199254740991Was this page helpful?