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

# Quote a video before generation

> Returns resolved settings, expiry, and customer_price without starting generation or reserving credits. Sound defaults on unless silence is requested. An image-to-video quote requires one owned input asset. Review a ready quote and its API credit price before accepting it at /v1/execute. Quotes normally expire after ten minutes for new acceptance.



## OpenAPI

````yaml /openapi/managed.yaml post /v1/video/quotes
openapi: 3.1.0
info:
  title: DreamLayer Agent API
  version: '1'
  description: >-
    Generate images, sprite sheets, and quoted videos; follow executions and
    retrieve owned outputs. Start with https://docs.dreamlayer.io/agent-api for
    authentication, limits, runnable examples, event recovery, and billing.
    Sprite sheets require account capability support and an approved credit
    ceiling. Video requires a quote before acceptance. Video schemas document
    the customer integration fields; response objects may contain additional
    fields. See https://docs.dreamlayer.io/agent-api/video.
servers:
  - url: https://api.dreamlayer.io
security:
  - bearerAuth: []
paths:
  /v1/video/quotes:
    post:
      summary: Quote a video before generation
      description: >-
        Returns resolved settings, expiry, and customer_price without starting
        generation or reserving credits. Sound defaults on unless silence is
        requested. An image-to-video quote requires one owned input asset.
        Review a ready quote and its API credit price before accepting it at
        /v1/execute. Quotes normally expire after ten minutes for new
        acceptance.
      operationId: createVideoQuote
      parameters:
        - $ref: '#/components/parameters/Version'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoQuoteRequest'
            examples:
              text:
                value:
                  operation: text_to_video
                  prompt: >-
                    A slow camera push toward a forest waterfall with rushing
                    water and birdsong.
                  options:
                    duration_seconds: 10
                    resolution: 720p
                    aspect_ratio: '16:9'
                    generate_audio: true
              image:
                value:
                  operation: image_to_video
                  input_asset_id: d34db33f-0000-4000-8000-000000000001
                  input_mode: first_frame
                  prompt: >-
                    Animate the scene with gentle movement and soft outdoor
                    ambience.
                  options:
                    duration_seconds: 10
                    generate_audio: true
      responses:
        '200':
          description: >-
            A ready or pricing_pending quote. Only ready quotes can be accepted.
            Documented integration fields are a subset of the response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoQuote'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/VideoFailure'
        '404':
          $ref: '#/components/responses/VideoFailure'
        '422':
          $ref: '#/components/responses/VideoOrSharedFailure'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/VideoFailure'
