# General Translation Platform: 获取上下文生成状态 URL: https://generaltranslation.com/zh/docs/platform/openapi/reference/context/context-status.mdx --- title: 获取上下文生成状态 description: 跟踪 General Translation 上下文生成任务的状态。用于获取上下文生成状态的 API 参考。 method: GET --- 返回由 [Generate translation context](/docs/platform/openapi/reference/context/generate-context) 发起的上下文生成任务的状态。 *注意:保留此端点是为了向后兼容。对于新的集成,请使用 [Get translation job status](/docs/platform/openapi/reference/translation/job-status),该接口可返回任何已排队任务的状态。* ## 概览 [#overview] ```http GET https://api2.gtx.dev/v2/project/setup/status/:jobId ``` **权限** `project:context:read` · **速率限制** 中等 (120/分钟) 按 ID 轮询单个上下文生成任务。 ## 工作原理 [#how-it-works] * 系统会在已通过身份验证的项目中查找该任务。未知的任务 ID 会返回 `404`。 * 已完成的任务会返回 `{ "status": "completed" }`。 * 否则,响应会包含任务 ID 和一个规范化后的状态:`queued`、`processing`、`failed` 或 `unknown`。Pending 和 queued 任务会映射为 `queued`;processing 和 retrying 任务会映射为 `processing`。 ## 请求 [#request] ### 请求头 | 请求头 | 描述 | 必填 | | ----------------- | --------------------- | -- | | `x-gt-api-key` | 项目或组织 API 密钥。 | 是 | | `x-gt-project-id` | 项目 ID。使用组织 API 密钥时必填。 | 否 | ### 路径参数 | 参数 | 描述 | 类型 | 必填 | | ------- | ------------ | -------- | -- | | `jobId` | 上下文生成任务的标识符。 | `string` | 是 | ## 响应 [#response] **状态** `200 OK` ```json title="Response" { "jobId": "job_...", "status": "processing" } ``` 任务完成后将返回: ```json title="Response" { "status": "completed" } ``` ## 错误 [#errors] | 状态 | 原因 | | ----- | ----------------------------------- | | `401` | 缺少 API 密钥,或 API 密钥无效。 | | `403` | API 密钥没有 `project:context:read` 权限。 | | `404` | 未找到任务。 | | `429` | 超出速率限制。 | ## 示例 [#example] ```bash curl -X GET https://api2.gtx.dev/v2/project/setup/status/job_... \ -H "x-gt-api-key: gtx-api-..." ```