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

# Hailuo Tasks



## OpenAPI

````yaml /openapi/hailuo.json post /hailuo/tasks
openapi: 3.0.0
info:
  title: Hailuo Video Generation
  version: 1.0.0
  description: API reference for Hailuo Video Generation on Ace Data Cloud.
servers:
  - url: https://api.acedata.cloud
    description: Ace Data Cloud API
security:
  - bearerAuth: []
paths:
  /hailuo/tasks:
    post:
      summary: Hailuo Tasks
      operationId: queryHailuoTasks
      parameters:
        - in: header
          name: accept
          schema:
            enum:
              - application/json
            type: string
          required: false
          description: Hailuo Tasks Param Accept
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: Hailuo Tasks Id
                ids:
                  type: array
                  items:
                    type: string
                  description: Hailuo Tasks Ids
                action:
                  enum:
                    - retrieve
                    - retrieve_batch
                  type: string
                  default: retrieve
                  description: Hailuo Tasks Action
              example:
                action: retrieve
                id: task-id
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/HailuoTaskRecord'
                  - type: object
                    required:
                      - items
                      - count
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/HailuoTaskRecord'
                        description: >-
                          Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.Items.2Db7600C6C5E
                      count:
                        type: integer
                        minimum: 0
                        description: >-
                          Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.Count.89C40F1042F1
                  - type: object
                    additionalProperties: false
                    description: Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.2.33Ec84554263
              example:
                items: []
                count: 0
          description: Hailuo Tasks Response 200
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: token_mismatched
                        message: The specified token is not matched with API.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: token_mismatched
                            description: Hailuo Tasks Response 400 Error Code
                          message:
                            type: string
                            example: The specified token is not matched with API.
                            description: Hailuo Tasks Response 400 Error Message
                      trace_id:
                        type: string
                        description: Hailuo Tasks Response 400 Trace Id
                  - type: object
                    example:
                      error:
                        code: api_not_implemented
                        message: The API is not implemented.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: api_not_implemented
                            description: Hailuo Tasks Response 400 Error Code 2
                          message:
                            type: string
                            example: The API is not implemented.
                            description: Hailuo Tasks Response 400 Error Message 2
                      trace_id:
                        type: string
                        description: Hailuo Tasks Response 400 Trace Id 2
          description: Hailuo Tasks Response 400
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: invalid_token
                        message: The specified token is invalid or wrong.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: invalid_token
                            description: Hailuo Tasks Response 401 Error Code
                          message:
                            type: string
                            example: The specified token is invalid or wrong.
                            description: Hailuo Tasks Response 401 Error Message
                      trace_id:
                        type: string
                        description: Hailuo Tasks Response 401 Trace Id
          description: Hailuo Tasks Response 401
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: too_many_requests
                        message: You have exceeded the rate limit.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: too_many_requests
                            description: Hailuo Tasks Response 429 Error Code
                          message:
                            type: string
                            example: You have exceeded the rate limit.
                            description: Hailuo Tasks Response 429 Error Message
                      trace_id:
                        type: string
                        description: Hailuo Tasks Response 429 Trace Id
          description: Hailuo Tasks Response 429
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: api_error
                        message: Internal server error.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: api_error
                            description: Hailuo Tasks Response 500 Error Code
                          message:
                            type: string
                            example: Internal server error.
                            description: Hailuo Tasks Response 500 Error Message
                      trace_id:
                        type: string
                        description: Hailuo Tasks Response 500 Trace Id
          description: Hailuo Tasks Response 500
      security:
        - bearerAuth: []
components:
  schemas:
    HailuoTaskRecord:
      type: object
      required:
        - id
        - type
        - created_at
        - trace_id
        - request
      properties:
        id:
          type: string
          description: Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.Id.Efccfe5F3842
        type:
          type: string
          description: Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.Type.E15C4F0D0389
        trace_id:
          type: string
          description: Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.Trace Id.122B0F032450
        request:
          $ref: '#/components/schemas/HailuoTaskRequestPayload'
        response:
          $ref: '#/components/schemas/HailuoTaskResultPayload'
        created_at:
          type: number
          format: double
          description: Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.Created At.670B04F48A1B
        started_at:
          type: number
          format: double
          description: Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.Started At.4Fd9Aa4Deb5A
        finished_at:
          type: number
          format: double
          nullable: true
          description: Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.Finished At.1F9B055E93Ff
        elapsed:
          type: number
          format: double
          minimum: 0
          nullable: true
          description: Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.Elapsed.Ba66C94B3349
        user_id:
          type: string
          description: Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.User Id.D1Fbf114E8A0
        actor_user_id:
          type: string
          nullable: true
          description: Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.Actor User Id.60D60E33026A
        api_id:
          type: string
          description: Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.Api Id.7Ac8D6400Aeb
        application_id:
          type: string
          description: Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.Application Id.A873233Dfe9F
        credential_id:
          type: string
          nullable: true
          description: Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.Credential Id.2Cfb9E7Ff870
        authorization_id:
          type: string
          nullable: true
          description: >-
            Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.Authorization
            Id.714De8F44565
    HailuoTaskRequestPayload:
      type: object
      additionalProperties: true
      description: >-
        Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.Hailuotaskrequestpayload.Ac99Eb9595Ae
    HailuoTaskResultPayload:
      type: object
      additionalProperties: true
      description: >-
        Openapi.51Dca1Fbcc124A4Ab31A01B62043Abcd.Hailuotaskresultpayload.7Bccdfc82026
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token from https://platform.acedata.cloud

````