API in One API Documentation
Use one API in One key for live chat, image, video, music, speech, and AI tool routes. Chat uses an OpenAI-compatible API; media and tool routes use REST async tasks with status polling.
API in One keeps provider credentials behind server-side routes, exposes clear model costs, and returns task IDs for long-running generation jobs. Account, credits, billing, and order pages continue through the shared dashboard.
Use this base URL with OpenAI-compatible clients and REST calls.
Create and rotate API keys from the API Keys dashboard.
Poll async media jobs or configure callback_url on supported routes.
Quick Start
Get Started Now
Generate an API key, set the API in One base URL, and call your first model with a bearer token.
curl --request POST \
--url https://apiin.one/api/v1/chat/completions \
--header "Authorization: Bearer aio_your_api_key" \
--header "Content-Type: application/json" \
--data '{
"model": "gemini",
"messages": [
{
"role": "user",
"content": "Compare image and video model routes for a product launch."
}
],
"stream": false
}'API Endpoints
API in One exposes category-level endpoints backed by existing BFF routes. Chat requests are synchronous and OpenAI-compatible; image, video, music, speech, and tool jobs use async task polling where generation can take longer.
Chat Completion API
OpenAI-compatible chat with streaming and non-streaming responses.
POST /api/v1/chat/completionsImage Creation API
Text-to-image, image-to-image, and image editing with unified task polling.
POST /api/v1/images/generationsVideo Creation API
Async video generation with task IDs, status polling, and webhook-friendly results.
POST /api/v1/videos/generationsMusic & Speech APIs
Music generation, speech synthesis, covers, lyrics, and audio workflows.
POST /api/v1/audio/musicTask Status API
Retrieve async task status and final outputs from image, video, music, and tool jobs.
GET /api/v1/tasks/{task_id}AI Tool APIs
Background removal, face swap, image upscale, and video enhancement utilities.
POST /api/v1/images/tools/remove-bgChat Completion API
Use OpenAI-compatible chat payloads for text, reasoning, code, and multimodal chat models.
/api/v1/chat/completionsSupports common OpenAI SDK configuration with baseURL and apiKey. Streaming support depends on the selected model.
Image Creation API
Create images from text prompts, source images, masks, or model-specific edit inputs.
/api/v1/images/generationsMost image jobs return a task_id immediately. Poll the task status endpoint to retrieve completed image URLs.
Video Creation API
Generate videos from text prompts or image inputs with async status tracking.
/api/v1/videos/generationsVideo generation is long-running by design. Use callback_url for webhooks where the model supports it.
Music & Speech APIs
Build music generation, lyrics, covers, transcription, and text-to-speech workflows.
/api/v1/audio/music/api/v1/audio/music/extend/api/v1/audio/music/feed/api/v1/audio/music/cover/generate/api/v1/audio/music/cover/status/api/v1/audio/music/upload-cover/generate/api/v1/audio/music/upload-cover/status/api/v1/audio/music/timestamped-lyrics/api/v1/audio/speechSuno endpoints include dedicated docs for generate, extend, feed, cover, upload-cover, and timestamped lyrics.
Task Status API
Check async task progress and retrieve final model outputs when jobs complete.
/api/v1/tasks/{task_id}Task status responses normalize queued, processing, completed, and failed states across model providers.
AI Tool APIs
Run background removal, face swap, image upscale, video background removal, and video upscale jobs.
/api/v1/images/tools/remove-bg/api/v1/images/tools/face-swap/api/v1/images/tools/upscale/api/v1/videos/tools/bg-remover/api/v1/videos/tools/upscaleTool routes are implemented as dedicated image and video endpoints, each with explicit paths and async task behavior.
Request Schema
Most endpoints accept a shared authorization header and a JSON body with a model slug. Media routes add async workflow fields such as callback_url and task status polling.
| Field | Type | Required | Description |
|---|---|---|---|
Authorization | header | Yes | Bearer token from the API Keys dashboard. Keep it server-side. |
model | string | Yes | Model slug such as gemini, imagen-4, kling-3, flux-2, or suno. |
messages | array | Chat | OpenAI-compatible role/content messages for chat completion routes. |
prompt | string | Media | Text prompt for image, video, music, speech, and tool workflows. |
callback_url | string | No | Webhook URL for async completion notifications when supported by the selected route. |
Response Format
Synchronous chat response
200Chat routes return assistant content directly in OpenAI-compatible response shapes.
{
"id": "chatcmpl_...",
"object": "chat.completion",
"choices": [
{
"message": {
"role": "assistant",
"content": "API in One routes the request through the selected model."
}
}
]
}Async media task response
202Image, video, music, and tool routes return a task ID for polling or webhook completion.
{
"code": 200,
"message": "success",
"data": {
"task_id": "task_abc123",
"status": "IN_PROGRESS"
}
}Platform Benefits
Transparent Pricing
Pay as you go with no subscription required. Clear per-model rates and dashboard usage tracking.
- Clear per-model rates
- No hidden fees
- Only pay for successful jobs
Provider Route Abstraction
Model routes hide provider credentials and give your application one API in One key, one balance, and consistent task states.
Operational Visibility
Async routes expose queued, processing, completed, and failed states so production apps can handle provider latency and failures explicitly.
Server-Side Key Handling
Keep API in One keys in backend environments and call the gateway from your own server routes or jobs.
Clear Usage Boundaries
Model pages show cost, endpoint, webhook support, and task behavior so teams can plan usage before launch.
Real-Time Status
Monitor async task progress and retrieve final outputs from a single status endpoint.
SDKs & Code Examples
Use OpenAI-compatible SDKs for chat completion calls. For async image, video, music, speech, and tool jobs, submit the request first, then poll the task status endpoint until the output is ready.
Python SDK
Install with pip install openai, then set the API in One base URL and key.
from openai import OpenAI
client = OpenAI(
api_key="aio_your_api_key",
base_url="https://apiin.one/api/v1",
)
response = client.chat.completions.create(
model="gemini",
messages=[{"role": "user", "content": "Explain unified AI APIs"}],
)Node.js SDK
Install with npm install openai and configure baseURL for server-side usage.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "aio_your_api_key",
baseURL: "https://apiin.one/api/v1",
});
const response = await client.chat.completions.create({
model: "gemini",
messages: [{ role: "user", content: "Explain unified AI APIs" }],
});Java SDK
OpenAI-compatible Java clients can use the same endpoint pattern with API in One credentials.
OpenAIClient client = OpenAIClient.builder()
.apiKey("aio_your_api_key")
.baseUrl("https://apiin.one/api/v1")
.build();Migration from OpenAI
For chat integrations, switch configuration first. Image, video, music, speech, and tool routes use their own REST payloads and async task flow.
- 1
Get your API key
Sign up for API in One and create a key from the dashboard.
- 2
Update base URL
Change your base URL to https://apiin.one/api/v1 while keeping familiar authorization headers.
- 3
Test your endpoints
Run a chat request with the new model slug, then test media and tool routes with their documented REST payloads and task states.
Supported Models via API in One Routes
Access 28 listed models through one gateway. Each model detail page includes parameters, pricing notes, request examples, and task status behavior.
Chat Completion Models
Language models for chat, reasoning, multimodal input, and code tasks.
- Gemini: Google's most capable AI model for text generation, reasoning, and conversation.
Image Creation Models
Image creation and editing models for text prompts, references, and production visuals.
- Flux 2: High-quality AI image generation with excellent prompt following and photorealistic output.
- GPT Image 1.5: OpenAI's GPT Image 1.5 — multimodal image generation and editing with text rendering capabilities.
- Ideogram V3: Ideogram V3 — industry-leading text-to-image generation with best-in-class typography and design capabilities.
- Ideogram V4: Ideogram V4 — high-quality text-to-image generation with strong typography, flexible sizes, and speed-quality controls.
- Imagen 4: Google's Imagen 4 — photorealistic image generation with exceptional detail and prompt adherence.
Video Creation Models
Video generation models with async task tracking and webhook callbacks.
- Kling 3.0: State-of-the-art AI video generation with 4K quality support. Text-to-video and image-to-video capabilities.
- Hailuo 2.3: High-quality AI video generation by MiniMax. Supports image-to-video with standard and pro quality modes, cinematic motion quality.
- Wan 2.6: Alibaba's Wan 2.6 video generation model. Supports text-to-video and image-to-video with high-fidelity output.
- Vidu Q3: Vidu Q3 by Shengshu Technology — advanced AI video generation with strong motion understanding and character consistency.
- PixVerse 5.6: PixVerse 5.6 — fast AI video generation with stylized output. Supports text-to-video and image-to-video.
Speech & Music Models
Audio generation, speech, music, lyrics, and cover workflows.
- Suno: Full-featured AI music generation platform. Supports text-to-music, extend tracks, upload audio covers, generate cover images, and timestamped lyrics. 8 API endpoints.
- ElevenLabs V3: Ultra-realistic text-to-speech with natural sounding voices. Supports multiple languages and voice styles.
- MiniMax Music: MiniMax's AI music generation — create high-quality songs with vocals and instrumentals from text descriptions.
FAQ
How do I migrate from OpenAI?
Use the API in One base URL, pass your API in One key as a bearer token, and update the model slug. Chat APIs follow OpenAI-compatible conventions.
What production behavior should I plan for?
The platform focuses on transparent task states, provider route abstraction, consistent errors, and no credit charges for failed requests where the model integration supports it.
How does pricing compare to direct provider access?
Pricing is pay-as-you-go and visible on model pages and the cost reference page. Use those API in One credit costs as the source of truth.
Do async tasks support polling?
Yes. Long-running image, video, music, and tool jobs return task IDs that can be checked through GET /api/v1/tasks/{task_id}.