> ## 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.

# Job Commands

> Job commands available with the Command Line Interface (CLI).

### Listing current and historical jobs

To list jobs associated with your API key, use:

```none theme={null}
sutro jobs list --all
```

By default this will only list the most recent 25 jobs. To see all jobs, use the `--all` flag:

### Getting job status by job\_id

To get the status of a job by its ID, use:

```none theme={null}
sutro jobs status <job_id>
```

### Getting job results by job\_id

To get the results of a job by its ID, use:

```none theme={null}
sutro jobs results <job_id>
```

There are several optional flags you can use to customize the results:

* You can also include the inputs in the results by using the `--include-inputs` flag.
* You can also include the cumulative logprobs by using the `--include-cumulative-logprobs` flag.
* You can also save the results to a file by using the `--save` flag.
* If using the `--save` flag, you can also specify the format of the output file by using the `--format` flag. Options are `parquet` and `csv`, default is `parquet`.

```none theme={null}
sutro jobs results <job_id> --include-inputs --include-cumulative-logprobs
```

You can also save the results to a file by using the `--save` flag:

```none theme={null}
sutro jobs results <job_id> --save
```

### Cancelling a running job by job\_id

To cancel a running priority 1 job by its ID, use:

```none theme={null}
sutro jobs cancel <job_id>
```

### Attaching to a running job by job\_id

To attach to a running job by its ID, use:

```none theme={null}
sutro jobs attach <job_id>
```

If the job is in progress, this will display a progress bar and live metrics around the job's completion. If the job is in a terminal state, the command will exit.

You can also attach to the latest job by using the `--latest` flag:

```none theme={null}
sutro jobs attach --latest
```
