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

# Generate videos based on prompt and image frames



## OpenAPI

````yaml /openapi/luma.json post /luma/videos
openapi: 3.0.0
info:
  title: Luma Video Generation
  version: 1.0.0
  description: API reference for Luma Video Generation on Ace Data Cloud.
servers:
  - url: https://api.acedata.cloud
    description: Ace Data Cloud API
security:
  - bearerAuth: []
paths:
  /luma/videos:
    post:
      summary: Generate videos based on prompt and image frames
      parameters:
        - in: header
          name: accept
          schema:
            enum:
              - application/json
            type: string
          required: false
          description: Luma Videos Param Accept
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                loop:
                  type: boolean
                  default: false
                  description: Luma Videos Loop
                action:
                  enum:
                    - generate
                    - extend
                  type: string
                  default: generate
                  description: Luma Videos Action
                prompt:
                  type: string
                  example: Astronauts shuttle from space to volcano
                  description: Luma Videos Prompt
                timeout:
                  type: number
                  default: 300
                  description: Luma Videos Timeout
                video_id:
                  type: string
                  description: Luma Videos Video Id
                aspect_ratio:
                  type: string
                  description: Luma Videos Aspect Ratio
                video_url:
                  type: string
                  description: Luma Videos Video Url
                enhancement:
                  type: boolean
                  default: true
                  description: Luma Videos Enhancement
                callback_url:
                  type: string
                  description: Luma Videos Callback Url
                async:
                  type: boolean
                  description: Luma Videos Async
                end_image_url:
                  type: string
                  example: https://cdn.acedata.cloud/0iad3k.png
                  description: Luma Videos End Image Url
                start_image_url:
                  type: string
                  example: https://cdn.acedata.cloud/r9vsv9.png
                  description: Luma Videos Start Image Url
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                example:
                  state: completed
                  prompt: Astronauts shuttle from space to volcano
                  success: true
                  task_id: 5636d6ba-957f-475e-a98a-718a07ee89a6
                  video_id: b4ef4c5e-9680-41c8-a678-0ce2ce6194de
                  video_url: https://cdn.acedata.cloud/43a57990c0.mp4
                  video_width: 1552
                  video_height: 656
                  thumbnail_url: https://cdn.acedata.cloud/4hfydw.jpg
                  thumbnail_width: 1552
                  thumbnail_height: 656
                properties:
                  state:
                    type: string
                    description: Luma Videos Response 200 State
                  prompt:
                    type: string
                    description: Luma Videos Response 200 Prompt
                  success:
                    type: boolean
                    description: Luma Videos Response 200 Success
                  task_id:
                    type: string
                    description: Luma Videos Response 200 Task Id
                  video_id:
                    type: string
                    description: Luma Videos Response 200 Video Id
                  video_url:
                    type: string
                    description: Luma Videos Response 200 Video Url
                  video_width:
                    type: number
                    description: Luma Videos Response 200 Video Width
                  video_height:
                    type: number
                    description: Luma Videos Response 200 Video Height
                  thumbnail_url:
                    type: string
                    description: Luma Videos Response 200 Thumbnail Url
                  thumbnail_width:
                    type: number
                    description: Luma Videos Response 200 Thumbnail Width
                  thumbnail_height:
                    type: number
                    description: Luma Videos Response 200 Thumbnail Height
          description: Luma Videos Response 200
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: bad_request
                        message: The json payload is not valid to request the API
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: bad_request
                            description: Luma Videos Response 400 Error Code
                          message:
                            type: string
                            example: prompt is required
                            description: Luma Videos Response 400 Error Message
                      trace_id:
                        type: string
                        description: Luma Videos Response 400 Trace Id
                  - 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: Luma Videos Response 400 Error Code 2
                          message:
                            type: string
                            example: The specified token is not matched with API.
                            description: Luma Videos Response 400 Error Message 2
                      trace_id:
                        type: string
                        description: Luma Videos Response 400 Trace Id 2
                  - 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: Luma Videos Response 400 Error Code 3
                          message:
                            type: string
                            example: The API is not implemented.
                            description: Luma Videos Response 400 Error Message 3
                      trace_id:
                        type: string
                        description: Luma Videos Response 400 Trace Id 3
          description: Luma 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: Luma Videos Response 401 Error Code
                          message:
                            type: string
                            example: The specified token is invalid or wrong.
                            description: Luma Videos Response 401 Error Message
                      trace_id:
                        type: string
                        description: Luma Videos Response 401 Trace Id
          description: Luma Videos Response 401
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: forbidden
                        message: >-
                          Sorry! Our Al moderators feel your prompt might be
                          against our community standards.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: forbidden
                            description: Luma Videos Response 403 Error Code
                          message:
                            type: string
                            example: >-
                              Sorry! Our Al moderators feel your prompt might be
                              against our community standards.
                            description: Luma Videos Response 403 Error Message
                      trace_id:
                        type: string
                        description: Luma Videos Response 403 Trace Id
          description: Luma Videos Response 403
        '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: Luma Videos Response 429 Error Code
                          message:
                            type: string
                            example: You have exceeded the rate limit.
                            description: Luma Videos Response 429 Error Message
                      trace_id:
                        type: string
                        description: Luma Videos Response 429 Trace Id
          description: Luma 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: Luma Videos Response 500 Error Code
                          message:
                            type: string
                            example: Internal server error.
                            description: Luma Videos Response 500 Error Message
                      trace_id:
                        type: string
                        description: Luma Videos Response 500 Trace Id
          description: Luma Videos Response 500
        '504':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: timeout
                        message: Timeout to generate the image.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: timeout
                            description: Luma Videos Response 504 Error Code
                          message:
                            type: string
                            example: Timeout to generate the image.
                            description: Luma Videos Response 504 Error Message
                      trace_id:
                        type: string
                        description: Luma Videos Response 504 Trace Id
          description: Luma Videos Response 504
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token from https://platform.acedata.cloud

````