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

# /v1beta/operations/{operation_id}

> Gemini 장기 실행 작업의 최신 상태를 검색합니다.

用于查询 Gemini 长任务的当前状态、元数据和错误信息。

* 这个接口通常配合 `predictLongRunning` 使用
* 核心路径参数是 `operation_id`
* 轮询时重点关注 `done`、`metadata` 和 `error`
* 如果你的产品有内部任务系统，建议把 operation 状态和业务状态分开存储


## OpenAPI

````yaml GET /v1beta/operations/{operation_id}
openapi: 3.1.0
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://maas.apigo.ai
security:
  - bearerAuth: []
paths:
  /v1beta/operations/{operation_id}:
    get:
      summary: Gemini operations.get
      description: Retrieves the latest state of a Gemini long-running operation.
      parameters:
        - name: operation_id
          in: path
          description: Operation ID.
          required: true
          schema:
            type: string
            example: abc123
      responses:
        '200':
          description: Successful operation status response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeminiOperation'
              example:
                name: operations/abc123
                done: true
                response:
                  videoUri: gs://bucket/video.mp4
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - googleApiKey: []
components:
  schemas:
    GeminiOperation:
      type: object
      properties:
        name:
          type: string
        metadata:
          type: object
          additionalProperties: true
        done:
          type: boolean
        response:
          type: object
          additionalProperties: true
        error:
          $ref: '#/components/schemas/GeminiOperationError'
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    GeminiOperationError:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
        status:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    googleApiKey:
      type: apiKey
      in: header
      name: x-goog-api-key

````