---
title: "Create a restore job and get an upload URL"
method: POST
path: "/cloud/jobs"
tags: ["Cloud Restore"]
---

# Create a restore job and get an upload URL

`POST /cloud/jobs`

## Request

- Base URL: `https://api.phoenixlabs.space`
- URL: `https://api.phoenixlabs.space/cloud/jobs`
- Auth: one of:
  - none
  - HTTP bearer

With a key (and pay_with not 'checkout') the price is taken from the balance now and the job waits for its upload; then call /start. Without a key, give an email, upload, then call /checkout.

## Request body

- object
  - `quality` 'faithful' | 'enhanced' | 'enhanced_max': faithful is shown as Standard, enhanced_max as Studio Max.
  - `duration_sec` number, required
  - `width` integer
  - `height` integer
  - `filename` string
  - `content_type` string
  - `size` integer: Bytes, up to 2 GB.
  - `email` string: Required without a key.
  - `pay_with` 'balance' | 'checkout'

## Response `200`

The job, where to upload, and what to do next.

- object
  - `job` RestoreJob
    - `id` string
    - `status` 'pending_payment' | 'awaiting_upload' | 'queued' | 'processing' | 'done' | 'failed' | 'refunded' | 'cancelled' | 'expired'
    - `quality` 'faithful' | 'enhanced' | 'enhanced_max'
    - `amount_cents` integer
    - `duration_sec` number
    - `download_url` string, nullable
    - `error` string, nullable
  - `upload_url` string
  - `upload_headers` object
  - `display_price` string
  - `paid_from_balance` boolean
  - `next` 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.

---

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