> ## Documentation Index
> Fetch the complete documentation index at: https://glasser.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# glasser runs get

> 获取 Run、等待完成，或保存输出。

## 用法

```bash theme={null}
glasser runs get -r <runId>
```

读取当前 Run，或等待其结束：

* \*\*不带 `--wait`：\*\*立即返回，即使 Run 为 `QUEUED` 或 `RUNNING`。
* \*\*带 `--wait`：\*\*轮询至结束，最长等待 `--wait-timeout` 秒，默认为 `300`。
* \*\*等待超时：\*\*以 `1` 退出，但不会停止 Run。重复执行命令可继续等待。

`FAILED` 和 `STOPPED` 状态的 Run 以 `1` 退出。`COMPLETED` 状态的 Run 以 `0` 退出，即使数据提供商返回 HTTP 4xx 或 5xx。除了 `status`，还应检查 `provider_response.http_status` 和 `charge_usd`。

## 选项

| 选项 | 说明 |
| - | - |
| `--run-id, -r` | Run ID |
| `--wait, -w` | 轮询至 Run 进入终态 |
| `--wait-timeout` | 最长等待秒数，默认为 300，需配合 --wait |
| `--output, -o` | 将 Run 的 output 字段写入文件，仅适用于有输出的 COMPLETED 状态 |

全局选项、JSON 模式、退出码和环境变量见 [CLI 约定](https://glasser.ai/docs/zh/cli.md#global-flags)。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.