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

# Seedream Tasks



## OpenAPI

````yaml /openapi/seedream.json post /seedream/tasks
openapi: 3.0.0
info:
  title: ByteDance Seedream Image Generation
  version: 1.0.0
  description: API reference for ByteDance Seedream Image Generation on Ace Data Cloud.
servers:
  - url: https://api.acedata.cloud
    description: Ace Data Cloud API
security:
  - bearerAuth: []
paths:
  /seedream/tasks:
    post:
      summary: Seedream Tasks
      operationId: querySeedreamTasks
      parameters:
        - in: header
          name: accept
          schema:
            enum:
              - application/json
            type: string
          required: false
          description: Seedream Tasks Param Accept
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: Seedream Tasks Id
                ids:
                  type: array
                  items:
                    type: string
                  description: Seedream Tasks Ids
                action:
                  enum:
                    - retrieve
                    - retrieve_batch
                  type: string
                  default: retrieve
                  description: Seedream Tasks Action
              example:
                action: retrieve
                id: task-id
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/SeedreamTaskRecord'
                  - type: object
                    required:
                      - items
                      - count
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/SeedreamTaskRecord'
                        description: >-
                          Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.Items.2C7A49F19Abd
                      count:
                        type: integer
                        minimum: 0
                        description: >-
                          Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.Count.78536B37239D
                  - type: object
                    additionalProperties: false
                    description: Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.2.1Cf6De1B7969
              example:
                items: []
                count: 0
          description: Seedream 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: Seedream Tasks Response 400 Error Code
                          message:
                            type: string
                            example: The specified token is not matched with API.
                            description: Seedream Tasks Response 400 Error Message
                      trace_id:
                        type: string
                        description: Seedream 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: Seedream Tasks Response 400 Error Code 2
                          message:
                            type: string
                            example: The API is not implemented.
                            description: Seedream Tasks Response 400 Error Message 2
                      trace_id:
                        type: string
                        description: Seedream Tasks Response 400 Trace Id 2
          description: Seedream 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: Seedream Tasks Response 401 Error Code
                          message:
                            type: string
                            example: The specified token is invalid or wrong.
                            description: Seedream Tasks Response 401 Error Message
                      trace_id:
                        type: string
                        description: Seedream Tasks Response 401 Trace Id
          description: Seedream 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: Seedream Tasks Response 429 Error Code
                          message:
                            type: string
                            example: You have exceeded the rate limit.
                            description: Seedream Tasks Response 429 Error Message
                      trace_id:
                        type: string
                        description: Seedream Tasks Response 429 Trace Id
          description: Seedream 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: Seedream Tasks Response 500 Error Code
                          message:
                            type: string
                            example: Internal server error.
                            description: Seedream Tasks Response 500 Error Message
                      trace_id:
                        type: string
                        description: Seedream Tasks Response 500 Trace Id
          description: Seedream Tasks Response 500
      security:
        - bearerAuth: []
components:
  schemas:
    SeedreamTaskRecord:
      type: object
      required:
        - id
        - type
        - created_at
        - trace_id
        - request
      properties:
        id:
          type: string
          description: Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.Id.6F925061E43D
        type:
          type: string
          description: Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.Type.73781F331B53
        trace_id:
          type: string
          description: Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.Trace Id.055C226Ffc6C
        request:
          $ref: '#/components/schemas/SeedreamTaskRequestPayload'
        response:
          $ref: '#/components/schemas/SeedreamTaskResultPayload'
        created_at:
          type: number
          format: double
          description: Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.Created At.24Bf9D7B4B97
        started_at:
          type: number
          format: double
          description: Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.Started At.5700Ea78D20D
        finished_at:
          type: number
          format: double
          nullable: true
          description: Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.Finished At.6675Efce519E
        elapsed:
          type: number
          format: double
          minimum: 0
          nullable: true
          description: Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.Elapsed.Eb412F44B98B
        user_id:
          type: string
          description: Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.User Id.E19D0Bb0F420
        actor_user_id:
          type: string
          nullable: true
          description: Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.Actor User Id.E5A2D75C2Ddc
        api_id:
          type: string
          description: Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.Api Id.87B6Dd5794D8
        application_id:
          type: string
          description: Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.Application Id.D2036E3D7C3B
        credential_id:
          type: string
          nullable: true
          description: Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.Credential Id.290D4Dc24C43
        authorization_id:
          type: string
          nullable: true
          description: >-
            Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.Authorization
            Id.273Bccc216Ff
    SeedreamTaskRequestPayload:
      type: object
      additionalProperties: true
      description: >-
        Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.Seedreamtaskrequestpayload.5334Dd369C04
    SeedreamTaskResultPayload:
      type: object
      additionalProperties: true
      description: >-
        Openapi.A89Ab5C9F95642B5A867Abb3D00D2F75.Seedreamtaskresultpayload.B88896Cecfa1
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token from https://platform.acedata.cloud

````