跳转到主要内容
GET
/
v1beta
/
operations
/
{operation_id}
Gemini operations.get
curl --request GET \
  --url http://sandbox.mintlify.com/v1beta/operations/{operation_id} \
  --header 'x-goog-api-key: <api-key>'
{
  "name": "operations/abc123",
  "done": true,
  "response": {
    "videoUri": "gs://bucket/video.mp4"
  }
}
用于查询 Gemini 长任务的当前状态、元数据和错误信息。
  • 这个接口通常配合 predictLongRunning 使用
  • 核心路径参数是 operation_id
  • 轮询时重点关注 donemetadataerror
  • 如果你的产品有内部任务系统,建议把 operation 状态和业务状态分开存储

授权

x-goog-api-key
string
header
必填

路径参数

operation_id
string
必填

Operation ID.

示例:

"abc123"

响应

Successful operation status response

name
string
metadata
object
done
boolean
response
object
error
object