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

# SD2 Manxue: Create Video Generation Task (720p to 4K)

> POST /v1/sd2_manxue/videos — Generate 4–15s videos from 720p to 4K with SD2 Manxue. Supports text, first/last frame, and image, video, audio reference.

Submit an asynchronous video generation task using the SD2 Manxue model family. The endpoint returns a task `id` immediately — poll the [Query Video Task](/api-reference/video/sd2-manxue-query) endpoint until the task reaches `completed` or `failed`. SD2 Manxue supports pure text-to-video, first-frame and first/last frame guidance, and a rich multi-modal reference mode that accepts images, videos, and audio together. Models range from 720p to 4K output resolution, with Fast variants for speed-sensitive workflows.

## Base URL

```
https://zcbservice.aizfw.cn/kyyReactApiServer
```

## Endpoint

```
POST /v1/sd2_manxue/videos
```

## Authentication

```
Authorization: Bearer YOUR_API_KEY
```

## Models

Select the model based on your desired output resolution and speed requirements:

| Model                   | Output Resolution | Notes                               |
| ----------------------- | ----------------- | ----------------------------------- |
| `sd2_manxue_720p`       | 720p              | Standard quality, faster generation |
| `sd2_manxue_1080p`      | 1080p             | Full HD, general-purpose            |
| `sd2_manxue_2k`         | 2K                | Higher-precision output             |
| `sd2_manxue_4k`         | 4K                | Maximum quality, highest detail     |
| `sd2_manxue_fast_720p`  | 720p              | Fast series — speed-first at 720p   |
| `sd2_manxue_fast_1080p` | 1080p             | Fast series — speed-first at 1080p  |

<Tip>
  The **Fast series** (`sd2_manxue_fast_*`) prioritizes speed over maximum detail. Use the standard series when you need the highest quality for a given resolution.
</Tip>

## Request Parameters

<ParamField body="prompt" type="string" required>
  Text description of the video content. Include subject, action, camera movement, and visual style.

  **Example:** `"A woman jogging on a neon-lit street at night, rain reflections, smooth camera push, cinematic"`
</ParamField>

<ParamField body="model" type="string" required>
  The model to use. Determines output resolution. See the model table above.

  Supported values: `sd2_manxue_720p`, `sd2_manxue_1080p`, `sd2_manxue_2k`, `sd2_manxue_4k`, `sd2_manxue_fast_720p`, `sd2_manxue_fast_1080p`
</ParamField>

<ParamField body="duration" type="integer">
  Output video duration in seconds.

  * Default: `5`
  * Supported range: `4`–`15` seconds
</ParamField>

<ParamField body="ratio" type="string">
  Output aspect ratio. Defaults to `16:9`.

  | Value  | Description         |
  | ------ | ------------------- |
  | `16:9` | Landscape (default) |
  | `21:9` | Ultrawide           |
  | `4:3`  | Standard screen     |
  | `1:1`  | Square              |
  | `3:4`  | Portrait standard   |
  | `9:16` | Portrait            |
</ParamField>

### First / Last Frame Mode

<ParamField body="first_image" type="string">
  URL of the first-frame image.

  * Used alone: drives video from this starting frame
  * Used with `last_image`: first/last frame guidance mode
  * Accepts public URL or `asset://{assetId}` for assets submitted via the asset library
  * Recommended image aspect ratio: `0.4`–`2.5`; recommended size: `300`–`6000 px`
  * Cannot be used with `referenceImages`, `referenceVideos`, or `referenceAudios`
</ParamField>

<ParamField body="last_image" type="string">
  URL of the last-frame image. Enables first/last frame guidance when paired with `first_image`.

  * Must be used together with `first_image`
  * Cannot be used alone
  * Recommended image aspect ratio: `0.4`–`2.5`; recommended size: `300`–`6000 px`
</ParamField>

<Warning>
  `first_image`/`last_image` are **mutually exclusive** with all `reference*` fields. You cannot mix frame-guidance mode and reference media mode in the same request.
</Warning>

### Multi-Modal Reference Mode

Use these fields to provide reference media for the generated video. All three can be combined freely, but none can be combined with `first_image` or `last_image`.

<ParamField body="referenceImages" type="array">
  Array of reference image URLs (or `asset://{assetId}` references).

  * Maximum **9** images
  * Accepted formats: `jpeg`, `png`, `webp`, `bmp`, `tiff`, `gif`
  * Recommended aspect ratio: `0.4`–`2.5`; recommended dimensions: `300`–`6000 px`
  * Cannot be used with `first_image` or `last_image`
</ParamField>

<ParamField body="referenceVideos" type="array">
  Array of reference video URLs.

  * Maximum **3** videos
  * Total combined duration must not exceed **15 seconds**
  * Total combined size must not exceed **500 MB**
  * Cannot be used with `first_image` or `last_image`
</ParamField>

