Use this file to discover all available pages before exploring further.
deAPI’s OpenAI-compatible API gives you access to image generation, speech synthesis, transcription, video generation, and embeddings — at lower cost, on decentralized GPU infrastructure. Switch from OpenAI by changing two parameters. Your existing code stays unchanged.This is the same approach used by Groq, Together AI, Fireworks AI, and other leading inference providers.
from openai import OpenAIclient = OpenAI( api_key="dpn-sk-your-token-here", base_url="https://oai.deapi.ai/v1")# Generate an image — same call as OpenAIresponse = client.images.generate( model="Flux1schnell", prompt="A futuristic city at sunset, cinematic lighting", size="1024x1024", n=1)print(response.data[0].url)
import OpenAI from "openai";const client = new OpenAI({ apiKey: "dpn-sk-your-token-here", baseURL: "https://oai.deapi.ai/v1",});// Generate an image — same call as OpenAIconst response = await client.images.generate({ model: "Flux1schnell", prompt: "A futuristic city at sunset, cinematic lighting", size: "1024x1024", n: 1,});console.log(response.data[0].url);
curl -X POST "https://oai.deapi.ai/v1/images/generations" \ -H "Authorization: Bearer dpn-sk-your-token-here" \ -H "Content-Type: application/json" \ -d '{ "model": "Flux1schnell", "prompt": "A futuristic city at sunset, cinematic lighting", "size": "1024x1024", "n": 1 }'
Get your API key at app.deapi.ai/dashboard. New accounts receive a $5 bonus — no credit card required.
Your full API key looks like 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.
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:
Models are added and updated regularly. For the full, always-current list with capabilities, limits, and defaults, see the Model Selection endpoint and the Models guide.
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.
with open("audio.mp3", "rb") as f: transcript = client.audio.transcriptions.create( model="whisper-1", file=f )print(transcript.text)
After (deAPI):
from openai import OpenAIclient = OpenAI( api_key="dpn-sk-your-token-here", base_url="https://oai.deapi.ai/v1")with open("audio.mp3", "rb") as f: transcript = client.audio.transcriptions.create( model="WhisperLargeV3", file=f )print(transcript.text)
Supported response_format values: "json" (default), "text", "verbose_json".The maximum file size is 80MB – more than three times the OpenAI limit of 25MB.