Batches
List batch jobs
List all batch jobs for the authenticated user
GET
Together AI SDK (Python)
Authorizations
Response
OK
Together AI SDK (Python)
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
List all batch jobs for the authenticated user
from together import Together
import os
client = Together(
api_key=os.environ.get("TOGETHER_API_KEY"),
)
batches = client.batches.list()
for batch in batches:
print(batch.id)import Together from "together-ai";
const client = new Together({
apiKey: process.env.TOGETHER_API_KEY,
});
const batches = await client.batches.list();
console.log(batches);
import Together from "together-ai";
const client = new Together({
apiKey: process.env.TOGETHER_API_KEY,
});
const batches = await client.batches.list();
console.log(batches);
curl "https://api.together.ai/v1/batches" \
-H "Authorization: Bearer $TOGETHER_API_KEY" \
-H "Content-Type: application/json"
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.together.ai/v1/batches",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.together.ai/v1/batches"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.together.ai/v1/batches")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v1/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "01234567-8901-2345-6789-012345678901",
"user_id": "user_789xyz012",
"input_file_id": "file-input123abc456def",
"file_size_bytes": 1048576,
"status": "IN_PROGRESS",
"job_deadline": "2024-01-15T15:30:00Z",
"created_at": "2024-01-15T14:30:00Z",
"endpoint": "/v1/chat/completions",
"progress": 75,
"model_id": "Qwen/Qwen3.5-9B",
"output_file_id": "file-output789xyz012ghi",
"error_file_id": "file-errors456def789jkl",
"error": "<string>",
"completed_at": "2024-01-15T15:45:30Z"
}
]{
"error": "<string>"
}{
"error": "<string>"
}OK
Was this page helpful?
from together import Together
import os
client = Together(
api_key=os.environ.get("TOGETHER_API_KEY"),
)
batches = client.batches.list()
for batch in batches:
print(batch.id)import Together from "together-ai";
const client = new Together({
apiKey: process.env.TOGETHER_API_KEY,
});
const batches = await client.batches.list();
console.log(batches);
import Together from "together-ai";
const client = new Together({
apiKey: process.env.TOGETHER_API_KEY,
});
const batches = await client.batches.list();
console.log(batches);
curl "https://api.together.ai/v1/batches" \
-H "Authorization: Bearer $TOGETHER_API_KEY" \
-H "Content-Type: application/json"
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.together.ai/v1/batches",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.together.ai/v1/batches"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.together.ai/v1/batches")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v1/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "01234567-8901-2345-6789-012345678901",
"user_id": "user_789xyz012",
"input_file_id": "file-input123abc456def",
"file_size_bytes": 1048576,
"status": "IN_PROGRESS",
"job_deadline": "2024-01-15T15:30:00Z",
"created_at": "2024-01-15T14:30:00Z",
"endpoint": "/v1/chat/completions",
"progress": 75,
"model_id": "Qwen/Qwen3.5-9B",
"output_file_id": "file-output789xyz012ghi",
"error_file_id": "file-errors456def789jkl",
"error": "<string>",
"completed_at": "2024-01-15T15:45:30Z"
}
]{
"error": "<string>"
}{
"error": "<string>"
}