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

# Generate Video



## OpenAPI

````yaml https://api.mynth.io/openapi.json post /video/generate
openapi: 3.1.0
info:
  title: Mynth
  description: Mynth API
  version: 1.0.0
servers: []
security: []
paths:
  /video/generate:
    post:
      tags:
        - Video
      summary: Generate Video
      operationId: postVideoGenerate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  const: prunaai/p-video
                  examples:
                    - prunaai/p-video
                prompt:
                  type: string
                  title: Prompt
                  description: Positive prompt.
                  examples:
                    - A cat surfing a wave at sunset
                  maxLength: 8192
                access:
                  type: object
                  description: >-
                    Controls whether the create-task response should include a
                    short-lived Public Access Token.


                    That token can be passed to browser or client-side code for
                    polling task status and task videos

                    without exposing your API key.
                  properties:
                    pat:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          default: true
                  required:
                    - pat
                audio:
                  type: boolean
                  description: >-
                    Enable model-native generated audio. Only supported by
                    models with audio capability.
                duration:
                  type: number
                  description: >-
                    Video duration in seconds. Defaults to the model's default
                    duration.
                  maximum: 60
                  minimum: 1
                inputs:
                  type: array
                  maxItems: 5
                  items:
                    anyOf:
                      - type: string
                        maxLength: 2048
                        minLength: 1
                      - type: object
                        properties:
                          source:
                            type: object
                            properties:
                              type:
                                const: url
                              url:
                                type: string
                            required:
                              - type
                              - url
                          type:
                            const: image
                          as:
                            enum:
                              - auto
                              - first_frame
                              - last_frame
                              - reference
                        required:
                          - source
                          - type
                        additionalProperties: false
                metadata:
                  type: object
                negative_prompt:
                  type: string
                  maxLength: 8192
                resolution:
                  anyOf:
                    - const: 1080p
                      description: Resolution tier. Defaults to the model's default tier.
                    - const: 480p
                      description: Resolution tier. Defaults to the model's default tier.
                    - const: 4k
                      description: Resolution tier. Defaults to the model's default tier.
                    - const: 720p
                      description: Resolution tier. Defaults to the model's default tier.
                  description: Resolution tier. Defaults to the model's default tier.
                webhook:
                  type: object
                  properties:
                    custom:
                      type: array
                      maxItems: 5
                      minItems: 1
                      items:
                        type: object
                        properties:
                          url:
                            type: string
                        required:
                          - url
                    dashboard:
                      const: false
                      description: >-
                        Disable dashboard-managed webhooks for this task.
                        Request-level custom webhooks are still sent.
              required:
                - model
                - prompt
              additionalProperties: false
      responses:
        '201':
          description: Video generation task created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      estimatedCost:
                        type: string
                        description: >-
                          Estimated cost in USD reserved for this task. Failed
                          videos are refunded, so the final cost may be lower.
                        examples:
                          - '0.05'
                      taskId:
                        type: string
                        description: Task ID
                        examples:
                          - tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP
                      access:
                        type: object
                        description: >-
                          Returned when `access.pat.enabled` is true.


                          Currently the generate endpoint only returns a Public
                          Access Token.
                        properties:
                          publicAccessToken:
                            type: string
                            description: >-
                              Short-lived Public Access Token for polling task
                              status and video results.


                              This token is safe to return to frontend code and
                              can be used instead of your API key for polling

                              public task state.
                            examples:
                              - pat_eyJhbGciOi...
                        required:
                          - publicAccessToken
                    required:
                      - estimatedCost
                      - taskId
                required:
                  - data
      security:
        - apiKeyAuth: []
        - oauthAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: 'Mynth API key sent as `Authorization: Bearer <api-key>`.'
    oauthAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'OAuth access token sent as `Authorization: Bearer <access-token>`.'

````