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

# Quote a generation

> Get the live credit price of one generation with your exact inputs before you run it. Free; nothing is charged.

Prices one run of a model with these inputs (resolution, duration, audio, and the length of any attached video or audio). Nothing is charged.

`estimate` is `true` while required files are still missing, so the final price may differ; `credits` can be `null` for models that can't be priced until their files are attached.

```bash theme={null}
curl -X POST "https://mvp.tryunsora.com/api/v1/catalog/quote" \
  -H "Authorization: Bearer uns_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2.5",
    "inputs": { "prompt": "A red fox running through fresh snow", "duration": 8, "resolution": "720p" }
  }'
```

Pass the quoted `credits` as `expectedCredits` to [Generate](https://tryunsora.com/docs/api-reference/catalog/generate.md) to be sure you're never charged more.


## OpenAPI

````yaml POST /catalog/quote
openapi: 3.1.0
info:
  title: Unsora API
  version: 1.4.0
  description: >-
    Public API for Unsora integrations. Authenticate with an Unsora API key
    (`uns_…`, created under Developers → API keys in the app) as a Bearer token
    in the Authorization header. Limit: 60 requests per minute per key; over it,
    429 with code RATE_LIMIT_EXCEEDED.
servers:
  - url: https://mvp.tryunsora.com/api/v1
    description: Production
  - url: /api/v1
    description: This server
security: []
tags:
  - name: User
  - name: Models
    description: >-
      Every video, image and motion-control model, with each model's inputs
      taken from the provider's own request schema and prices quoted live. One
      generate endpoint covers all of them.
  - name: Video
  - name: Image
  - name: Influencer
  - name: Thumbnail
  - name: Clipping
  - name: Music
  - name: Voiceover
  - name: Upscaler
  - name: Subtitle removal
  - name: Motion control
  - name: Avatar
  - name: Movie materials
  - name: Voice clones
  - name: Voice changer
  - name: Uploads
  - name: Scheduler
paths:
  /catalog/quote:
    post:
      tags:
        - Models
      summary: Price a generation
      description: >-
        Live credit price for one run with these exact inputs (resolution,
        duration, audio, and the length of attached video or audio). Free;
        nothing is charged.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CatalogRequest'
      responses:
        '200':
          description: Quote
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CatalogQuoteResponse'
        '400':
          description: Invalid model, mode or inputs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    CatalogRequest:
      type: object
      required:
        - model
      properties:
        model:
          type: string
          description: >-
            Model key from GET /catalog. Older names listed in the model's
            `legacyDbModels` (e.g. `veo`, `kling-pro`, `seedance_2.0`) also
            work. Retired names such as `wan`, `wan_2.6`, `gpt-image-1.5` and
            `seedream-v5-lite` are rejected here; only POST /videos/create and
            POST /image-generations/create translate them.
          example: seedance-2.5
        category:
          type: string
          enum:
            - video
            - image
            - motion-control
          description: >-
            Optional guard: reject the request if the model is from another
            category.
        mode:
          type: string
          description: Mode key from GET /catalog. Omit to pick it from the attached media.
          example: omni
        inputs:
          type: object
          additionalProperties: true
          description: >-
            Inputs in the provider's field names, as listed by GET /catalog.
            Media fields take URLs; files hosted outside Unsora are imported
            into your library first. Omitted fields use the model's defaults.
          example:
            prompt: A red fox running through fresh snow at sunrise
            aspect_ratio: '9:16'
            resolution: 720p
            duration: 8
            generate_audio: true
    CatalogQuoteResponse:
      type: object
      properties:
        success:
          type: boolean
        credits:
          type:
            - integer
            - 'null'
          description: >-
            Credits one run costs. Null when the model can't be priced until its
            required files are attached.
        mode:
          type: string
        modelId:
          type: string
          description: Provider endpoint the request routes to.
        estimate:
          type: boolean
          description: >-
            True while required files are missing, so the final price may
            differ.
      required:
        - success
        - credits
        - estimate
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
        error:
          type: string
        code:
          type: string
        message:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Unsora API key (`uns_…`). A Clerk session token also works.

````

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