> ## 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.

# Wan Tasks



## OpenAPI

````yaml /openapi/wan.json post /wan/tasks
openapi: 3.0.0
info:
  title: Wan
  version: 1.0.0
  description: API reference for Wan on Ace Data Cloud.
servers:
  - url: https://api.acedata.cloud
    description: Ace Data Cloud API
security:
  - bearerAuth: []
paths:
  /wan/tasks:
    post:
      summary: Wan Tasks
      operationId: queryWanTasks
      parameters:
        - in: header
          name: accept
          schema:
            enum:
              - application/json
            type: string
          required: false
          description: Wan Tasks Param Accept
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: Wan Tasks Id
                ids:
                  type: array
                  items:
                    type: string
                  description: Wan Tasks Ids
                action:
                  enum:
                    - retrieve
                    - retrieve_batch
                  type: string
                  default: retrieve
                  description: Wan Tasks Action
              example:
                action: retrieve
                id: task-id
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/WanTaskRecord'
                  - type: object
                    required:
                      - items
                      - count
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/WanTaskRecord'
                        description: >-
                          Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.Items.Bf585497Bc5E
                      count:
                        type: integer
                        minimum: 0
                        description: >-
                          Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.Count.4Fad6Dd7Daf5
                  - type: object
                    additionalProperties: false
                    description: Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.2.81Df737Cfb3A
              example:
                items: []
                count: 0
          description: Wan 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: Wan Tasks Response 400 Error Code
                          message:
                            type: string
                            example: The specified token is not matched with API.
                            description: Wan Tasks Response 400 Error Message
                      trace_id:
                        type: string
                        description: Wan 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: Wan Tasks Response 400 Error Code 2
                          message:
                            type: string
                            example: The API is not implemented.
                            description: Wan Tasks Response 400 Error Message 2
                      trace_id:
                        type: string
                        description: Wan Tasks Response 400 Trace Id 2
          description: Wan 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: Wan Tasks Response 401 Error Code
                          message:
                            type: string
                            example: The specified token is invalid or wrong.
                            description: Wan Tasks Response 401 Error Message
                      trace_id:
                        type: string
                        description: Wan Tasks Response 401 Trace Id
          description: Wan 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: Wan Tasks Response 429 Error Code
                          message:
                            type: string
                            example: You have exceeded the rate limit.
                            description: Wan Tasks Response 429 Error Message
                      trace_id:
                        type: string
                        description: Wan Tasks Response 429 Trace Id
          description: Wan 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: Wan Tasks Response 500 Error Code
                          message:
                            type: string
                            example: Internal server error.
                            description: Wan Tasks Response 500 Error Message
                      trace_id:
                        type: string
                        description: Wan Tasks Response 500 Trace Id
          description: Wan Tasks Response 500
      security:
        - bearerAuth: []
components:
  schemas:
    WanTaskRecord:
      type: object
      required:
        - id
        - type
        - created_at
        - trace_id
        - request
      properties:
        id:
          type: string
          description: Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.Id.74429C341271
        type:
          type: string
          description: Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.Type.5Fb8B25E77B7
        trace_id:
          type: string
          description: Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.Trace Id.1B42C56894Da
        request:
          $ref: '#/components/schemas/WanTaskRequestPayload'
        response:
          $ref: '#/components/schemas/WanTaskResultPayload'
        created_at:
          type: number
          format: double
          description: Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.Created At.5Dee6425F118
        started_at:
          type: number
          format: double
          description: Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.Started At.31Bc62901575
        finished_at:
          type: number
          format: double
          nullable: true
          description: Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.Finished At.Fa17E4A96A39
        elapsed:
          type: number
          format: double
          minimum: 0
          nullable: true
          description: Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.Elapsed.8Be0B8E52A39
        user_id:
          type: string
          description: Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.User Id.E0Bb5969182C
        actor_user_id:
          type: string
          nullable: true
          description: Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.Actor User Id.19547E184830
        api_id:
          type: string
          description: Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.Api Id.359341Dfc350
        application_id:
          type: string
          description: Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.Application Id.7E16F4146Cb9
        credential_id:
          type: string
          nullable: true
          description: Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.Credential Id.3D7Fe31Ffce1
        authorization_id:
          type: string
          nullable: true
          description: >-
            Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.Authorization
            Id.Fc22D3Bf7019
    WanTaskRequestPayload:
      type: object
      additionalProperties: true
      description: >-
        Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.Wantaskrequestpayload.Afe1C7A0A9Dc
    WanTaskResultPayload:
      type: object
      additionalProperties: true
      description: >-
        Openapi.25E349C9A4904Ae59A96E5952D2Dbcf7.Wantaskresultpayload.Aa370541Ee79
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token from https://platform.acedata.cloud

````