Quick start
- Python
- Node.js / TypeScript
- cURL
What changes vs OpenAI
| Parameter | OpenAI | deAPI |
|---|---|---|
base_url / baseURL | https://api.openai.com/v1 | https://oai.deapi.ai/v1 |
api_key / apiKey | sk-... | Your deAPI key (starts with dpn-sk-) |
model | e.g. dall-e-3 | deAPI model ID (e.g. Flux1schnell) |
dpn-sk-2206|ixoAULVrh... — the dpn-sk- prefix is required by the gateway. You can find it in your Dashboard → Settings → API Keys.
Everything else — request format, response schema, error envelope — follows the OpenAI specification.
Available models
deAPI runs open-source models, not OpenAI’s proprietary ones. Model IDs are native slugs (e.g.Flux1schnell, Kokoro, WhisperLargeV3) — not OpenAI model names. This is by design.
Use GET /v1/models to fetch the current list:
Supported endpoints
| Endpoint | Status | Description |
|---|---|---|
GET /v1/models | ✅ | List available models |
POST /v1/images/generations | ✅ | Text-to-image |
POST /v1/images/edits | ✅ | Image editing (img2img) |
POST /v1/audio/speech | ✅ | Text-to-speech |
POST /v1/audio/transcriptions | ✅ | Audio & video transcription |
POST /v1/embeddings | ✅ | Text embeddings |
POST /v1/videos | ✅ | Video generation |
POST /v1/chat/completions | ❌ | Not in scope — deAPI does not serve LLMs |
POST /v1/images/edits with mask | ❌ | Inpainting not supported — returns 400 |
POST /v1/files | 🔜 | Coming soon — files are sent inline (multipart) for now |
Migration examples
Image generation (DALL-E → deAPI)
Before (OpenAI):api_key, base_url, and model:
Text-to-speech (OpenAI TTS → deAPI)
Before (OpenAI):mp3, wav, flac, opus.
Kokoro supports the same six OpenAI voice aliases (alloy, echo, fable, onyx, nova, shimmer). Voice language is determined by the voice prefix, not the input text: af_/am_ → US English, bf_/bm_ → British English. See the TTS endpoint docs for the full voice list.Transcription (Whisper → deAPI)
Before (OpenAI):response_format values: "json" (default), "text", "verbose_json".
The maximum audio file size is 20 MB, subject to a global 75 MB request body cap. See Limits & Quotas → File Uploads for the full breakdown.
Embeddings
Before (OpenAI):encoding_format: "base64".
Framework integrations
Because deAPI uses the OpenAI API format, it works with any framework that accepts abase_url / api_base parameter.
LangChain
LlamaIndex
Vercel AI SDK
Environment variables
If your codebase already uses the standard OpenAI environment variables, override them at the process level — zero code changes required:Known differences
| Feature | OpenAI | deAPI |
|---|---|---|
| Chat completions | ✅ | ❌ Out of scope |
Inpainting (mask in /v1/images/edits) | ✅ | ❌ Returns 400 |
| Model IDs | dall-e-3, tts-1, whisper-1 | Native slugs (e.g. Flux1schnell, Kokoro) |
Image size values | OpenAI fixed set | Model-specific — check Models |
Max n (images) | 10 | 4 |
| Audio file size limit | 25 MB | 20 MB (per-file) — total request body capped at 75 MB |
| Embedding dimensions | 1536 (ada-002) | Model-specific (e.g. 1024 for Bge_M3_FP16) |
style: "vivid" | Controls image style | Accepted but ignored |
| Video generation | ❌ | ✅ POST /v1/videos |
/v1/files | ✅ | 🔜 Coming soon |
Next steps
Models
Discover all available models and their capabilities
Quickstart
Get your API key and make your first request
API v2 Reference
Full native API reference with all endpoints
Pricing
Pay-as-you-go rates per task and model