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

# 获取任务结果

> Get task result by taskId



## OpenAPI

````yaml GET /gemini/task/result
openapi: 3.0.0
info:
  title: Google Gemini - Video, Image & SDK Compat
  description: >-
    Google Gemini services: video generation (Veo 2/3/3.1), image generation
    (Nano Banana), and Gemini Compat API for the official @google/genai SDK.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.mountsea.ai
    description: API Gateway
security: []
tags:
  - name: gemini
    description: >-
      Video generation (Veo 2/3/3.1) and image generation (Nano Banana)
      endpoints
  - name: gemini-compat
    description: >-
      Gemini Compat API - drop-in replacement for Google's official
      @google/genai SDK. Supports generateContent / streamGenerateContent for
      text and image generation.
paths:
  /gemini/task/result:
    get:
      tags:
        - gemini
      summary: Get task result by taskId
      description: Get task result by taskId
      operationId: ApiPublicController_taskResult
      parameters:
        - name: taskId
          required: true
          in: query
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResultDto'
      security:
        - bearerAuth: []
components:
  schemas:
    TaskResultDto:
      type: object
      properties:
        taskId:
          type: string
          description: task id
        status:
          enum:
            - pending
            - ready
            - assigned
            - processing
            - completed
            - failed
            - cancelled
            - timeout
          type: string
          description: task status
        result:
          description: task result
          oneOf:
            - $ref: ee6b5dc8-cf8f-48b2-9b44-732cf5d636f6
              description: video result
            - $ref: '#/components/schemas/NanoImageDto'
              description: image result
          nullable: true
        errorMessage:
          type: string
          description: error message
        errorCode:
          type: number
          description: error code
        finishedAt:
          format: date-time
          type: string
          description: task finished time
        createdAt:
          format: date-time
          type: string
          description: task created time
        traceId:
          type: string
          description: traceId
      required:
        - taskId
        - status
    NanoImageDto:
      type: object
      properties:
        prompt:
          type: string
          description: The prompt which used to generate the images
          example: A fluffy orange cat running through a sunny meadow
        action:
          type: string
          description: >-
            Action type: edit (modify existing images) or generate (create new
            images)
          enum:
            - edit
            - generate
          example: generate
        num_images:
          type: number
          default: 1
          description: only support generate 1 image, default is 1
        image_urls:
          description: >-
            Link to the picture that needs to be edited. It can be a accessible
            http or https url, The image size should not exceed 10MB for each.
            If the `action` is `edit`, this parameter is required.
          example:
            - https://example.com/image1.jpg
            - https://example.com/image2.jpg
          type: array
          items:
            type: string
            format: uri
        aspect_ratio:
          type: string
          description: >-
            The aspect ratio of the image,nano-banana-2 support all aspect
            ratios, other models only support 21:9, 1:1, 4:3, 3:2, 2:3, 5:4,
            4:5, 3:4, 16:9, 9:16
          enum:
            - '21:9'
            - '1:1'
            - '4:3'
            - '3:2'
            - '2:3'
            - '5:4'
            - '4:5'
            - '3:4'
            - '16:9'
            - '9:16'
            - '1:4'
            - '4:1'
            - '1:8'
            - '8:1'
          example: '1:1'
        model:
          default: nano-banana-fast
          enum:
            - nano-banana-fast
            - nano-banana-pro
            - nano-banana-2
          type: string
          description: The model of the image, default is NanoBananaFast
          example: nano-banana-fast
        resolution:
          type: string
          description: >-
            The resolution of the image, only valid when model is
            nano-banana-pro or nano-banana-2
          enum:
            - 1K
            - 2K
            - 4K
          example: 1K
      required:
        - prompt
        - action
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````