# 获取实时转录翻译任务的状态 (/zh-CN/api-reference/api-ref/speech-to-text/query)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

获取实时转录翻译任务状态。

- OpenAPI: /openapi/speech-to-text/v7.zh-CN.yaml
- Operation ID: query
- Method: GET
- Path: /api/speech-to-text/v1/projects/{appid}/agents/{agentId}
- Endpoint: https://api.agora.io/api/speech-to-text/v1/projects/{appid}/agents/{agentId}

## Servers

- https://api.agora.io

## Authorization

This endpoint requires authentication.

- `Basic Auth`

## Parameters

- `appid` (path, required, string) - 你的项目的 App ID，可在[声网控制台](https://console.shengwang.cn/)获取。
- `agentId` (path, required, string) - 服务的 ID。通过 [`join`](./join) 方法中的响应包体获取。

## Request body

No request body.

## Responses

### 200

如果返回的状态码为 `200`，表示请求成功。

- `message` (string) - 请求结果的详细信息。
- `agent_id` (string) - 服务的 ID。
- `create_ts` (integer) - 服务创建时的 Unix 时间戳（秒）。
- `status` (string) - 服务的状态：
- `STARTING`：服务开始启动。
- `RUNNING`：服务进行中。
- `STOPPING`：服务退出中。
- `STOPPED`：服务退出成功。
- `RECOVERING`：服务恢复中。
- `FAILED`：服务退出失败。
  - Allowed: `STARTING` | `RUNNING` | `STOPPING` | `STOPPED` | `RECOVERING` | `FAILED`
### default

如果返回的状态码不为 `200`，请求失败。请根据 `message` 和 `status` 字段进行排查。

- `message` (string) - 请求失败的详细信息。
- `agent_id` (string) - 服务的 ID。
- `create_ts` (integer) - 服务创建时的 Unix 时间戳（秒）。
- `status` (string) - 服务的状态。如果返回的状态码不为 `200`，请求失败。请根据 `details` 和 `reason` 字段进行排查
  - Allowed: `FAILED`

## Response examples

### 200

```json
{
  "message": "ok",
  "agent_id": "1NT29X11GQSxxxxx80BEIN56XF",
  "create_ts": 1735035893,
  "status": "RUNNING"
}
```
### default

```json
{
  "message": "请求失败的详细信息。",
  "agent_id": "服务的 ID。",
  "create_ts": null,
  "status": "服务的状态。如果返回的状态码不为 `200`，请求失败。请根据 `details` 和 `reason` 字段进行排查"
}
```
