Using the API directly is not recommended for most users. Instead, we recommend using the Python
SDK.
Headers
Your Sutro API key using Key authentication scheme.Format:
Key YOUR_API_KEY
Example: Authorization: Key sk_live_abc123...
Query Parameters
Number of jobs to return per page. When provided, enables pagination.
- Minimum: 1
- Maximum: 100
- If omitted, returns all jobs without pagination
Opaque cursor string for pagination. Use the
next_cursor
value from the previous response to fetch the next page.Only used when limit
is also provided.Response
Returns a list of jobs associated with your account. The response structure varies based on whether pagination is used.Without Pagination (no limit
parameter)
Success message indicating jobs were retrieved
Complete list of all jobs for your account
With Pagination (limit
parameter provided)
List of jobs for the current page (up to
limit
items)Cursor to fetch the next page of results. Will be
null
if there are no more pages.Code Examples
Job Object Fields
Each job in the jobs array contains the following fields:Field | Type | Description |
---|---|---|
job_id | string | Public identifier for the job |
status | string | Current status of the job (SUCCEEDED, FAILED, RUNNING, PENDING, etc.) |
model | string | The model used for the job |
system_prompt | string | null | System prompt used for the job |
job_priority | integer | Priority level of the job (0 or 1) |
datetime_created | string | ISO timestamp of when the job was created |
datetime_started | string | null | ISO timestamp of when processing began |
datetime_completed | string | null | ISO timestamp of when the job completed |
json_schema | object | null | JSON schema for structured output (if used) |
sampling_params | object | Sampling parameters used for generation |
name | string | null | Optional name for the job |
description | string | null | Optional description of the job |
dataset_id | string | null | Associated dataset identifier |
input_tokens | integer | null | Total input tokens processed |
output_tokens | integer | null | Total output tokens generated |
job_cost | number | null | Actual cost of the job in USD |
num_rows | integer | null | Number of rows processed |
failure_reason | object | null | Details if the job failed |
cost_estimate | number | null | Estimated cost before processing |
Notes
- Jobs are returned in reverse chronological order (newest first)
- When using pagination, the cursor is opaque and should not be modified
- Use the
limit
parameter for better performance when dealing with large numbers of jobs