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

# Retrieve Result

> This endpoint is used to query the result of an asynchronous request.



## OpenAPI

````yaml GET /paas/v4/async-result/{id}
openapi: 3.0.1
info:
  title: Z.AI API
  description: Z.AI API available endpoints
  license:
    name: Z.AI Developer Agreement and Policy
    url: https://chat.z.ai/legal-agreement/terms-of-service
  version: 1.0.0
  contact:
    name: Z.AI Developers
    url: https://chat.z.ai/legal-agreement/privacy-policy
    email: user_feedback@z.ai
servers:
  - url: https://api.z.ai/api
    description: Production server
security:
  - bearerAuth: []
paths:
  /paas/v4/async-result/{id}:
    get:
      description: This endpoint is used to query the result of an asynchronous request.
      parameters:
        - $ref: '#/components/parameters/AcceptLanguage'
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: Task id.
      responses:
        '200':
          description: Processing successful
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/AsyncVideoGenerationResponse'
                    title: Video Generation
                  - $ref: '#/components/schemas/AsyncImageGenerationResponse'
                    title: Image Generation
        default:
          description: The request has failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    AcceptLanguage:
      name: Accept-Language
      in: header
      schema:
        type: string
        description: Config desired response language for HTTP requests.
        default: en-US,en
        example: en-US,en
        enum:
          - en-US,en
      required: false
  schemas:
    AsyncVideoGenerationResponse:
      type: object
      properties:
        model:
          type: string
          description: Model name.
        task_status:
          type: string
          description: >-
            Processing status, `PROCESSING` (processing), `SUCCESS` (success),
            `FAIL` (failure). Note: Processing status needs to be obtained via
            query.
        video_result:
          type: array
          description: Video generation results.
          items:
            type: object
            properties:
              url:
                type: string
                description: Video URL.
              cover_image_url:
                type: string
                description: Video cover URL.
        request_id:
          description: >-
            Task number submitted by the user during the client request or
            generated by the platform.
          type: string
    AsyncImageGenerationResponse:
      type: object
      properties:
        model:
          type: string
          description: Model name.
        task_status:
          type: string
          description: >-
            Processing status, `PROCESSING` (processing), `SUCCESS` (success),
            `FAIL` (failure). Note: Processing status needs to be obtained via
            query.
        image_result:
          type: array
          description: Array containing the generated image URLs.
          items:
            type: object
            properties:
              url:
                type: string
                description: >-
                  Image URL. The temporary link expires after `30` days, please
                  store it promptly.
        request_id:
          type: string
          description: >-
            Unique ID identifying this request, can be submitted by the user or
            generated by the platform.
    Error:
      required:
        - code
        - message
      type: object
      description: The request has failed.
      properties:
        code:
          type: integer
          format: int32
          description: Error code.
        message:
          type: string
          description: Error message.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Use the following format for authentication: Bearer [<your api
        key>](https://z.ai/manage-apikey/apikey-list)

````