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

# Models

> How to discover, select, and use models on deAPI

**deAPI** gives you a unified API across multiple open-source models running on a decentralized GPU cloud. We regularly expand the model lineup — new models, new capabilities, better performance — so your integration can always take advantage of the latest options.

The [Model Selection](https://docs.deapi.ai/api/v2/utilities/models.md) endpoint returns the live, authoritative list of available models, their slugs, limits, and defaults. **Use it as the starting point for every integration.** Send `?limit=50` to get the whole catalogue in one call — see [Fetching the live model list](#fetching-the-live-model-list).

> [!TIP]
>
> This page explains how model selection works and how to use the endpoint. For the actual list of models and their exact slugs, always refer to the [Model Selection](https://docs.deapi.ai/api/v2/utilities/models.md) endpoint.

***

## Fetching the live model list

Before you start building, call the models endpoint to discover what's available. **Send `?limit=50`** — it covers the entire catalogue in a single call:

```bash theme={null}
curl -X GET "https://api.deapi.ai/api/v2/models?limit=50" \
  -H "Authorization: Bearer $DEAPI_API_KEY" \
  -H "Accept: application/json"
```

The response returns a `data` array of model objects. Each object contains:

| Field | Description |
| - | - |
| `name` | Human-friendly display name (for UI only — never send this to the API). |
| `slug` | **`The exact string to pass as the model parameter`** in any task endpoint. |
| `inference_types` | Array of task types this model supports (e.g. `["txt2img"]`, `["img2video", "txt2video"]`). |
| `info.limits` | Min/max constraints for parameters like width, height, steps, frames, fps, etc. Fields vary per model type. |
| `info.features` | Capability flags — e.g. `supports_guidance`, `supports_negative_prompt`, `supports_steps`, `supports_last_frame`. Not every model includes this field; some return it as an empty object. |
| `info.defaults` | Recommended default values for each parameter. Not every model includes this field. |
| `loras` | Array of available LoRA adapters (`display_name` + `name`). Present only on models that support LoRAs. |
| `languages` | Array of supported languages, each with available voices. Present only on speech models. |

> [!NOTE]
>
> Not every model returns all fields. For example, a transcription model may return an empty `info`, while an image-generation model will include detailed `limits`, `features`, and `defaults`. Always check for the presence of fields before using them.

> [!WARNING]
>
> **`meta.last_page` is what tells you the list is complete** — it reads `1` when the `data` array you just received is the whole catalogue. Nothing else in the response distinguishes a partial page from a full one.
>
> The parameter is **`limit`**. It defaults to **50**; a value above the maximum is clamped down, not rejected.
>
> `limit=50` covers the current catalogue in one request. Should the catalogue ever outgrow the page you asked for, `meta.last_page` becomes your signal to fetch `&page=2` and onward.

You can filter the list by task type using the `filter[inference_types]` query parameter:

```bash theme={null}
# Get only image-generation models
curl -X GET "https://api.deapi.ai/api/v2/models?limit=50&filter[inference_types]=txt2img" \
  -H "Authorization: Bearer $DEAPI_API_KEY" \
  -H "Accept: application/json"
```

See the full endpoint spec → [Model Selection](https://docs.deapi.ai/api/v2/utilities/models.md)

***

## How model selection works

* **Every task endpoint requires a model parameter.** Pass the `slug` value returned by the models endpoint — not the display name.
* **Quality ↔ Speed trade-off.** Larger models often yield higher quality but cost more and take longer. See the [Pricing](https://docs.deapi.ai/pricing.md) page for per-task rates.
* **Versioning & lifecycle.** Models may be updated, superseded, or deprecated. Re-fetch the model list periodically to stay current.

***

## LLMs (chat models)

deAPI also runs **13 large language models** for chat: `deepseek-v4.1-flash`, `deepseek-v4.1-flash:economy`, `glm-5.3`, `glm-5.3-flash`, `gpt-6-luna`, `hy3`, `kimi-k3`, `qwen3.8-flash`, `qwen3.8-max`, `seed-2.0-lite`, `seed-2.0-mini`, `seed-2.0-pro` and `seed-2.1-turbo`.

They work differently from the rest of the catalogue:

* **They are served only through the OpenAI-compatible API**, at `POST https://oai.deapi.ai/v1/chat/completions`, with the same API key. The native API has no chat endpoint.
* **They are not in the native catalogue.** `GET /api/v2/models` does not list them. Get them from `GET https://oai.deapi.ai/v1/models`, where each LLM entry has `context_length`, input modalities, `supported_parameters` and per-token `pricing`.
* **They are priced per token**, not through a `/price` endpoint. Every response reports its own cost in `usage.cost`.
* Streaming, tool calling, structured outputs (JSON Schema), image input (on 11 of the 13) and `reasoning_effort` are supported.

```bash theme={null}
curl -s https://oai.deapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $DEAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"qwen3.8-flash","messages":[{"role":"user","content":"Hello!"}]}'
```

The model table with context sizes, prices and supported features is in [Chat completions](https://docs.deapi.ai/openai-compatibility.md#chat-completions-llms).

***

## Partner (external) models

Alongside the models running on deAPI's own decentralized GPU network, the model list also includes **partner models** — large, heavy models that run on our partners' infrastructure. These are typically models that can't run on consumer GPUs (very high VRAM requirements, proprietary weights, or specialized hardware), so we make them available through the same unified API.

**Nothing changes on your side.** Partner models are returned by the same [Model Selection](https://docs.deapi.ai/api/v2/utilities/models.md) endpoint, listed as external models with their own `slug`, `inference_types`, and `info` (limits, features, defaults). You discover and call them exactly like any other model — fetch the list, pick a `slug`, and pass it as the `model` parameter.

**How to identify one.** A partner model carries the `experimental` tag in its `tags` array, and its `status` is `test_model` (native fleet models are `standard_model`):

```json theme={null}
{
  "name": "GPT Image 2",
  "slug": "gpt-image-2",
  "inference_types": ["img2img", "txt2img"],
  "tags": ["experimental"],
  "status": "test_model"
}
```

> [!NOTE]
>
> For partner models, **pricing, availability, and inference time are set by the partner**. deAPI acts as the provider (gateway) that routes your request and handles billing — it does not control the underlying infrastructure. As a result, response times and costs for these models can differ from the models running on deAPI's own network, and a partner model may occasionally be unavailable independently of the rest of the platform.

Always read the information about limits and default values ​​for individual models from the model endpoint and check the current price in the endpoint price-calculation for the given model. Their price is quoted as an estimate and settled after the job completes — see [Partner (external) model pricing](https://docs.deapi.ai/pricing.md#partner-external-model-pricing).

### Availability requires a Premium account

Partner models are **not available on the free tier**. To unlock them, make at least one payment to deAPI — this moves your account to Premium, and the models then appear in the `/models` endpoint response.

Until then they are absent from your model list entirely, and calling one by its `slug` is rejected:

```json theme={null}
{
  "message": "This model is not available on your plan. Please upgrade to access it.",
  "errors": {
    "model": ["This model is not available on your plan. Please upgrade to access it."]
  }
}
```

This is why the model catalogue is **account-scoped**: two keys on different plans legitimately see different model lists and different totals. Discover models at runtime rather than hardcoding them.

***

## Supported tasks

The table below shows which **task types** deAPI supports. To see which models are currently available for a given task, query the models endpoint with the corresponding `filter[inference_types]` value.

| Task | `inference_types` value | What it does |
| - | - | - |
| Text-to-Image | `txt2img` | Generate images from text prompts — concept art, prototyping, creative exploration. |
| Image-to-Image | `img2img` | Transform existing images — style transfer, edits, inpainting, outpainting. |
| Text-to-Speech | `txt2audio` | Turn text into natural voice — narration, accessibility, product voices. Supports voice cloning and voice design. |
| Text-to-Music | `txt2music` | Generate music tracks from text — background music, jingles, songs with vocals. |
| Video-to-Text | `video2text` | Transcribe video by URL (YouTube, Twitch, Kick, X, TikTok, Instagram) into text. TikTok requires `WhisperLargeV3Ct2`. |
| Video Description (URL) | `video2desc` | Create a timestamped description of visible events and scenes from a video URL. |
| Video Description (upload) | `video_file2desc` | Create a timestamped description of visible events and scenes from an uploaded video file. |
| Audio-to-Text | `audio2text` | Transcribe audio by URL into text — subtitles, notes, search, accessibility. |
| Video File-to-Text | `video_file2text` | Transcribe an uploaded video file into text. |
| Audio File-to-Text | `audio_file2text` | Transcribe an uploaded audio file into text. |
| Image-to-Text (OCR) | `img2txt` | Extract text and meaning from images — OCR, descriptions, accessibility. |
| Text-to-Video | `txt2video` | Generate short AI video clips from a text prompt. |
| Image-to-Video | `img2video` | Animate a still image or generate video from image, video, and audio references on supported models. |
| Audio-to-Video | `audio2video` | Generate video conditioned on an audio file and a text prompt. |
| Text-to-Embedding | `txt2embedding` | Create vector embeddings — search, RAG, semantic similarity, clustering. |
| Background Removal | `img-rmbg` | Remove background from images — product photos, portraits, compositing. |
| Image Upscale | `img-upscale` | Upscale images to higher resolution. |
| Video Upscale | `vid-upscale` | Upscale videos to higher resolution — sharpen, restore, and enlarge video content. |

> [!NOTE]
>
> Some models support **multiple tasks** (e.g. both `txt2img` and `img2img`). The models endpoint will list all supported `inference_types` for each model.

> [!NOTE]
>
> **Unified transcription.** The transcription endpoint (`POST /api/v2/audio/transcriptions`, v1: `POST /api/v1/client/transcribe`) auto-detects URL vs. file upload and covers all four transcription tasks. It is an endpoint, not a separate `inference_types` value — filter models by `audio2text`, `video2text`, `audio_file2text` or `video_file2text`.

> [!NOTE]
>
> **Synchronous transcription is not in the list.** [POST /api/v2/audio/transcriptions/sync](https://docs.deapi.ai/api/v2/audio/transcriptions-sync.md) runs on `FluidSpeechPro`, which the models endpoint does not return. Use the slug exactly as written.

> [!WARNING]
>
> **`inference_types` values are not URL paths.** They identify a task when filtering the models endpoint and when reading a model's capabilities — they are **not** endpoint names. Building a request URL from an `inference_types` value returns `404`. Always take the path from the endpoint's reference page.
>
> | `inference_types` value | v2 endpoint | v1 endpoint (deprecated) |
> | - | - | - |
> | `audio2text` | `POST /api/v2/audio/transcriptions` | `POST /api/v1/client/aud2txt` |
> | `video2text` | `POST /api/v2/audio/transcriptions` | `POST /api/v1/client/vid2txt` |
> | `video2desc` | `POST /api/v2/videos/descriptions` | — |
> | `video_file2desc` | `POST /api/v2/videos/descriptions` | — |
> | `audio_file2text` | `POST /api/v2/audio/transcriptions` | `POST /api/v1/client/audiofile2txt` |
> | `video_file2text` | `POST /api/v2/audio/transcriptions` | `POST /api/v1/client/videofile2txt` |
> | `txt2audio` | `POST /api/v2/audio/speech` | `POST /api/v1/client/txt2audio` |
> | `audio2video` | `POST /api/v2/videos/audio-syncs` | `POST /api/v1/client/aud2video` |
> | `vid-upscale` | `POST /api/v2/videos/upscales` | `POST /api/v1/client/vid-upscale` |

***

## Choosing the right model

When the models endpoint returns several options for the same task, use these guidelines:

**Image generation** — Start with the fastest model for iteration. Increase steps and resolution for final quality. If the model object includes a non-empty `loras` array, you can use LoRA adapters for style control.

**Speech generation (TTS)** — Check the model's `languages` array for available languages and voices. Use `info.defaults` for recommended speed and format settings. The endpoint supports three modes: `custom_voice` (preset speakers), `voice_clone` (clone from reference audio), and `voice_design` (create voice from a text description). Not all models support all modes — check model capabilities before selecting a mode.

**Music generation** — Provide a text description (`caption`) of the desired music style. `lyrics` is **required and must be non-empty** — send `"[Instrumental]"` for instrumental tracks. Optionally include `bpm`, `keyscale`, and `timesignature` (an integer: `2`, `3`, `4` or `6` — not a notation string like `"4/4"`) to fine-tune the output. `format` should be `mp3` — the only format the current models actually produce. You can also upload a `reference_audio` file for style transfer. Check `info.limits` for supported duration range and inference steps. Use fewer steps with turbo models (e.g. 8) and more steps with base models (e.g. 32+).

**Transcription (Video/Audio-to-Text)** — Transcription models support both URL-based and file-upload transcription. For long content, enable timestamps (`include_ts: true`). URL-based transcription works with YouTube, Twitch, Kick, TikTok, Instagram and X/Twitter — but TikTok is served by `WhisperLargeV3Ct2` only, and a TikTok URL sent with any other model is rejected with `422`.

**OCR (Image-to-Text)** — Check `info.limits` for the maximum supported image dimensions. For complex layouts, consider multiple passes or post-processing.

**Video generation** — Start with low frame counts to validate aesthetics, then scale up. Check `info.limits.max_frames`, `min_frames`, and `max_fps` for each model. Some models support a `last_frame` feature (see `info.features.supports_last_frame`). For audio-to-video, provide an audio file to condition the video generation alongside your text prompt — some models (`Ltx2_3_22B_Dist_INT8` and `Ltx2_5_22B_Dist_INT8`) support `txt2video`, `img2video`, and `audio2video` in one model. `Ltx2_5_22B_Dist_INT8` is the newest of them: same 49–241 frames @ 24 fps, but a larger frame (up to 1344 px on a side, subject to a `max_pixels` budget) and a slightly shorter reference-audio window (1–10 s against 1–11 s on 2.3).

**Embeddings** — Check `info.limits.max_input_tokens` and `max_total_tokens` for batch sizing. Use for semantic search, clustering, and retrieval-augmented generation (RAG).

**Background removal** — Check `info.limits.max_width` and `max_height` for the maximum supported resolution.

**Image upscale** — Check `info.limits` for input size constraints.

**Video upscale** — `RealESRGAN_Vid_x2` / `_x4` are the fast, low-cost option and deliver a mild sharpen, while `FlashVSR_Tiny` reconstructs detail that is not resolvable in the source — at roughly an order of magnitude more processing time and cost, so pick it per job rather than as a default. Check `info.limits` for input size and duration constraints. Some models support a configurable `scale` factor (currently only `FlashVSR_Tiny`, range 2–4); others are fixed-scale (`RealESRGAN_Vid_x2`, `RealESRGAN_Vid_x4`) and reject the `scale` field. Check the per-model `min_scale`/`max_scale` in `info.limits` before sending the request.

***

## Parameter limits & resolution rules

Each model defines its own limits in the `info.limits` object. These limits vary between models and task types. Common fields include:

* **Dimensions:** `min_width`, `max_width`, `min_height`, `max_height`, and (for image models) `resolution_step` — the value that width/height must be divisible by.
* **Pixel budget (newer models):** `min_side`, `max_side`, `max_pixels`, `max_ratio`, `dimension_multiple`. These bound the frame as a whole rather than each axis, so a size can be inside `max_width`/`max_height` and still be rejected — on `Ltx2_5_22B_Dist_INT8`, `1024x1024` fails with `Size 1024x1024 (1,048,576 px) exceeds the model limit of 1,032,192 px.` and `1344x512` fails with `has an aspect ratio of 2.62:1, above the model limit of 2.00:1.`, while `1344x768` passes.
* **Steps:** `min_steps`, `max_steps` — how many inference steps the model supports.
* **Video-specific:** `min_frames`, `max_frames`, `min_fps`, `max_fps`.
* **Video references (img2video):** Check `info.features.supports_image_refs`, `supports_video_refs`, and `supports_audio_refs` separately. Models advertising reference support publish effective `max_ref_images`, `max_ref_videos`, `max_ref_audios`, and `max_ref_files` (combined count), plus `min_ref_video_duration`, `max_ref_video_duration`, `min_ref_audio_duration`, `max_ref_audio_duration`, `min_ref_image_ratio`, and `max_ref_image_ratio`. An unsupported type has a count limit of `0`. Use these per-model values rather than the outer ceilings of 9 images, 1 video, 3 audio clips, and 12 files in total. See [Video Animation](https://docs.deapi.ai/api/v2/videos/animations.md) for input modes and prompt labels.
* **Text-specific:** `max_input_tokens`, `max_total_tokens` (for embedding models), `min_text`, `max_text` (for speech models).

If you provide image dimensions that are not aligned to the required step, the API may adjust them automatically. To avoid unexpected output sizes, always round your `width` and `height` to a multiple of the model's `resolution_step` before sending the request.

Some models do not support guidance. Check `info.features.supports_guidance` — if it's `false`, do not send a guidance value, or set it to `0`.

> [!TIP]
>
> Always read `info.limits` and `info.defaults` from the models endpoint for the specific model you're using. Do not assume that limits from one model apply to another.

***

## API usage examples

**1. Discover models for your task**

```bash theme={null}
# Fetch all text-to-image models
curl -X GET "https://api.deapi.ai/api/v2/models?limit=50&filter[inference_types]=txt2img" \
  -H "Authorization: Bearer $DEAPI_API_KEY" \
  -H "Accept: application/json"

# Read the response: pick a slug, note its limits and defaults.
```

**2. Use the slug in a generation request**

```bash theme={null}
curl -X POST "https://api.deapi.ai/api/v2/images/generations" \
  -H "Authorization: Bearer $DEAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "prompt": "isometric cozy cabin at dusk, soft rim light",
    "model": "<MODEL_SLUG>",
    "width": 768,
    "height": 768,
    "steps": 4,
    "seed": 12345
  }'
```

> [!WARNING]
>
> Replace `<MODEL_SLUG>` with an actual `slug` value from the models endpoint. The `seed` field is required for image generation. Check `info.limits` for valid ranges of `width`, `height`, `steps`, and other parameters before sending.

**3. Transcribe a video by URL**

```bash theme={null}
curl -X POST "https://api.deapi.ai/api/v2/audio/transcriptions" \
  -H "Authorization: Bearer $DEAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "source_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "include_ts": true,
    "model": "<MODEL_SLUG>"
  }'
```

Jobs return a `request_id`. Poll results with `GET /api/v2/jobs/{request_id}`.

***

## Best practices

* **Resolve models during integration.** Fetch the model list when building your integration and re-fetch periodically (e.g. daily or on deployment) to stay current. There's no need to call it on every request — the list doesn't change that often.
* **Respect info.limits and info.defaults.** Use the returned defaults as a starting point. Stay within min/max boundaries to avoid unexpected rounding or errors. Note that some required fields (like `seed` for image generation) may not be listed in the model response — refer to the task endpoint docs for the full set of required parameters.
* **Pin slugs only when you need reproducibility.** If you need consistent results across calls, keep the same slug and seed. But check the model list periodically — a slug may be retired and replaced.
* **Budget before scaling.** Larger models and higher resolution/steps cost more — see the [Pricing](https://docs.deapi.ai/pricing.md) page for per-task rates.
* **Handle deprecation gracefully.** If a model returns an error, re-fetch the model list and switch to a suitable alternative.

***

## For AI agents & LLMs

If you are an AI agent, MCP client, or LLM integrating with deAPI:

1. **Call** `GET /api/v2/models?limit=50` at the start of your session to get the current model list. That covers the whole catalogue in one call; `meta.last_page` reading `1` is what confirms nothing is missing. Do not rely on model slugs from training data, cached documentation, or prior conversations — they may be outdated.
2. **Use** `filter[inference_types]` to narrow down to the task you need (e.g. `txt2img`, `txt2audio`, `audio2video`).
3. **Read** `info.limits` and `info.defaults` from the response to construct valid request parameters. Also consult the task endpoint docs for required fields that may not appear in the model response (e.g. `seed` for image generation).
4. **Pass** the `slug` field (not `name`) as the `model` parameter in task endpoints.
5. **If a model slug returns an error**, re-fetch the model list — the model may have been deprecated or replaced.
6. **For chat / text generation**, use the LLMs on the OpenAI-compatible API: list them with `GET https://oai.deapi.ai/v1/models` (entries with `context_length`) and call `POST https://oai.deapi.ai/v1/chat/completions`. They do not appear in `/api/v2/models`. See [LLMs (chat models)](#llms-chat-models).

***

## Related docs

* [Model Selection endpoint](https://docs.deapi.ai/api/v2/utilities/models.md) — the live API spec for fetching models.
* [Pricing](https://docs.deapi.ai/pricing.md) — cost per task and model tier.
* [Execution Modes](https://docs.deapi.ai/execution-modes-and-integrations/execution-modes-and-http-queue.md) — sync, async, webhooks, WebSockets.
* [OpenAI Compatibility](https://docs.deapi.ai/openai-compatibility.md) — call deAPI with the OpenAI SDK, including chat completions with LLMs.


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