---
title: "Quote One Click Animation"
method: POST
path: "/v1/animations/quote"
tags: ["Public API"]
---

# Quote One Click Animation

`POST /v1/animations/quote`

## Request

- Base URL: `https://api.animgen.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.animgen.com/v1/animations/quote`
- Auth: HTTP bearer

## Request body

- AnimationCreateRequest
  - `input` GenerationInput, required
    - `first_frame` union, required: Required starting image; use the type discriminator to select an input representation.
      - object
        - `type` 'file', required
        - `file_id` string, uuid, required: Owned public file ID from POST /files or complete_image_upload; not a Studio upload ID.
      - object
        - `type` 'base64', required
        - `media_type` 'image/png' | 'image/jpeg' | 'image/webp', required: Actual image MIME type.
        - `data` string, required: Pure Base64 without a data URL prefix; decoded limits: 10 MiB per image, 20 MiB total.
      - object
        - `type` 'url', required
        - `url` string, required: Public HTTPS image on port 443, without credentials or fragments. Private networks and unsafe redirects are rejected. Keep bytes stable across retries.
    - `last_frame` union: Optional end image; the selected model must support first/last-frame mode.
      - object
        - `type` 'file', required
        - `file_id` string, uuid, required: Owned public file ID from POST /files or complete_image_upload; not a Studio upload ID.
      - object
        - `type` 'base64', required
        - `media_type` 'image/png' | 'image/jpeg' | 'image/webp', required: Actual image MIME type.
        - `data` string, required: Pure Base64 without a data URL prefix; decoded limits: 10 MiB per image, 20 MiB total.
      - object
        - `type` 'url', required
        - `url` string, required: Public HTTPS image on port 443, without credentials or fragments. Private networks and unsafe redirects are rejected. Keep bytes stable across retries.
    - `reference_images` union[]: Additional references, excluding the first frame. The live model can impose a smaller limit.
      - union
        - FileImageInput
          - `type` 'file', required
          - `file_id` string, uuid, required: Owned public file ID from POST /files or complete_image_upload; not a Studio upload ID.
        - Base64ImageInput
          - `type` 'base64', required
          - `media_type` 'image/png' | 'image/jpeg' | 'image/webp', required: Actual image MIME type.
          - `data` string, required: Pure Base64 without a data URL prefix; decoded limits: 10 MiB per image, 20 MiB total.
        - UrlImageInput
          - `type` 'url', required
          - `url` string, required: Public HTTPS image on port 443, without credentials or fragments. Private networks and unsafe redirects are rejected. Keep bytes stable across retries.
  - `prompt` string: Motion instruction; nonempty when the model requires a prompt. Keep private prompts out of logs.
  - `negative_prompt` string: Optional exclusions, only when the model supports negative prompts.
  - `video` VideoOptions
    - `model` string, nullable: provider:model ID from GET /models; omission uses the configured default model.
    - `duration_seconds` number, nullable: Seconds; choose a supported duration for the model and resolution. Omission uses its default.
    - `resolution` string, nullable: Resolution value from the live model catalog.
    - `ratio` string, nullable: Aspect ratio supported by the current model and input mode.
    - `seed` integer, nullable: Optional seed only for models advertising seed support; not a universal determinism guarantee.
    - `style_preset` string, nullable: Optional style preset supported by the selected provider/model.
    - `watermark` boolean, nullable: Optional watermark setting; check the model capability.
    - `transparency` GenerationTransparency
      - `mode` 'standard' | 'alpha_key': standard keeps the scene; alpha_key requires meaningful alpha in all active input images. Raw videos remain opaque.
      - `key_color` string, nullable: Temporary key color when using manual selection; normally leave automatic selection enabled.
      - `key_selection` 'auto' | 'manual': How the temporary key color is selected.
    - `input_canvas` object, nullable: Optional input framing; omit to keep the source framing.
      - `enabled` boolean: Whether to prepare an expanded input canvas.
      - `source_scale` number: Source subject scale within the canvas.
      - `position_x` number: Normalized horizontal source position.
      - `position_y` number: Normalized vertical source position.
      - `aspect_ratio` 'follow_output' | 'source': Follow the output ratio or preserve the source ratio.
      - `background` 'auto' | 'transparent' | 'solid': Canvas extension background strategy.
      - `background_color` string, nullable: Six-digit RGB color for a solid extension.
  - `metadata` object: Caller metadata: simple string/number/boolean/null values, at most 4 KiB JSON. Do not store secrets.
  - `selection` Selection
    - `mode` 'full' | 'range': full uses the complete source; range requires duration_seconds.
    - `start_seconds` number: Range start in seconds from the source beginning.
    - `duration_seconds` number, nullable: Required when mode=range; positive interval length in seconds.
  - `export` ExportOptions
    - `output_formats` string[]: Requested asset formats; defaults to spritesheet in frame_count mode, or spritesheet plus spritesheet_json in FPS mode. Duplicates are removed. Metadata needs its matching texture.
    - `frame_count` integer, nullable: Legacy uniform frame count, mutually exclusive with fps. When both are omitted, uses 24 frames.
    - `fps` number, nullable: Source-speed sampling frequency, without interpolation. Independent exports only; requires spritesheet and spritesheet_json. A short final frame preserves the selection duration.
    - `output_width` integer: Output frame width in pixels.
    - `output_height` integer: Output frame height in pixels.
    - `transparent` ExportTransparency
      - `enabled` boolean: Transparent processing for compatible outputs; requires an alpha_key source and does not make MP4 transparent.
    - `unity` UnityOptions
      - `pixels_per_unit` integer: Unity texture pixels per world unit.
      - `pivot` 'bottom_center': Supported Unity sprite pivot.

## Response `200`

Successful Response

- QuoteResponse
  - `object` 'quote'
  - `credits` integer, required: Current estimated credits. No price lock or spend authorization; creation recalculates the quote.
  - `breakdown` object: Public cost components; use credits as the quoted total.
  - `resolved_export` object, nullable: Final sampling summary for an FPS export from an existing source; null for legacy or generation quotes.
    - `selection` Selection, required
      - `mode` 'full' | 'range': full uses the complete source; range requires duration_seconds.
      - `start_seconds` number: Range start in seconds from the source beginning.
      - `duration_seconds` number, nullable: Required when mode=range; positive interval length in seconds.
    - `fps` number, required: Target sampling frequency; never recalculated as frame_count / duration.
    - `frame_count` integer, required: Number of samples strictly before the selected end.
    - `duration_ms` integer, required: Sum of manifest frame durations in milliseconds.
    - `warnings` ExportWarning[]: Sampling warnings, including repeated source frames without interpolation.
      - `code` string, required
      - `message` string, required
      - `details` object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/animgen/apis/aianimgenbackend.md) · [All operations](https://skmtc.dev/animgen/apis/aianimgenbackend/llms.txt) · [OpenAPI document](https://skmtc.dev/animgen/apis/aianimgenbackend/revisions/ac3744fbb14e?raw)
