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)