Fetch a job
curl --request GET \
--url https://your-sutro-deployment.example.com/v1/jobs/{job_id} \
--header 'Authorization: <authorization>'import requests
url = "https://your-sutro-deployment.example.com/v1/jobs/{job_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://your-sutro-deployment.example.com/v1/jobs/{job_id}', 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://your-sutro-deployment.example.com/v1/jobs/{job_id}",
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: <authorization>"
],
]);
$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://your-sutro-deployment.example.com/v1/jobs/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://your-sutro-deployment.example.com/v1/jobs/{job_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-sutro-deployment.example.com/v1/jobs/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyAPI
Fetch a job
Retrieve one Batch job and its metadata.
GET
/
v1
/
jobs
/
{job_id}
Fetch a job
curl --request GET \
--url https://your-sutro-deployment.example.com/v1/jobs/{job_id} \
--header 'Authorization: <authorization>'import requests
url = "https://your-sutro-deployment.example.com/v1/jobs/{job_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://your-sutro-deployment.example.com/v1/jobs/{job_id}', 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://your-sutro-deployment.example.com/v1/jobs/{job_id}",
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: <authorization>"
],
]);
$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://your-sutro-deployment.example.com/v1/jobs/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://your-sutro-deployment.example.com/v1/jobs/{job_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-sutro-deployment.example.com/v1/jobs/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyConfigure your deployment URL and API key before
using the examples below.
Fields that depend on execution remain
Headers
curl --fail-with-body "${SUTRO_API_URL%/}/v1/jobs/JOB_ID" \
-H "Authorization: Key $SUTRO_API_KEY"
Response
The response is{ "job": { ... } }. A job contains:
| Field | Type | Meaning |
|---|---|---|
job_id, status, model | string | Identity, state, and model or Function |
system_prompt | string | null | Standalone-model prompt |
job_priority | integer | 0 or 1 |
datetime_created, datetime_started, datetime_completed | string | null | ISO timestamps |
json_schema | object | null | Structured-output schema |
sampling_params | object | Generation settings |
name, description | string | null | User metadata |
input_tokens, output_tokens, num_rows | integer | null | Workload and throughput diagnostics |
job_cost | number | null | USD charge from measured GPU inference time and the job’s saved rate |
cost_estimate | string | null | Estimated USD charge before execution completes |
gpu_hour_rate_usd | string | USD/GPU-hour rate saved when the job was created |
machine_time_pricing | object | null | Recorded GPU hours, saved rate, and charge (see below) |
failure_reason | object | null | Failure detail |
null until available. A missing job returns 404 with { "message": "..." }.
machine_time_pricing contains decimal strings: compute_hours is the total
GPU-hours across workers, compute_hour_rate_usd is the saved USD/GPU-hour rate,
and user_cost_usd is the resulting charge. It remains null until a successful
job has sufficient measurements to calculate a charge.
See machine-time pricing for the
calculation and an example.