API in One'ı uygulamanıza entegre etmek için ihtiyacınız olan her şey.
Kimlik Doğrulama
Tüm API istekleri, Authorization başlığında bir Bearer token gerektirir. API anahtarlarınızı kontrol panelinden yönetebilirsiniz.
http
1
Authorization: Bearer aio_your_api_key_here
API Anahtarınızı Alın: Kontrol panelinizdeki API Anahtarları sayfasından ücretsiz API anahtarınızı oluşturun. Yeni hesaplar platformu keşfetmek için bonus kredi alır.
Temel URL
https://apiin.one/api/v1
API Uç Noktaları
Click each endpoint to see full parameter details, example requests, and response format.
POST/api/v1/images/generationsImage generation
Generate images using AI models. Specify the model in the request body. The model field determines which image generation engine is used. Returns a task_id for async polling.
Request Body Parameters
Body ParametersJSON
model:string
Model slug. See Supported Models below for available options.
prompt:string
Text description of the image to generate (3–5000 chars)
aspect_ratio:optional string
Output aspect ratio (e.g. 1:1, 16:9, 9:16) Defaults to 1:1.
type:optional string
Generation mode. Model-specific, e.g. pro/flex for Flux 2, text-to-image/edit for Seedream
resolution:optional string
Output resolution. Model-specific, e.g. 1K/2K for Flux 2
quality:optional string
Quality level. Model-specific, e.g. medium/high for GPT Image
input_urls:optional array
Array of image URLs for image-to-image or editing mode
negative_prompt:optional string
Elements to avoid in the generated image (not all models support this)
seed:optional number
Random seed for reproducibility (not all models support this)
curl-X POST https://apiin.one/api/v1/images/generations\
2
-H"Authorization: Bearer aio_your_api_key"\
3
-H"Content-Type: application/json"\
4
-d '{
5
"model": "flux-2",
6
"prompt": "A serene Japanese garden with cherry blossoms",
7
"aspect_ratio": "16:9",
8
"type": "pro",
9
"resolution": "1K"
10
}'
Example Response
json
1
{
2
"code": 200,
3
"message": "success",
4
"data": {
5
"task_id": "n41xxxx_flux2",
6
"status": "IN_PROGRESS"
7
}
8
}
POST/api/v1/videos/generationsVideo generation
Generate videos using AI models. Supports text-to-video and image-to-video. The model field determines which video engine is used. Returns a task_id for async polling.
Request Body Parameters
Body ParametersJSON
model:string
Model slug. See Supported Models below for available options.
prompt:string
Text description of the video (max 2500 chars for most models)
image:optional string
Image URL for image-to-video mode. Auto-detected by most models.
mode:optional string
Quality mode. Model-specific, e.g. std/pro for Kling 3
duration:optional number | string
Video duration in seconds. Model-specific (Kling 3: 3–15s, others vary) Defaults to 5.
aspect_ratio:optional string
Output aspect ratio (1:1, 9:16, 16:9) Defaults to 16:9.
resolution:optional string
Output resolution. Model-specific, e.g. 480p, 720p, 1080p
sound:optional boolean
Enable audio generation in the video (Kling 3) Defaults to true.
generateAudio:optional boolean
Enable audio generation (Seedance) Defaults to false.
generate_audio_switch:optional boolean
Enable audio generation (PixVerse) Defaults to false.
curl-X POST https://apiin.one/api/v1/videos/generations\
2
-H"Authorization: Bearer aio_your_api_key"\
3
-H"Content-Type: application/json"\
4
-d '{
5
"model": "kling-3",
6
"prompt": "A golden retriever running through sunflowers at sunset",
7
"mode": "std",
8
"duration": 5,
9
"aspect_ratio": "16:9",
10
"sound": true
11
}'
Example Response
json
1
{
2
"code": 200,
3
"message": "success",
4
"data": {
5
"task_id": "n75xxxx_kling3",
6
"status": "IN_PROGRESS"
7
}
8
}
POST/api/v1/audio/musicMusic generation
Generate original music from text descriptions. Suno supports both "inspiration mode" (text description) and "custom mode" (lyrics + style + title). MiniMax Music supports lyrics-driven generation. Returns a task_id for async polling.
Request Body Parameters
Body ParametersJSON
model:string
Model: suno (defaults to chirp-v3-5) or minimax-music
prompt:optional string
Lyrics (Suno custom mode) or style description (MiniMax). Max 3000 chars for Suno v3.5/v4, 5000 for v4.5+.
gpt_description_prompt:optional string
Text description for Suno inspiration mode. Max 400 chars.
style:optional string
Musical style/genre (Suno custom mode). Max 1000 chars.
title:optional string
Song title (Suno). Max 80 characters.
make_instrumental:optional boolean
Generate instrumental only, no vocals (Suno) Defaults to false.
"prompt": "Verse 1: Walking down the street\nChorus: Summer dreams",
7
"style": "pop, upbeat, electronic",
8
"title": "Summer Dreams",
9
"make_instrumental": false
10
}'
Example Response
json
1
{
2
"code": 200,
3
"message": "success",
4
"data": {
5
"task_id": "n7xxxx_suno",
6
"status": "IN_PROGRESS"
7
}
8
}
POST/api/v1/audio/speechText to speech
Convert text to natural-sounding multi-voice dialogue speech using ElevenLabs V3. Supports 30+ languages and automatic language detection. Returns a task_id for async polling.
Request Body Parameters
Body ParametersJSON
model:string
Model slug: elevenlabs-v3
dialogue:array
Array of dialogue items: [{text: ..., voice: ...}]. Voice is optional.
stability:optional number
Voice stability (0–1). Lower = more variation, higher = more consistent. Defaults to 0.5.
language_code:optional string
Language code (e.g. en, zh, ja) or auto for detection Defaults to auto.
curl-X POST https://apiin.one/api/v1/audio/speech\
2
-H"Authorization: Bearer aio_your_api_key"\
3
-H"Content-Type: application/json"\
4
-d '{
5
"model": "elevenlabs-v3",
6
"dialogue": [
7
{"text": "Hello, welcome to API in One.", "voice": "narrator"},
8
{"text": "Thank you! Tell me more.", "voice": "user"}
9
],
10
"stability": 0.5,
11
"language_code": "auto"
12
}'
Example Response
json
1
{
2
"code": 200,
3
"message": "success",
4
"data": {
5
"task_id": "n58xxxx_tts",
6
"status": "IN_PROGRESS"
7
}
8
}
POST/api/v1/chat/completionsChat / LLM
Chat completions in OpenAI-compatible format. Supports SSE streaming by default. Powered by Gemini (defaults to Gemini 3 Flash). Returns a synchronous or streamed response (not async task).
Request Body Parameters
Body ParametersJSON
model:string
Model slug: gemini. Backend defaults to Gemini 3 Flash.
messages:array
Array of message objects: [{role: user|assistant|system|developer, content: ...}]
stream:optional boolean
Enable SSE streaming. Responses are sent as Server-Sent Events. Defaults to true.
include_thoughts:optional boolean
Include model reasoning/thinking steps in response Defaults to true.
reasoning_effort:optional string
Reasoning depth: low or high Defaults to high.
tools:optional array
Array of tool definitions for function calling (OpenAI-compatible format)
response_format:optional object
Force structured output format (e.g. {type: json_object})
Remove image backgrounds instantly with AI precision. No model field required. 1 credit per image. Returns a task_id for async polling.
Request Body Parameters
Body ParametersJSON
image:string
URL of the image to remove background from
Example Request
bash
1
curl-X POST https://apiin.one/api/v1/images/tools/remove-bg\
2
-H"Authorization: Bearer aio_your_api_key"\
3
-H"Content-Type: application/json"\
4
-d '{
5
"image": "https://example.com/photo.jpg"
6
}'
Example Response
json
1
{
2
"code": 200,
3
"message": "success",
4
"data": {
5
"task_id": "n19xxxx_bgremove"
6
}
7
}
POST/api/v1/images/tools/face-swapFace swap
Swap faces in images with natural-looking results. Requires a target image (body/scene) and a source face image. 4 credits per swap. Returns a task_id for async polling.
Request Body Parameters
Body ParametersJSON
image:string
URL of the target image (the body/scene to modify)
face_image:string
URL of the source face image (the face to swap in)
target_index:optional number
Face index in target image if multiple faces detected (0–10) Defaults to 0.
output_format:optional string
Output format: jpeg, png, or webp Defaults to jpeg.
Example Request
bash
1
curl-X POST https://apiin.one/api/v1/images/tools/face-swap\
Remove or replace video backgrounds with AI. Supports optional custom background image replacement. 10 credits per video. Returns a task_id for async polling.
Request Body Parameters
Body ParametersJSON
video:string
URL of the video to process
background_image:optional string
URL of a custom background image to replace with
Example Request
bash
1
curl-X POST https://apiin.one/api/v1/videos/tools/bg-remover\
2
-H"Authorization: Bearer aio_your_api_key"\
3
-H"Content-Type: application/json"\
4
-d '{
5
"video": "https://example.com/talking-head.mp4"
6
}'
Example Response
json
1
{
2
"code": 200,
3
"message": "success",
4
"data": {
5
"task_id": "n53xxxx_vbgr",
6
"status": "IN_PROGRESS"
7
}
8
}
GET/api/v1/tasks/{task_id}Check task status
Poll the status of any asynchronous generation task. The task_id is returned by all generation endpoints (except chat/completions). Poll until status is "SUCCESS" or "FAILED".
Request Body Parameters
Body ParametersJSON
task_id:string (path)
The task ID returned by the generation endpoint (e.g. n41xxxx_flux2)
Example Request
bash
1
curlhttps://apiin.one/api/v1/tasks/n41xxxx_flux2\
2
-H"Authorization: Bearer aio_your_api_key"
Example Response
json
1
{
2
"code": 200,
3
"message": "success",
4
"data": {
5
"task_id": "n41xxxx_flux2",
6
"status": "SUCCESS",
7
"consumed_credits": 5,
8
"error_message": null,
9
"created_at": "2026-02-25T12:00:00Z",
10
"request": {
11
"model": "flux-2",
12
"prompt": "A serene Japanese garden..."
13
},
14
"response": [
15
"https://cdn.example.com/generated-image.png"
16
]
17
}
18
}
İstek Formatı
Tüm istekler, hangi AI modelinin kullanılacağını belirten zorunlu bir 'model' alanı içeren JSON gövdesi kullanır. Ek parametreler modele göre değişir.
json
1
{
2
"model": "flux-2",
3
"prompt": "A beautiful landscape",
4
"...other_params": "..."
5
}
'model' parametresi her zaman zorunludur. Desteklenen parametrelerin tam listesi için her modelin dokümantasyon sayfasını ziyaret edin.
Yanıt Formatı
Asenkron Görevler (Görsel, Video, Müzik, Ses)
İçerik oluşturma modelleri için API hemen bir görev ID'si döndürür. Görevin tamamlanıp tamamlanmadığını kontrol etmek için durum uç noktasını sorgulayın.
Initial response when task is created.
1
{
2
"id": "task_abc123",
3
"status": "pending",
4
"model": "kling-3",
5
"created_at": "2026-02-24T12:00:00Z"
6
}
Senkron Yanıtlar (Sohbet)
Sohbet yanıtları, OpenAI uyumlu formatta tek bir istekte doğrudan döndürülür.
json
1
{
2
"id": "chatcmpl_xyz",
3
"model": "gemini",
4
"choices": [
5
{
6
"message": {
7
"role": "assistant",
8
"content": "..."
9
}
10
}
11
],
12
"usage": {
13
"prompt_tokens": 12,
14
"completion_tokens": 156,
15
"total_tokens": 168
16
},
17
"credits_consumed": 2
18
}
Hata İşleme
endpoints_desc
json
1
{
2
"error": {
3
"code": 401,
4
"message": "Invalid API key",
5
"type": "authentication_error"
6
}
7
}
Body ParametersJSON
400:optional invalid_request
Geçersiz istek parametreleri. Zorunlu alanlar için model dokümantasyonunu kontrol edin.
401:optional authentication_error
API anahtarı eksik, geçersiz veya iptal edilmiş.
402:optional insufficient_credits
Hesabınızda yeterli kredi yok. Devam etmek için daha fazla kredi satın alın.
404:optional not_found
İstenen kaynak (görev, model) bulunamadı.
429:optional rate_limit
Hız sınırı aşıldı. Varsayılan dakikada 60 istektir.
500:optional server_error
Dahili sunucu hatası. Lütfen kısa bir süre sonra tekrar deneyin.
Hızlı Başlangıç
1. API anahtarınızı alın
Kaydolun ve kontrol panelinizden bir API anahtarı oluşturun. Ücretsiz hesaplar bonus kredi içerir.
2. İlk isteğinizi gönderin
bash
1
curl-X POST https://apiin.one/api/v1/images/generations\
2
-H"Authorization: Bearer aio_your_key"\
3
-H"Content-Type: application/json"\
4
-d '{
5
"model": "flux-2",
6
"prompt": "A serene Japanese garden with cherry blossoms"
7
}'
3. Görev durumunu kontrol edin (asenkron modeller)
bash
1
curlhttps://apiin.one/api/v1/tasks/task_abc123\
2
-H"Authorization: Bearer aio_your_key"
4. Daha fazla model keşfedin
Kullanım durumunuz için mükemmel AI modelini bulmak üzere model dizinimize göz atın.