> ## 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.

# API Overview

> Complete reference of all deAPI endpoints

> [!WARNING]
>
> **API v1 is deprecated.** This version is no longer being developed — new endpoints, parameters and models are added to v2 only. Use the v2 endpoints to stay current: [v2 API documentation](https://docs.deapi.ai/api/v2/overview.md).

All endpoints use base URL `https://api.deapi.ai` and require authentication via `Authorization: Bearer <API_KEY>` header.

> [!NOTE]
>
> Each generation/analysis endpoint has a corresponding `/price-calculation` endpoint to estimate costs before execution.

## Relationship to v2

v1 and [v2](https://docs.deapi.ai/api/v2/overview.md) are two request surfaces over the same inference backend. For endpoints that exist in both, the request fields, validation rules and validation messages are identical, and jobs are stored in a single namespace — a `request_id` returned by a v1 endpoint can be polled with `GET /api/v2/jobs/{request_id}`, and a `request_id` returned by a v2 endpoint can be polled with `GET /api/v1/client/request-status/{request_id}`.

The practical differences are naming and grouping: v1 uses one flat `/api/v1/client/<task>` namespace with `/price-calculation` suffixes, while v2 groups endpoints by media type (`/api/v2/images/*`, `/api/v2/videos/*`, `/api/v2/audio/*`) with `/price` suffixes, and consolidates several v1 endpoints into unified ones (all transcription endpoints into `/api/v2/audio/transcriptions`, all prompt boosters into `/api/v2/prompts/enhancements`).

> [!WARNING]
>
> **API v1 is deprecated.** v1 is no longer being developed — all new endpoints, parameters, models and fixes land in v2 first and are not backported. Existing v1 integrations keep working, but new integrations should be built on v2, and existing ones should plan a migration.
>
> See the [v2 API documentation](https://docs.deapi.ai/api/v2/overview.md) for the current endpoint reference.

## Generation

Create images, videos, audio, and embeddings from text or images.

| Method | Endpoint | Description | Docs |
| - | - | - | - |
| `POST` | `/api/v1/client/txt2img` | Generate image from text prompt | [→](https://docs.deapi.ai/api/v1/generation/text-to-image.md) |
| `POST` | `/api/v1/client/txt2img/price-calculation` | Calculate text-to-image price | [→](https://docs.deapi.ai/api/v1/generation/text-to-image-price.md) |
| `POST` | `/api/v1/client/txt2video` | Generate video from text prompt | [→](https://docs.deapi.ai/api/v1/generation/text-to-video.md) |
| `POST` | `/api/v1/client/txt2video/price-calculation` | Calculate text-to-video price | [→](https://docs.deapi.ai/api/v1/generation/text-to-video-price.md) |
| `POST` | `/api/v1/client/img2video` | Generate video from image (animate) | [→](https://docs.deapi.ai/api/v1/generation/image-to-video.md) |
| `POST` | `/api/v1/client/img2video/price-calculation` | Calculate image-to-video price | [→](https://docs.deapi.ai/api/v1/generation/image-to-video-price.md) |
| `POST` | `/api/v1/client/aud2video` | Generate video from audio + prompt | [→](https://docs.deapi.ai/api/v1/generation/audio-to-video.md) |
| `POST` | `/api/v1/client/aud2video/price-calculation` | Calculate audio-to-video price | [→](https://docs.deapi.ai/api/v1/generation/audio-to-video-price.md) |
| `POST` | `/api/v1/client/txt2audio` | Generate speech from text (TTS) | [→](https://docs.deapi.ai/api/v1/generation/text-to-speech.md) |
| `POST` | `/api/v1/client/txt2audio/price-calculation` | Calculate text-to-speech price | [→](https://docs.deapi.ai/api/v1/generation/text-to-speech-price.md) |
| `POST` | `/api/v1/client/txt2embedding` | Generate embeddings from text | [→](https://docs.deapi.ai/api/v1/generation/text-to-embedding.md) |
| `POST` | `/api/v1/client/txt2embedding/price-calculation` | Calculate embedding price | [→](https://docs.deapi.ai/api/v1/generation/text-to-embedding-price.md) |
| `POST` | `/api/v1/client/txt2music` | Generate music from text | [→](https://docs.deapi.ai/api/v1/generation/text-to-music.md) |
| `POST` | `/api/v1/client/txt2music/price-calculation` | Calculate text-to-music price | [→](https://docs.deapi.ai/api/v1/generation/text-to-music-price.md) |

## Analysis

Extract text and transcriptions from images, videos, and audio.

| Method | Endpoint | Description | Docs |
| - | - | - | - |
| `POST` | `/api/v1/client/img2txt` | Extract text from image (OCR) | [→](https://docs.deapi.ai/api/v1/analysis/image-to-text.md) |
| `POST` | `/api/v1/client/img2txt/price-calculation` | Calculate OCR price | [→](https://docs.deapi.ai/api/v1/analysis/image-to-text-price.md) |
| `POST` | `/api/v1/client/vid2txt` | Transcribe video from URL (YouTube, X, TikTok, Twitch, Kick) — TikTok requires `WhisperLargeV3Ct2` | [→](https://docs.deapi.ai/api/v1/analysis/video-to-text.md) |
| `POST` | `/api/v1/client/vid2txt/price-calculation` | Calculate video transcription price | [→](https://docs.deapi.ai/api/v1/analysis/video-to-text-price.md) |
| `POST` | `/api/v1/client/aud2txt` | Transcribe X Spaces audio | [→](https://docs.deapi.ai/api/v1/analysis/audio-to-text-spaces.md) |
| `POST` | `/api/v1/client/aud2txt/price-calculation` | Calculate X Spaces transcription price | [→](https://docs.deapi.ai/api/v1/analysis/audio-to-text-spaces-price.md) |
| `POST` | `/api/v1/client/videofile2txt` | Transcribe uploaded video file | [→](https://docs.deapi.ai/api/v1/analysis/upload-video-file.md) |
| `POST` | `/api/v1/client/videofile2txt/price-calculation` | Calculate video file transcription price | [→](https://docs.deapi.ai/api/v1/analysis/upload-video-file-price.md) |
| `POST` | `/api/v1/client/audiofile2txt` | Transcribe uploaded audio file | [→](https://docs.deapi.ai/api/v1/analysis/upload-audio-file.md) |
| `POST` | `/api/v1/client/audiofile2txt/price-calculation` | Calculate audio file transcription price | [→](https://docs.deapi.ai/api/v1/analysis/upload-audio-file-price.md) |
| `POST` | `/api/v1/client/transcribe` | Unified transcription (URL or file upload) | [→](https://docs.deapi.ai/api/v1/analysis/transcribe.md) |
| `POST` | `/api/v1/client/transcribe/price-calculation` | Calculate unified transcription price | [→](https://docs.deapi.ai/api/v1/analysis/transcribe-price.md) |

## Transformation

Modify existing images and videos.

| Method | Endpoint | Description | Docs |
| - | - | - | - |
| `POST` | `/api/v1/client/img2img` | Transform image with text prompt | [→](https://docs.deapi.ai/api/v1/transformation/image-to-image.md) |
| `POST` | `/api/v1/client/img2img/price-calculation` | Calculate image transformation price | [→](https://docs.deapi.ai/api/v1/transformation/image-to-image-price.md) |
| `POST` | `/api/v1/client/img-rmbg` | Remove image background | [→](https://docs.deapi.ai/api/v1/transformation/background-removal.md) |
| `POST` | `/api/v1/client/img-rmbg/price-calculation` | Calculate background removal price | [→](https://docs.deapi.ai/api/v1/transformation/background-removal-price.md) |
| `POST` | `/api/v1/client/img-upscale` | Upscale image resolution | [→](https://docs.deapi.ai/api/v1/transformation/image-upscale.md) |
| `POST` | `/api/v1/client/img-upscale/price-calculation` | Calculate image upscale price | [→](https://docs.deapi.ai/api/v1/transformation/image-upscale-price.md) |
| `POST` | `/api/v1/client/vid-upscale` | Upscale video resolution | [→](https://docs.deapi.ai/api/v1/transformation/video-upscale.md) |
| `POST` | `/api/v1/client/vid-upscale/price-calculation` | Calculate video upscale price | [→](https://docs.deapi.ai/api/v1/transformation/video-upscale-price.md) |

## Utilities

Account management and job status tracking.

| Method | Endpoint | Description | Docs |
| - | - | - | - |
| `GET` | `/api/v1/client/balance` | Get current account balance | [→](https://docs.deapi.ai/api/v1/utilities/check-balance.md) |
| `GET` | `/api/v1/client/request-status/{request_id}` | Check job status and get results | [→](https://docs.deapi.ai/api/v1/utilities/get-results.md) |
| `GET` | `/api/v1/client/models` | List available models — send `?limit=50` for the full list | [→](https://docs.deapi.ai/api/v1/utilities/model-selection.md) |

## Workflow

Typical API usage follows this pattern:

**1. Check available models**

Call `GET /api/v1/client/models?limit=50` to get current models and their parameters. That covers the whole catalogue in one call — the page size defaults to 50, and `meta.last_page` reading `1` is what confirms nothing is missing.

**2. Calculate price (optional)**

Call the `/price-calculation` endpoint with your parameters to estimate cost.

**3. Submit job**

Call the main endpoint (e.g., `POST /api/v1/client/txt2img`) with your parameters. Response contains `request_id`.

**4. Poll for results**

Call `GET /api/v1/client/request-status/{request_id}` until `status` is `done` or `error`.

**5. Download result**

When `status` is `done`, use `result_url` to download your generated content.

## Response Formats

```json Job Submission (txt2img, txt2video, etc.) theme={null}
{
  "data": {
    "request_id": "c08a339c-73e5-4d67-a4d5-231302fbff9a"
  }
}
```

```json Job Status (request-status) theme={null}
{
  "data": {
    "status": "done",
    "progress": 100.0,
    "result_url": "https://...",
    "result": null,
    "preview": null
  }
}
```

```json Balance theme={null}
{
  "data": {
    "balance": 19.72
  }
}
```

```json Models List theme={null}
{
  "data": [
    {
      "name": "FLUX.1 Schnell 12B NF4",
      "slug": "Flux1schnell",
      "inference_types": ["txt2img"],
      "tags": [],
      "status": "standard_model",
      "info": { ... }
    }
  ],
  "links": { ... },
  "meta": { ... }
}
```

```json Error (4xx/5xx) theme={null}
{
  "message": "The selected model does not exist.",
  "errors": {
    "model": ["The selected model does not exist."]
  }
}
```

> [!NOTE]
>
> Response structure varies by endpoint. See individual endpoint documentation for exact schemas.

See [Errors](https://docs.deapi.ai/api/v1/errors.md) for detailed error handling documentation.


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