List Training Step Groups Route
curl --request GET \
--url https://api.trajectory.ai/api/v1/train/{run_id}/steps/{step}/groups \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.trajectory.ai/api/v1/train/{run_id}/steps/{step}/groups"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trajectory.ai/api/v1/train/{run_id}/steps/{step}/groups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trajectory.ai/api/v1/train/{run_id}/steps/{step}/groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.trajectory.ai/api/v1/train/{run_id}/steps/{step}/groups"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trajectory.ai/api/v1/train/{run_id}/steps/{step}/groups")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trajectory.ai/api/v1/train/{run_id}/steps/{step}/groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"trajectory_id": "<string>",
"uid": "<string>",
"trajectory_idx": 123,
"status": "in_progress",
"reward": 123,
"turns": 123,
"tokens_generated": 123,
"termination_reason": "<string>",
"tool_failure_count": 123,
"tool_failures_exec": 123,
"tool_failures_parse": 123,
"tool_failures_unk": 123,
"training_step": 123,
"task_id": "<string>",
"rejection_reason": "<string>",
"group_outcome": "incomplete",
"group_no_signal": true,
"in_training_batch": true,
"task_preview": "<string>"
}
],
"has_more": true,
"training_run_id": "<string>",
"step": 123,
"next_cursor": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"context": {},
"param": "<string>"
}
}Training
List Training Step Groups Route
Complete task groups, with the selected optimizer step’s batch first and other checkpoint samples afterward. Limit counts groups; every attempt in a selected group is returned together. Filters include whole matching groups. Cursors retain a read snapshot for 30 minutes.
GET
/
api
/
v1
/
train
/
{run_id}
/
steps
/
{step}
/
groups
List Training Step Groups Route
curl --request GET \
--url https://api.trajectory.ai/api/v1/train/{run_id}/steps/{step}/groups \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.trajectory.ai/api/v1/train/{run_id}/steps/{step}/groups"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trajectory.ai/api/v1/train/{run_id}/steps/{step}/groups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trajectory.ai/api/v1/train/{run_id}/steps/{step}/groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.trajectory.ai/api/v1/train/{run_id}/steps/{step}/groups"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trajectory.ai/api/v1/train/{run_id}/steps/{step}/groups")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trajectory.ai/api/v1/train/{run_id}/steps/{step}/groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"trajectory_id": "<string>",
"uid": "<string>",
"trajectory_idx": 123,
"status": "in_progress",
"reward": 123,
"turns": 123,
"tokens_generated": 123,
"termination_reason": "<string>",
"tool_failure_count": 123,
"tool_failures_exec": 123,
"tool_failures_parse": 123,
"tool_failures_unk": 123,
"training_step": 123,
"task_id": "<string>",
"rejection_reason": "<string>",
"group_outcome": "incomplete",
"group_no_signal": true,
"in_training_batch": true,
"task_preview": "<string>"
}
],
"has_more": true,
"training_run_id": "<string>",
"step": 123,
"next_cursor": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"context": {},
"param": "<string>"
}
}Authorizations
Organization API key
Query Parameters
Available options:
training, eval Available options:
all, all_pass, mixed, all_fail Required range:
1 <= x <= 100