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

> ## Agent Instructions
> Leap's API is at https://api.tryleap.ai. Send the key in the x-api-key header or as Authorization: Bearer; keys start with leap_.
> Take model IDs and input schemas from GET /v1/models/{creator}/{name}, or from https://api.tryleap.ai/v1/public/models without a key. Never guess an input field: unknown fields are a 400.
> Model inputs take uploaded file IDs (file_...), never URLs.
> To give a coding agent the whole API, install the Leap skill: curl -fsSL https://www.tryleap.ai/install.sh | sh
> To make media from ChatGPT, Claude or another MCP client without code, connect Leap's MCP server at https://app.tryleap.ai/api/mcp; see https://www.tryleap.ai/docs/mcp.
> The full OpenAPI 3.1 spec is at https://www.tryleap.ai/docs/openapi.json.

# Changelog

> What changed in the Leap API, newest first: new endpoints and fields, new error codes, and what is in beta.

Changes to `/v1` only ever add. A field, an error code or a value you don't know yet can appear in any answer, so read what you need and ignore the rest. An endpoint marked beta can change or go away without the 180 days' notice a stable one gets; its answers carry `"beta": true`, and it stays out of the [API reference](/docs/api-reference/introduction) until it is stable.

<Update label="5 October 2026" description="Photo checks, plans, the saved photo, and why a run failed">
  ## New in beta

  * **`POST /v1/photo-checks`** checks a photo you uploaded before you run it. Send `{ "file": "file_..." }` with a key that has `generations:write`. The answer has `faces`, `adult`, `framing` (`full`, `waist` or `face`), `setting` (`outdoor` or `indoor`), `blocked` and `moderation_reason`. A run of the same photo reuses the answer, and checks are free. See [Photos of people](/docs/generations#photos-of-people).
  * **`POST /v1/plans`** turns a person's own words into what to run. Send `{ "ask": "me as a giant in Paris" }` with a key that has `generations:read`. The answer's `route` is `run`, `clarify`, `free_tool`, `api`, `refuse`, `link`, `empty` or `no_match`, with up to three `options`, each a `model` and the `input` the words filled, its `cost_usd`, and whether the welcome credit covers it. Nothing runs and nothing is stored. Agents get the same answer from the MCP tool [`plan`](/docs/mcp/tools#plan).
  * **`GET`, `PUT` and `DELETE /v1/me/photo?workspace=<slug>`** read, keep and delete a person's saved photo in one workspace. It takes the person's studio session, not an API key: a key belongs to the workspace, which has no person behind it, so a script passes a file ID in each run instead. Keeping a photo needs `is_me: true` and a photo with exactly one adult face.
  * **`POST /v1/ask-drafts`** keeps up to 280 characters typed on [tryleap.ai](https://www.tryleap.ai) for an hour and answers an `ask_...` ID, so the words travel through sign-in by ID and never in a URL. It takes no key, and only the site's own origin can read the answer in a browser. Each address can keep 20 asks every ten minutes.

  ## New endpoint

  * **`DELETE /v1/files/{id}`** deletes a file you uploaded and its bytes, and answers `{ "id": "file_...", "object": "file", "deleted": true }`. Runs that used it keep their results. See [Delete a file](/docs/files#delete-a-file).

  ## New fields

  * A generation has **`failure_cause`** when it failed: `provider_error`, `provider_refused`, `photo_blocked`, `timeout`, `outage`, `input_removed` or `input_rejected`, so your code can branch without reading `error.message`. It is null on any other run and on failures from before causes were recorded. Treat a value you don't know as `provider_error`. See [When a run fails](/docs/generations#when-a-run-fails).
  * A preset's generation has **`slow_at`** and **`deadline_at`** while it runs. From `slow_at` you can cancel it whatever it has done, and you pay nothing. At `deadline_at` Leap stops it, and it fails with `failure_cause` `timeout` at no cost.
  * A preset's `preview` is now a smaller JPEG, about 960 pixels on its long side, at a link that works for 10 minutes. Read the run again for a fresh link.
  * Each model on `/v1/models` has **`expected_seconds`**, how long Leap's own runs of it took at its defaults. Each effect has **`photo`**, what its photo must show (`framing` and `setting`), and a video preset that makes a picture first has **`still`**, the frame of the clip that picture becomes and whether it shows as the `preview`. See [Models](/docs/models).
  * `GET /v1/credits` has **`welcome`**: `status` `granted` with `amount_usd`, `withheld` when the sign-up limits held the welcome credit back, or `none`. See [Pricing](/docs/pricing).

  ## New error codes

  * **`409 file_in_use`**: `DELETE /v1/files/{id}` while a run that hasn't finished uses the file, or while someone in the workspace keeps it as their saved photo. See [file\_in\_use](/docs/errors#file_in_use).
  * **`409 unpaid_failure_cap`**: a video run in a workspace that has never topped up, once 6 of its video runs have ended without a charge. Images still run, and the first top-up lifts it. Only workspaces created since this shipped meet it, and a workspace that has paid never does. See [unpaid\_failure\_cap](/docs/errors#unpaid_failure_cap).
  * **`422 photo_blocked`**: the photo check refused a photo the run was given, before anything was held. The error has `moderation_reason`, `minor` or `nudity`, and `param` names the input. See [photo\_blocked](/docs/errors#photo_blocked).

  ## Changed

  * Every photo you uploaded is checked before a run that takes it starts, for every model and preset. When the check can't run, the run answers `503` with `Retry-After` and nothing starts. A workspace's runs can check 600 new photos an hour, and one with several photos refused as possible minors in a day can't check new ones for 24 hours; both answer `429`.
  * A workspace the unpaid limit doesn't cover (one that has paid, or was created before this shipped) stops getting a run's `preview` for the rest of the UTC day once 10 of its runs that showed one have failed for their input.
  * Canceling a preset run after its `preview` still answers `409 conflict`, as before, until the run passes its `slow_at`.
</Update>


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