> ## Documentation Index
> Fetch the complete documentation index at: https://apixo.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Parameter Specification

> Unified API parameters for seamless model switching

<Tip>
  APIXO standardizes parameters across all models within each category. Switch from Flux 2 to Midjourney with minimal code changes — learn once, use everywhere.
</Tip>

## Request Structure

All generation models follow the same request structure:

```json theme={null}
{
  "provider": "auto",
  "request_type": "async",
  "callback_url": "https://your-server.com/callback",
  "input": {
    "mode": "text-to-image",
    "prompt": "your description"
  }
}
```

### Top-Level Parameters

<ParamField body="provider" type="string" default="auto">
  Routing strategy. Options: `auto` (best balance), `value` (cost-optimized), `official` (direct provider).
</ParamField>

<ParamField body="request_type" type="string" default="async">
  How to receive results. `async` for polling, `callback` for webhook delivery.
</ParamField>

<ParamField body="callback_url" type="string">
  Webhook URL for receiving results. Required when `request_type` is `callback`. Must be a publicly accessible HTTPS endpoint.
</ParamField>

<ParamField body="input" type="object" required>
  Model-specific generation parameters. Structure varies by model category (image, video, audio).
</ParamField>

***

## Image Generation Parameters

All image models (Flux 2, Midjourney, GPT Image 1, etc.) share these `input` parameters:

<ParamField body="input" type="object" required>
  <Expandable title="properties">
    <ParamField body="mode" type="string" required default="text-to-image">
      Generation mode: `text-to-image` or `image-to-image`.
    </ParamField>

    <ParamField body="prompt" type="string" required>
      Text description of the desired output. 1–5000 characters.
    </ParamField>

    <ParamField body="negative_prompt" type="string">
      Elements to avoid in the generated image (e.g., `"blurry, low quality"`).
    </ParamField>

    <ParamField body="image_urls" type="string[]">
      Reference image URLs for `image-to-image` mode. Max 5 images, each under 10 MB.
    </ParamField>

    <ParamField body="aspect_ratio" type="string" default="1:1">
      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`.
    </ParamField>

    <ParamField body="resolution" type="string" default="2K">
      Output resolution: `1K`, `2K`, or `4K`.
    </ParamField>

    <ParamField body="output_format" type="string" default="png">
      Output format: `png` (lossless, larger) or `jpeg` (compressed, smaller).
    </ParamField>
  </Expandable>
</ParamField>

***

## Video Generation Parameters

All video models (Sora 2, Kling, Veo, etc.) share these `input` parameters:

<ParamField body="input" type="object" required>
  <Expandable title="properties">
    <ParamField body="mode" type="string" required default="text-to-video">
      Generation mode: `text-to-video` or `image-to-video`.
    </ParamField>

    <ParamField body="prompt" type="string" required>
      Text description of the desired video content.
    </ParamField>

    <ParamField body="negative_prompt" type="string">
      Elements to avoid in the generated video (e.g., `"shaky, low quality"`).
    </ParamField>

    <ParamField body="image_urls" type="string[]">
      Reference image URLs for `image-to-video` mode.
    </ParamField>

    <ParamField body="aspect_ratio" type="string" default="16:9">
      Output aspect ratio: `1:1`, `16:9`, or `9:16`.
    </ParamField>

    <ParamField body="resolution" type="string" default="1080p">
      Output resolution: `480p`, `720p`, or `1080p`.
    </ParamField>

    <ParamField body="duration" type="integer">
      Video length in seconds.
    </ParamField>

    <ParamField body="sound" type="boolean" default="false">
      Whether to generate audio alongside the video.
    </ParamField>
  </Expandable>
</ParamField>

***

## Audio Generation Parameters

Audio models (Suno) use these `input` parameters:

<ParamField body="input" type="object" required>
  <Expandable title="properties">
    <ParamField body="mode" type="string" required>
      Suno version: `V4`, `V4_5`, `V4_5PLUS`, or `V5`.
    </ParamField>

    <ParamField body="prompt" type="string" required>
      Lyrics or a description of the desired music.
    </ParamField>

    <ParamField body="customMode" type="boolean" default="false">
      Enable custom mode for full control over style and lyrics.
    </ParamField>

    <ParamField body="instrumental" type="boolean" default="false">
      Generate instrumental only (no vocals).
    </ParamField>
  </Expandable>
</ParamField>

***

## Aspect Ratio Reference

| Value  | Description | Best For                  |
| ------ | ----------- | ------------------------- |
| `1:1`  | Square      | Social media, avatars     |
| `16:9` | Widescreen  | Video, desktop wallpapers |
| `9:16` | Vertical    | Mobile, short videos      |
| `4:3`  | Classic     | Traditional photos        |
| `3:4`  | Portrait    | Classic portraits         |
| `21:9` | Ultra-wide  | Cinematic, banners        |

***

## Quick Reference

<Tabs>
  <Tab title="Image">
    ```json theme={null}
    {
      "provider": "auto",
      "request_type": "async",
      "input": {
        "mode": "text-to-image",
        "prompt": "a serene mountain landscape at sunset",
        "aspect_ratio": "16:9",
        "resolution": "2K"
      }
    }
    ```
  </Tab>

  <Tab title="Video">
    ```json theme={null}
    {
      "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
      }
    }
    ```
  </Tab>

  <Tab title="Audio">
    ```json theme={null}
    {
      "provider": "auto",
      "request_type": "async",
      "input": {
        "mode": "V4_5PLUS",
        "prompt": "upbeat pop song about summer",
        "customMode": false,
        "instrumental": false
      }
    }
    ```
  </Tab>
</Tabs>

<Info>
  Some models have additional unique parameters for advanced features. See individual [model documentation](/models) for details.
</Info>

***

## Related

* [Generate Task](/api-reference/generate-task)
* [Status Task](/api-reference/status-task)
* [Models](/models)
