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

# Sora Videos



## OpenAPI

````yaml /openapi/sora.json post /sora/videos
openapi: 3.0.0
info:
  title: Sora Video Generation
  version: 1.0.0
  description: API reference for Sora Video Generation on Ace Data Cloud.
servers:
  - url: https://api.acedata.cloud
    description: Ace Data Cloud API
security:
  - bearerAuth: []
paths:
  /sora/videos:
    post:
      summary: Sora Videos
      parameters:
        - in: header
          name: accept
          schema:
            enum:
              - application/json
              - application/x-ndjson
            type: string
          required: false
          description: Sora Videos Param Accept
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - prompt
                - model
              properties:
                model:
                  enum:
                    - sora-2
                    - sora-2-pro
                  type: string
                  example: sora-2
                  description: Sora Videos Model
                duration:
                  enum:
                    - 4
                    - 8
                    - 10
                    - 12
                    - 15
                    - 25
                  type: integer
                  description: Sora Videos Duration
                orientation:
                  enum:
                    - landscape
                    - portrait
                  type: string
                  description: Sora Videos Orientation
                size:
                  enum:
                    - small
                    - large
                    - 720x1280
                    - 1280x720
                    - 1024x1792
                    - 1792x1024
                  type: string
                  description: Sora Videos Size
                prompt:
                  type: string
                  example: cat running on the river
                  description: Sora Videos Prompt
                character_url:
                  type: string
                  example: https://cdn.acedata.cloud/pdidf5.mp4
                  description: Sora Videos Character Url
                character_start:
                  type: integer
                  description: Sora Videos Character Start
                character_end:
                  type: integer
                  description: Sora Videos Character End
                image_urls:
                  type: array
                  items:
                    type: string
                  description: Sora Videos Image Urls
                callback_url:
                  type: string
                  description: Sora Videos Callback Url
                async:
                  type: boolean
                  description: Sora Videos Async
                version:
                  enum:
                    - '1.0'
                    - '2.0'
                  type: string
                  default: '1.0'
                  description: Sora Videos Version
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  task_id: b8976e18-32dc-4718-9ed8-1ea090fcb6ea
                  trace_id: fb751e1e-4705-49ea-9fd4-5024b7865ea2
                  data:
                    - id: sora-2:task_01k777hjrbfrgs2060q5zvf2a5
                      video_url: https://cdn.acedata.cloud/43a57990c0.mp4
                      state: succeeded
                properties:
                  success:
                    type: boolean
                    description: Sora Videos Response 200 Success
                  task_id:
                    type: string
                    description: Sora Videos Response 200 Task Id
                  trace_id:
                    type: string
                    description: Sora Videos Response 200 Trace Id
                  data:
                    type: array
                    description: Sora Videos Response 200 Data
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Sora Videos Response 200 Data Id
                        video_url:
                          type: string
                          description: Sora Videos Response 200 Data Video Url
                        state:
                          type: string
                          enum:
                            - pending
                            - succeeded
                            - failed
                          description: Sora Videos Response 200 Data State
          description: Sora Videos 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: Sora Videos Response 400 Error Code
                          message:
                            type: string
                            example: The specified token is not matched with API.
                            description: Sora Videos Response 400 Error Message
                      trace_id:
                        type: string
                        description: Sora Videos 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: Sora Videos Response 400 Error Code 2
                          message:
                            type: string
                            example: The API is not implemented.
                            description: Sora Videos Response 400 Error Message 2
                      trace_id:
                        type: string
                        description: Sora Videos Response 400 Trace Id 2
                  - type: object
                    example:
                      error:
                        code: disabled
                        message: >-
                          Your application has been disabled by Ace Data Cloud
                          due to abnormal usage behavior, please contact our
                          support to get more information.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: disabled
                            description: Sora Videos Response 400 Error Code 3
                          message:
                            type: string
                            example: >-
                              Your application has been disabled by Ace Data
                              Cloud due to abnormal usage behavior, please
                              contact our support to get more information.
                            description: Sora Videos Response 400 Error Message 3
                      trace_id:
                        type: string
                        description: Sora Videos Response 400 Trace Id 3
                  - type: object
                    example:
                      error:
                        code: bad_request
                        message: model is invalid.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: bad_request
                            description: Sora Videos Response 400 Error Code 4
                          message:
                            type: string
                            example: model is invalid.
                            description: Sora Videos Response 400 Error Message 4
                      trace_id:
                        type: string
                        description: Sora Videos Response 400 Trace Id 4
                  - type: object
                    example:
                      error:
                        code: no_token
                        message: No token specified for the request.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: no_token
                            description: Sora Videos Response 400 Error Code 5
                          message:
                            type: string
                            example: No token specified for the request.
                            description: Sora Videos Response 400 Error Message 5
                      trace_id:
                        type: string
                        description: Sora Videos Response 400 Trace Id 5
          description: Sora Videos 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: Sora Videos Response 401 Error Code
                          message:
                            type: string
                            example: The specified token is invalid or wrong.
                            description: Sora Videos Response 401 Error Message
                      trace_id:
                        type: string
                        description: Sora Videos Response 401 Trace Id
                  - type: object
                    example:
                      error:
                        code: token_expired
                        message: token expired.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: token_expired
                            description: Sora Videos Response 401 Error Code 2
                          message:
                            type: string
                            example: token expired.
                            description: Sora Videos Response 401 Error Message 2
                      trace_id:
                        type: string
                        description: Sora Videos Response 401 Trace Id 2
                  - type: object
                    example:
                      error:
                        code: token_mismatched
                        message: token and api does not match.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: token_mismatched
                            description: Sora Videos Response 401 Error Code 3
                          message:
                            type: string
                            example: token and api does not match.
                            description: Sora Videos Response 401 Error Message 3
                      trace_id:
                        type: string
                        description: Sora Videos Response 401 Trace Id 3
          description: Sora Videos Response 401
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: used_up
                        message: >-
                          Your balance is not sufficient for current request,
                          please buy more in Ace Data Cloud.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: used_up
                            description: Sora Videos Response 403 Error Code
                          message:
                            type: string
                            example: >-
                              Your balance is not sufficient for current
                              request, please buy more in Ace Data Cloud.
                            description: Sora Videos Response 403 Error Message
                      trace_id:
                        type: string
                        description: Sora Videos Response 403 Trace Id
          description: Sora Videos Response 403
        '404':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: no_api
                        message: API does not exist, please make sure url is correct.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: no_api
                            description: Sora Videos Response 404 Error Code
                          message:
                            type: string
                            example: >-
                              API does not exist, please make sure url is
                              correct.
                            description: Sora Videos Response 404 Error Message
                      trace_id:
                        type: string
                        description: Sora Videos Response 404 Trace Id
          description: Sora Videos Response 404
        '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: Sora Videos Response 429 Error Code
                          message:
                            type: string
                            example: You have exceeded the rate limit.
                            description: Sora Videos Response 429 Error Message
                      trace_id:
                        type: string
                        description: Sora Videos Response 429 Trace Id
          description: Sora Videos 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: Sora Videos Response 500 Error Code
                          message:
                            type: string
                            example: Internal server error.
                            description: Sora Videos Response 500 Error Message
                      trace_id:
                        type: string
                        description: Sora Videos Response 500 Trace Id
          description: Sora Videos Response 500
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token from https://platform.acedata.cloud

````