Retrieving and Managing Job State#
Job Status#
- GET https://api.sutro.sh/job-status/{job_id}#
Retrieve the status of a priority 1 job by its job_id.
- Parameters:
job_id (str) – The job_id returned when you submitted the job.
- Request Headers:
Authorization – Your Sutro API key.
- Accept:
application/json
- Response JSON Object:
message – Message describing the job’s current status.
job_status – The current status of the job.
metadata – If the status is
failedduring job initialization, will contain a keyfailure_reason. This will contain a keymessagewith a verbose message for the failure, and optionally a keyadditional_contextwith additional info to help debug the failure.
The job_status 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.
Cancelling a Job#
- POST https://api.sutro.sh/job-cancel/{job_id}#
Cancel a priority 1 job by its job_id.
- Parameters:
job_id (str) – The job_id returned when you submitted the job.
- Request Headers:
Authorization – Your Sutro API key.
- Accept:
application/json
- Response JSON Object:
cancelled – True if the job was cancelled, False otherwise.
message – Verbose message for the job’s cancellation status.
Retrieving Results#
- POST https://api.sutro.sh/job-results/#
Retrieve the results of a priority 1 job by its job_id.
- Parameters:
job_id (str) – The job_id returned when you submitted the job.
include_inputs (bool) – Whether to include the inputs in the results.
include_cumulative_logprobs (bool) – Whether to include the cumulative logprobs in the results.
- Request Headers:
Authorization – Your Sutro API key.
- Accept:
application/json
- Response JSON Object:
results – If
include_inputsisTrue, the results will be a dictionary withinputsandoutputskeys. Ifinclude_inputsisFalse, the results will be a dictionary withoutputskey. Results are in the same order as the inputs.message – Verbose message for the job’s results.
Listing All Jobs#
- GET https://api.sutro.sh/list-jobs/#
List all current and historical jobs, and associated metadata.
- Request Headers:
Authorization – Your Sutro API key.
- Accept:
application/json
- Response JSON Object:
jobs – A list of jobs you have access to.
message – Verbose message for the job’s results.