<ParamField body="referenceAudios" type="array">
  Array of reference audio URLs.

  * Maximum **3** audio files
  * Total combined duration must not exceed **15 seconds**
  * Total combined size must not exceed **500 MB**
  * Cannot be used with `first_image` or `last_image`
</ParamField>

<Note>
  For images containing **faces or virtual avatars**, submit the image to the asset library first and reference it using the `asset://{assetId}` format to ensure optimal results and policy compliance.
</Note>

### Legacy Compatibility

The legacy fields `image` (alias for `first_image`) and `lastFrameImage` (alias for `last_image`) remain supported. If both a legacy field and its new counterpart are provided with conflicting values, the API returns a parameter conflict error.

## Response Fields

<ResponseField name="id" type="string">
  Unique task identifier. Save this value — you'll use it to poll the [Query Video Task](/api-reference/video/sd2-manxue-query) endpoint.
</ResponseField>

<ResponseField name="object" type="string">
  Object type. Always `"video"`.
</ResponseField>

<ResponseField name="created" type="integer">
  Unix timestamp of when the task was created.
</ResponseField>

<ResponseField name="model" type="string">
  The model name used for this task.
</ResponseField>

<ResponseField name="status" type="string">
  Task status at creation. Always `"queued"` on successful submission.

  Lifecycle values:

  * `queued` — task accepted and waiting in queue
  * `processing` — model is actively generating
  * `completed` — generation finished; `video_url` is available
  * `failed` — generation failed; see `error`
</ResponseField>

<ResponseField name="error" type="string">
  Error message. `null` on successful submission.
</ResponseField>

## Generation Modes

| Mode             | Required Fields                                                                                | Constraints                      |
| ---------------- | ---------------------------------------------------------------------------------------------- | -------------------------------- |
| Text-to-video    | `model`, `prompt`                                                                              | Optional: `duration`, `ratio`    |
| First-frame      | `model`, `prompt`, `first_image`                                                               | Optional: `duration`, `ratio`    |
| First/last frame | `model`, `prompt`, `first_image`, `last_image`                                                 | Optional: `duration`, `ratio`    |
| Image reference  | `model`, `prompt`, `referenceImages`                                                           | Up to 9 images                   |
| Video reference  | `model`, `prompt`, `referenceVideos`                                                           | Up to 3 videos, ≤15s total       |
| Audio reference  | `model`, `prompt`, `referenceAudios`                                                           | Up to 3 files, ≤15s total        |
| Multi-modal      | `model`, `prompt` + any combination of `referenceImages`, `referenceVideos`, `referenceAudios` | All `reference*` can be combined |

## Code Examples

<CodeGroup>
  ```bash cURL (Text-to-Video) theme={null}
  curl --request POST \
    --url https://zcbservice.aizfw.cn/kyyReactApiServer/v1/sd2_manxue/videos \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "model": "sd2_manxue_1080p",
      "prompt": "A woman jogging on a neon-lit street at night, rain reflections, smooth camera push, cinematic",
      "duration": 5,
      "ratio": "16:9"
    }'
  ```

  ```bash cURL (First-Frame Mode) theme={null}
  curl --request POST \
    --url https://zcbservice.aizfw.cn/kyyReactApiServer/v1/sd2_manxue/videos \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "model": "sd2_manxue_1080p",
      "prompt": "The woman continues jogging as neon signs blur past in the background",
      "duration": 5,
      "ratio": "16:9",
      "first_image": "https://example.com/scene-start.jpg"
    }'
  ```

  ```bash cURL (Multi-Modal Reference) theme={null}
  curl --request POST \
    --url https://zcbservice.aizfw.cn/kyyReactApiServer/v1/sd2_manxue/videos \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "model": "sd2_manxue_1080p",
      "prompt": "Character dancing in the street with the background music",
      "duration": 8,
      "ratio": "9:16",
      "referenceImages": [
        "asset://abc123"
      ],
      "referenceAudios": [
        "https://example.com/bgm.mp3"
      ]
    }'
  ```

  ```python Python (Text-to-Video) theme={null}
  import requests

  response = requests.post(
      "https://zcbservice.aizfw.cn/kyyReactApiServer/v1/sd2_manxue/videos",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json",
      },
      json={
          "model": "sd2_manxue_1080p",
          "prompt": "A woman jogging on a neon-lit street at night, rain reflections, smooth camera push, cinematic",
          "duration": 5,
          "ratio": "16:9",
      },
  )

  task = response.json()
  print("Task ID:", task["id"])
  print("Status:", task["status"])
  ```
</CodeGroup>

### Example Response

```json theme={null}
{
  "id": "video_sd2manxue_1234567890",
  "object": "video",
  "created": 1774836724,
  "model": "sd2_manxue_1080p",
  "status": "queued",
  "error": null
}
```

## Next Steps

After receiving the task `id`, poll the [Query Video Task](/api-reference/video/sd2-manxue-query) endpoint to check status and retrieve `video_url` when generation completes.
