APIXO 在同一类别内为所有模型标准化参数。从 Flux 2 切换到 Midjourney 只需极少代码修改——学一次,到处用。
请求结构
所有生成模型都遵循相同的请求结构:
{
"provider": "auto",
"request_type": "async",
"callback_url": "https://your-server.com/callback",
"input": {
"mode": "text-to-image",
"prompt": "your description"
}
}
顶层参数
Routing strategy. Options: auto (best balance), value (cost-optimized), official (direct provider).
How to receive results. async for polling, callback for webhook delivery.
Webhook URL for receiving results. Required when request_type is callback. Must be a publicly accessible HTTPS endpoint.
Model-specific generation parameters. Structure varies by model category (image, video, audio).
图像生成参数
所有图像模型(Flux 2、Midjourney、GPT Image 1 等)共享以下 input 参数:
mode
string
默认值:"text-to-image"
必填
Generation mode: text-to-image or image-to-image.
Text description of the desired output. 1–5000 characters.
Elements to avoid in the generated image (e.g., "blurry, low quality").
Reference image URLs for image-to-image mode. Max 5 images, each under 10 MB.
Output aspect ratio: 1:1, 4:3, 3:4, 3:2, 2:3, 4:5, 5:4, 9:16, 16:9, 21:9, or auto.
Output resolution: 1K, 2K, or 4K.
Output format: png (lossless, larger) or jpeg (compressed, smaller).
视频生成参数
所有视频模型(Sora 2、Kling、Veo 等)共享以下 input 参数:
mode
string
默认值:"text-to-video"
必填
Generation mode: text-to-video or image-to-video.
Text description of the desired video content.
Elements to avoid in the generated video (e.g., "shaky, low quality").
Reference image URLs for image-to-video mode.
Output aspect ratio: 1:1, 16:9, or 9:16.
Output resolution: 480p, 720p, or 1080p.
Whether to generate audio alongside the video.
音频生成参数
音频模型(Suno)使用以下 input 参数:
Suno version: V4, V4_5, V4_5PLUS, or V5.
Lyrics or a description of the desired music.
Enable custom mode for full control over style and lyrics.
Generate instrumental only (no vocals).
宽高比参考
| Value | Description | Best For |
|---|
1:1 | 正方形 | 社交媒体、头像 |
16:9 | 宽屏 | 视频、桌面壁纸 |
9:16 | 竖屏 | 移动端、短视频 |
4:3 | 经典比例 | 传统照片 |
3:4 | 竖版 | 经典人像 |
21:9 | 超宽 | 电影、横幅 |
快速参考
{
"provider": "auto",
"request_type": "async",
"input": {
"mode": "text-to-image",
"prompt": "a serene mountain landscape at sunset",
"aspect_ratio": "16:9",
"resolution": "2K"
}
}
{
"provider": "auto",
"request_type": "callback",
"callback_url": "https://your-server.com/callback",
"input": {
"mode": "text-to-video",
"prompt": "a drone shot flying over mountains",
"aspect_ratio": "16:9",
"duration": 10
}
}
{
"provider": "auto",
"request_type": "async",
"input": {
"mode": "V4_5PLUS",
"prompt": "upbeat pop song about summer",
"customMode": false,
"instrumental": false
}
}