跳转到主要内容
APIXO 在同一类别内为所有模型标准化参数。从 Flux 2 切换到 Midjourney 只需极少代码修改——学一次,到处用。

请求结构

所有生成模型都遵循相同的请求结构:
{
  "provider": "auto",
  "request_type": "async",
  "callback_url": "https://your-server.com/callback",
  "input": {
    "mode": "text-to-image",
    "prompt": "your description"
  }
}

顶层参数

provider
string
默认值:"auto"
Routing strategy. Options: auto (best balance), value (cost-optimized), official (direct provider).
request_type
string
默认值:"async"
How to receive results. async for polling, callback for webhook delivery.
callback_url
string
Webhook URL for receiving results. Required when request_type is callback. Must be a publicly accessible HTTPS endpoint.
input
object
必填
Model-specific generation parameters. Structure varies by model category (image, video, audio).

图像生成参数

所有图像模型(Flux 2、Midjourney、GPT Image 1 等)共享以下 input 参数:
input
object
必填

视频生成参数

所有视频模型(Sora 2、Kling、Veo 等)共享以下 input 参数:
input
object
必填

音频生成参数

音频模型(Suno)使用以下 input 参数:
input
object
必填

宽高比参考

ValueDescriptionBest 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"
  }
}
部分模型还有额外的高级参数,详见各模型文档

相关