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

# Estimate Video Generation Cost



## OpenAPI

````yaml https://api.mynth.io/openapi.json post /video/generate/estimate
openapi: 3.1.0
info:
  title: Mynth
  description: Mynth API
  version: 1.0.0
servers: []
security: []
paths:
  /video/generate/estimate:
    post:
      tags:
        - Video
      summary: Estimate Video Generation Cost
      operationId: postVideoGenerateEstimate
      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:
        '200':
          description: Video generation request validated and cost estimated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      currency:
                        const: usd
                      estimateKind:
                        const: exact
                        description: >-
                          Video generation always requires a pinned model, so
                          the estimate is exact.
                      estimatedCost:
                        type: string
                        description: >-
                          Estimated cost in USD for the request. Nothing is
                          generated or charged.
                        examples:
                          - '0.05'
                    required:
                      - currency
                      - estimateKind
                      - estimatedCost
                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>`.'

````