Skip to main content
GET
/
job-status
/
{job_id}
Checking Job Status
curl --request GET \
  --url https://api.sutro.sh/job-status/{job_id} \
  --header 'Authorization: <authorization>'
{
  "message": "Job completed successfully",
  "job_status": "succeeded",
  "metadata": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.sutro.sh/llms.txt

Use this file to discover all available pages before exploring further.

Using the API directly is not recommended for most users. Instead, we recommend using the Python SDK.
Retrieve the status of a batch inference job by its job_id.

Request Parameters

job_id
string
required
The job_id returned when you submitted the batch inference job

Headers

Authorization
string
required
Your Sutro API key using Key authentication scheme.Format: Key YOUR_API_KEYExample: Authorization: Key sk_live_abc123...

Response

Returns the current status and details of the batch inference job.
message
string
Message describing the job’s current status
job_status
string
The current status of the job. See status values below
metadata
object
Additional information about the job. If the status is failed during job initialization, will contain a failure_reason key with details about the failure, and optionally an additional_context key with debugging information

Job Status Values

The job_status field will be one of the following:
  • succeeded: The job completed successfully
  • failed: The job failed
  • cancelled: The job was cancelled
  • pending: The job is still pending
  • submitted: The job has been submitted
  • starting: The job is starting
  • running: The job is running
  • unknown: The job status is unknown
{
  "message": "Job completed successfully",
  "job_status": "succeeded",
  "metadata": {}
}

Code Examples

import requests

job_id = "batch_job_12345"

response = requests.get(
    f'https://api.sutro.sh/job-status/{job_id}',
    headers={
        'Authorization': 'Key YOUR_SUTRO_API_KEY'
    }
)

result = response.json()
print(f"Job Status: {result['job_status']}")
print(f"Message: {result['message']}")

if result['job_status'] == 'failed':
    print(f"Failure Reason: {result['metadata'].get('failure_reason', 'Unknown')}")