---
title: "Create Job"
method: POST
path: "/api/jobs"
---

# Create Job

`POST /api/jobs`

## 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/api/jobs`
- Auth: none declared

## Request body

- union
  - ImageToVideoJobCreate
    - `type` 'image_to_video', required
    - `workspaceId` string, uuid, nullable
    - `prompt` string
    - `negativePrompt` string
    - `params` ImageToVideoParams, required
      - `targetDurationSeconds` number, required
      - `provider` string, nullable
      - `model` string, nullable
      - `generationMode` 'first_frame' | 'first_last_frame' | 'reference_images', nullable
      - `seed` integer, nullable
      - `stylePreset` string, nullable
      - `resolution` string, nullable
      - `ratio` string, nullable
      - `watermark` boolean, nullable
      - `transparency` ImageTransparencyConfig
        - `mode` 'alpha_key' | 'matting'
        - `keyColor` string, nullable
        - `keySelection` 'auto' | 'manual'
        - `profile` 'generated_video_v1' | 'generated_video_v2'
      - `inputCanvas` ImageInputCanvasConfig
        - `version` 1
        - `enabled` boolean
        - `sourceScale` number
        - `positionX` number
        - `positionY` number
        - `aspectRatio` 'follow_output' | 'source'
        - `background` 'auto' | 'transparent' | 'solid'
        - `backgroundColor` string, nullable
      - `purchaseIntentId` string, uuid, nullable
    - `initImageUploadId` string, uuid, nullable
    - `initImageSource` MediaSourceInput
      - `type` 'upload' | 'asset', required
      - `id` string, uuid, required
    - `lastFrameUploadId` string, uuid, nullable
    - `lastFrameSource` MediaSourceInput
      - `type` 'upload' | 'asset', required
      - `id` string, uuid, required
    - `referenceImages` ReferenceImageInput[]
      - `uploadId` string, uuid, nullable
      - `source` MediaSourceInput
        - `type` 'upload' | 'asset', required
        - `id` string, uuid, required
      - `role` 'character' | 'prop' | 'style' | 'other'
      - `label` string, nullable
  - VideoToFramesJobCreate
    - `type` 'video_to_frames', required
    - `workspaceId` string, uuid, nullable
    - `params` VideoToFramesParams, required
      - `parentJobId` string, uuid, nullable
      - `sourceVideoAssetId` string, uuid, required
      - `clipStartSeconds` number
      - `frameCount` integer, required
      - `selectionMode` 'full' | 'range', nullable
      - `samplingPlan` object, nullable
      - `exportWarnings` object[]
      - `targetDurationSeconds` number, required
      - `outputWidth` integer, required
      - `outputHeight` integer, required
      - `exportFormats` string[]
      - `transparent` TransparentConfig
        - `enabled` boolean
        - `method` 'matting' | 'color_key'
        - `mattingProvider` 'photoroom' | 'rembg' | 'mock', nullable
        - `alphaMatting` boolean
        - `colorKey` string, nullable
        - `colorKeyTolerance` integer
        - `colorKeySoftness` integer
        - `colorKeyDespill` boolean
        - `colorKeyTuning` ColorKeyTuningConfig: Seven direct V2 inputs; unpublished predecessor fields are rejected.
          - `backgroundThreshold` number
          - `foregroundThreshold` number
          - `edgeContraction` number
          - `edgeFeather` number
          - `edgeDespillStrength` number
          - `interiorDespillStrength` number
          - `edgeDespillRadius` integer
        - `keyingProfile` 'generated_video_v1' | 'generated_video_conservative_v1' | 'generated_video_cleanup_v1' | 'generated_video_v2' | 'generated_video_cleanup_v2'
        - `fallbackProvider` 'photoroom' | 'rembg' | 'mock', nullable
      - `unity` UnityConfig
        - `pixelsPerUnit` integer
        - `pivot` 'bottom_center'
      - `compositionId` string, uuid, nullable
      - `compositionRevision` integer, nullable
      - `editRecipe` AnimationEditRecipeV1
        - `version` 1 | 2
        - `source` AnimationRecipeSource, required
          - `assetId` string, uuid, required
          - `sourceJobId` string, uuid, nullable
          - `timebase` 'source_pts'
        - `sequence` AnimationFrameRef[], required
          - `id` string, required
          - `sourceFrameIndex` integer, required
          - `sourceTimestampUs` integer, required
          - `durationFrames` integer
          - `imageAssetId` string, uuid, nullable
          - `transformOverride` AnimationFrameTransform
            - `offsetX` number
            - `offsetY` number
            - `scale` number
        - `playback` AnimationPlayback
          - `fps` number
          - `loop` boolean
        - `canvas` AnimationCanvas, required
          - `width` integer, required
          - `height` integer, required
          - `background` 'transparent' | 'solid'
          - `backgroundColor` string, nullable
        - `transform` AnimationTransform
          - `anchor` 'center' | 'bottom_center'
          - `offsetX` number
          - `offsetY` number
          - `scale` number
          - `fit` 'none' | 'contain' | 'cover'
        - `pivot` AnimationPivot
          - `x` number
          - `y` number
      - `purchaseIntentId` string, uuid, nullable
  - VideoImportJobCreate
    - `type` 'video_import', required
    - `workspaceId` string, uuid, nullable
    - `sourceUploadId` string, uuid, nullable
    - `sourceVideo` MediaSourceInput
      - `type` 'upload' | 'asset', required
      - `id` string, uuid, required

## Response `200`

Successful Response

- JobCreateResponse
  - `jobId` string, uuid, required
  - `status` string, required
  - `wsUrl` string, required

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