components:
  parameters:
    Version:
      name: DreamLayer-Version
      in: header
      required: true
      schema:
        type: string
        const: '1'
  schemas:
    VideoQuoteRequest:
      type: object
      additionalProperties: false
      required:
        - prompt
      description: >-
        Describe a video. Exactly one source is required for image_to_video and
        none for text_to_video. The quote validates prompt/options consistency
        and source ownership, expiry, and normalized dimensions. It does not
        start generation.
      properties:
        operation:
          type:
            - string
            - 'null'
          enum:
            - text_to_video
            - image_to_video
            - null
        prompt:
          type: string
          minLength: 1
          maxLength: 4000
          pattern: \S
        input_asset_id:
          type:
            - string
            - 'null'
          format: uuid
        input_mode:
          type:
            - string
            - 'null'
          enum:
            - text
            - first_frame
            - null
        options:
          $ref: '#/components/schemas/VideoOptions'
        context:
          $ref: '#/components/schemas/VideoContext'
    VideoQuote:
      type: object
      additionalProperties: true
      description: >-
        Customer integration fields. Additional response fields are allowed;
        this is not an exhaustive wire schema. Review resolved settings and
        customer_price, not a hardcoded price.
      required:
        - status
        - quote_id
        - expires_at
        - resolved_settings
        - customer_price
        - pricing_version
        - retention_days
      properties:
        status:
          type: string
          enum:
            - ready
            - pricing_pending
        quote_id:
          type: string
          format: uuid
        expires_at:
          type: string
          format: date-time
        resolved_settings:
          type: object
          additionalProperties: false
          required:
            - operation
            - duration_seconds
            - resolution
            - aspect_ratio
            - generate_audio
          properties:
            operation:
              type: string
              enum:
                - text_to_video
                - image_to_video
            duration_seconds:
              type: integer
            resolution:
              type: string
              const: 720p
            aspect_ratio:
              type: string
            generate_audio:
              type: boolean
        customer_price:
          type: object
          additionalProperties: false
          required:
            - currency
            - amount
          properties:
            currency:
              type: string
              const: api_credits
            amount:
              type:
                - string
                - 'null'
              description: Decimal API credit amount, or null while pricing is pending.
        pricing_version:
          type:
            - string
            - 'null'
        retention_days:
          type: integer
          const: 30
    VideoOptions:
      type: object
      additionalProperties: false
      description: >-
        Settings for the documented automatic Video workflow. Defaults are
        resolved with the prompt; conflicting instructions are rejected. This
        request schema describes the supported integration subset, not every
        server field.
      properties:
        duration_seconds:
          type:
            - integer
            - 'null'
          minimum: 4
          maximum: 30
          description: >-
            Whole seconds. Omitted or null uses a supported prompt duration,
            otherwise ten seconds. Quote validation can reject unsupported
            combinations.
        resolution:
          type: string
          enum:
            - 720p
          default: 720p
        aspect_ratio:
          type:
            - string
            - 'null'
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
            - null
          description: >-
            Text video only; defaults to 16:9 unless the prompt supplies a
            ratio. Omit for image-to-video, which uses a source-driven profile.
        generate_audio:
          type:
            - boolean
            - 'null'
          description: >-
            Omitted or null defaults to sound on unless the prompt requests
            silence. Explicit false requests silence. Conflicting sound
            instructions are rejected.
    VideoContext:
      type: object
      additionalProperties: false
      properties:
        use_case:
          type:
            - string
            - 'null'
          enum:
            - product_showcase
            - general
            - null
        requested_background:
          type: string
          enum:
            - clean_white
            - non_white
            - unknown
          default: unknown
    ErrorEnvelope:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - reason
            - message
            - category
            - retryable
            - request_id
          properties:
            code:
              type: string
              description: Legacy uppercase code retained for existing clients.
            reason:
              $ref: '#/components/schemas/PublicErrorReason'
            message:
              type: string
            category:
              type: string
            retryable:
              type: boolean
            request_id:
              type: string
              format: uuid
            details:
              type: object
              description: >-
                Optional sanitized validation detail. Submitted values are never
                echoed.
              additionalProperties: true
    VideoErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - reason
            - message
            - retryable
          properties:
            code:
              type: string
            reason:
              type: string
            message:
              type: string
            retryable:
              type: boolean
    PublicErrorReason:
      type: string
      enum:
        - invalid_request
        - authentication_failed
        - access_denied
        - resource_not_found
        - insufficient_credits
        - conflict
        - too_many_active_jobs
        - rate_limited
        - quota_exceeded
        - content_refused
        - temporarily_unavailable
        - generation_failed
        - insufficient_frames
        - prompt_policy_blocked
        - feature_unavailable
  responses:
    Unauthenticated:
      description: >-
        Invalid or revoked API key. A missing Authorization header returns 422
        invalid_request.
      headers:
        Cache-Control:
          schema:
            type: string
            const: no-store
        Pragma:
          schema:
            type: string
            const: no-cache
        X-Request-ID:
          schema:
            type: string
            format: uuid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    VideoFailure:
      description: >-
        Video request rejected. Inspect error.reason and retryable. Credit or
        capacity rejection on acceptance does not create an execution.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VideoErrorEnvelope'
    VideoOrSharedFailure:
      description: >-
        Video business error or shared validation, authentication, or
        request-limit error. See the operation-specific recovery guide.
      content:
        application/json:
          schema:
            anyOf:
              - $ref: '#/components/schemas/VideoErrorEnvelope'
              - $ref: '#/components/schemas/ErrorEnvelope'
    RateLimited:
      description: >-
        Synchronous request or open-stream limit reached. See
        https://docs.dreamlayer.io/agent-api/limits for scopes and backoff.
        Retry-After and remaining-request headers are not guaranteed.
      headers:
        Cache-Control:
          schema:
            type: string
            const: no-store
        Pragma:
          schema:
            type: string
            const: no-cache
        X-Request-ID:
          schema:
            type: string
            format: uuid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: RATE_LIMITED
              reason: rate_limited
              message: Too many requests. Please try again shortly.
              category: RATE_LIMITED
              retryable: true
              request_id: d34db33f-0000-4000-8000-000000000001
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.