> ## 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
> The full OpenAPI 3.1 spec is at https://www.tryleap.ai/docs/openapi.json.

# Models and schemas

> List every model and preset, read the JSON Schema of the input each one takes, and follow a model through preview, stable and deprecated.

<Tip>
  No key yet? Browse models and schemas at [https://api.tryleap.ai/v1/public/models](https://api.tryleap.ai/v1/public/models). It's the same catalog as `GET /v1/models`, with no key needed: `/v1/public/models/{creator}/{name}` returns one model with its `input_schema`.
</Tip>

## List the catalog

```bash theme={"theme":"css-variables"}
curl https://api.tryleap.ai/v1/models -H "x-api-key: $LEAP_API_KEY"
```

```json theme={"theme":"css-variables"}
{
  "object": "list",
  "data": [
    {
      "id": "black-forest-labs/flux-2-pro",
      "object": "model",
      "type": "model",
      "name": "FLUX.2 [pro]",
      "creator": "Black Forest Labs",
      "modality": "image",
      "tasks": ["text-to-image"],
      "description": "Black Forest Labs' second generation: sharper detail and text than FLUX1.1, at a lower price.",
      "revision": "2026-10-02",
      "version": null,
      "latest": true,
      "status": "stable",
      "deprecation": null,
      "pricing": {
        "unit": "image",
        "usd": "0.033",
        "overrides": [],
        "drivers": ["n"]
      }
    }
  ]
}
```

The list holds every model and preset at once, with no pagination. Filter it on your side by `modality` (`image`, `video`, `audio`, `3d` or `text`) or by `tasks`, such as `text-to-image`, `image-to-video` or `text-to-speech`. Without a key, `GET /v1/public/models` returns the same list.

Some entries carry more fields, which Leap's own pages use and your code can ignore: `added`, the day the entry joined the catalog; `cover` and `gallery`, reviewed examples of what it makes, as links to pictures and, for video, clips; and `guide`, a preset's pitch, its steps and the IDs a result can go to next.

## Models and presets

A model's ID is `creator/name`, such as `google/veo-3.1-fast` or `elevenlabs/eleven-v3`. A new version of a model gets a new name, so the model behind an ID doesn't change under you.

A preset is a ready-made recipe: a model with an expert prompt and a few typed inputs, such as `leap/restore-photo@1` or `leap/headshot@1`. Its `type` is `preset`, and its ID ends in a version. A new version of a preset is published alongside the old one, and the bare ID without `@N` (`leap/restore-photo`) runs whichever version has `latest: true`. Pin the version in production; use the bare ID to always get the newest.

## Read an input schema

```bash theme={"theme":"css-variables"}
curl https://api.tryleap.ai/v1/models/black-forest-labs/flux-2-pro -H "x-api-key: $LEAP_API_KEY"
```

The answer is the catalog entry plus `input_schema`, a JSON Schema (2020-12) of the `input` object the model takes. Trimmed, it looks like this:

```json theme={"theme":"css-variables"}
{
  "id": "black-forest-labs/flux-2-pro",
  "object": "model",
  "input_schema": {
    "type": "object",
    "additionalProperties": false,
    "required": ["prompt"],
    "properties": {
      "prompt": { "type": "string", "pattern": "\\S" },
      "aspect_ratio": {
        "type": "string",
        "enum": [
          "1:1",
          "3:2",
          "2:3",
          "4:3",
          "3:4",
          "16:9",
          "9:16",
          "21:9",
          "9:21"
        ],
        "default": "1:1"
      },
      "n": { "type": "integer", "minimum": 1, "maximum": 4, "default": 1 },
      "seed": { "type": "integer", "minimum": 0, "maximum": 4294967295 }
    }
  }
}
```

The live schema has more on each field: a `title`, length limits such as `minLength` and `maxLength` on the prompt, and `x-leap-ui` hints.

What the schema means for your request:

* Required fields must be there. Fields you leave out take their `default`.
* Unknown fields are refused: the schema sets `additionalProperties: false`, so a typo is a `400` that names the field in `param`.
* An `enum` lists the only values a field takes. Some fields list their choices as `oneOf` instead, each a `const` to send and a `title` to show, such as `color` on `leap/restore-photo@1`, shown below.
* A field that takes a photo, video or sound has the pattern `^file_[0-9A-Za-z]{24}$`. [Upload the file](/docs/files) first and pass its ID.
* `x-leap-ui` on a field is a hint for rendering a form, such as a widget or an order. You can ignore it.

```json theme={"theme":"css-variables"}
{
  "color": {
    "type": "string",
    "title": "Color",
    "oneOf": [
      { "const": "keep", "title": "Keep the original colors" },
      { "const": "colorize", "title": "Colorize" }
    ],
    "default": "keep"
  }
}
```

Validate against the schema before you send, or hand it to an LLM as a tool's input schema.

## Lifecycle

A model's `status` says where it is in its life:

| `status` | Meaning |
| - | - |
| `preview` | New, and its schema or price may still change. Fine to try; pin a stable model for production. |
| `stable` | Its schema only changes in ways that keep your requests working, and price changes are announced first. |
| `deprecated` | Still runs until its sunset date. `deprecation` names the date and its replacement. |
| `retired` | Doesn't run anymore, and leaves the list. Starting it, quoting it or reading its entry gets a `410` with the code `gone`. |

A retired model's entry, `GET /v1/models/{creator}/{name}`, is that `410` too, so read the replacement from its message, which names it when there is one: `{id} was retired on {sunset}. Use {replacement} instead.`

### Deprecation

While a model is deprecated, its `deprecation` says what happens next. It's null for every other status.

| Field | Meaning |
| - | - |
| `deprecated_on` | The day it was deprecated, as `YYYY-MM-DD`. |
| `sunset` | The day it's retired, as `YYYY-MM-DD`. It runs until then. |
| `replaced_by` | The ID of the model or preset to move to, or null when there's none. |
| `reason` | `upstream_retired` when its provider ends it, `superseded` when a newer model or version replaces it, or `discontinued` when Leap stops running it. |

When you start a generation, get a quote or read a model that's deprecated, the answer carries the same facts in headers. Log them, and you'll see a sunset coming.

| Header | Value |
| - | - |
| `Deprecation` | `@` and the day it was deprecated, in Unix seconds at midnight UTC, such as `@1793577600` for 2026-11-02. |
| `Sunset` | The sunset day as an HTTP date, such as `Mon, 01 Feb 2027 00:00:00 GMT`. |
| `Link` | `</v1/models/{replaced_by}>; rel="successor-version"`, when there's a replacement. |

`revision` is the date of the model's current schema and price. A generation records the revision it ran on.

## Prices

Each entry carries its `pricing`. [Pricing and credits](/docs/pricing) explains how to read it, and how to price any input before you run it.


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