---
title: "Make a clip from an image and a prompt"
method: POST
path: "/motion/jobs"
tags: ["Motion"]
---

# Make a clip from an image and a prompt

`POST /motion/jobs`

## Request

- Base URL: `https://api.phoenixlabs.space`
- URL: `https://api.phoenixlabs.space/motion/jobs`
- Auth: HTTP bearer

Pass image_url to start at once. Otherwise give content_type, PUT the image to upload_url, then call /start. The price is held from the balance and refunded if the clip fails or is refused.

## Request body

- object
  - `prompt` string, required
  - `image_url` string
  - `content_type` 'image/jpeg' | 'image/png' | 'image/webp'
  - `image_bytes` integer
  - `size` '480p' | '720p'
  - `seconds` 5
  - `loop` boolean
  - `seed` integer

## Response `200`

The clip (and upload_url when no image_url was given).

- object
  - `job` Clip
    - `id` string
    - `status` 'awaiting_upload' | 'queued' | 'processing' | 'done' | 'failed' | 'refused' | 'expired' | 'cancelled'
    - `size` string
    - `seconds` integer
    - `prompt` string
    - `loop` boolean
    - `amount_cents` integer
    - `seed` integer, nullable
    - `video_url` string
    - `download_url` string
    - `error` string, nullable
  - `upload_url` string
  - `wallet` Wallet
    - `wallet_id` string
    - `balance_cents` integer
    - `spendable_cents` integer
    - `paused` boolean
    - `email` string: Only shown to the wallet key.
    - `agent_key` AgentKey
      - `id` string
      - `label` string
      - `limit_cents` integer
      - `spent_cents` integer
      - `remaining_cents` integer
      - `created_at` string
      - `last_used_at` string, nullable
      - `revoked` boolean

## Other responses

- `400`: Bad input. `detail` says what to fix.
- `401`: Missing or unrecognised key.
- `402`: The balance, or the agent key's limit, doesn't cover the price. `needs_topup` or `over_limit` says which.
- `422`: The prompt breaks the content rule. Nothing was charged.

---

[API](https://skmtc.dev/phoenixlabs/apis/phoenix-labs-api.md) · [All operations](https://skmtc.dev/phoenixlabs/apis/phoenix-labs-api/llms.txt) · [OpenAPI document](https://skmtc.dev/phoenixlabs/apis/phoenix-labs-api/revisions/7648b94d8dd2?raw)
