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.listAll({
projectId: "pp.019a0000-0000-7000-8000-000000000001"
})) {
console.log(item);
}
{
"pagination": {
"hasMore": true,
"limit": 20,
"offset": 0,
"total": 42
},
"trainings": [
{
"archivedAt": "2023-11-07T05:31:56Z",
"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",
"id": "<string>",
"modelId": "<string>",
"name": "<string>",
"projectId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Trainings
List project trainings
Return a page of non-archived training drafts in the project, with pagination metadata.
GET
/
projects
/
{projectId}
/
trainings
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.listAll({
projectId: "pp.019a0000-0000-7000-8000-000000000001"
})) {
console.log(item);
}
{
"pagination": {
"hasMore": true,
"limit": 20,
"offset": 0,
"total": 42
},
"trainings": [
{
"archivedAt": "2023-11-07T05:31:56Z",
"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",
"id": "<string>",
"modelId": "<string>",
"name": "<string>",
"projectId": "<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
Project ID with prefix pp..
Pattern:
^pp\.[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?