{
  "components": {
    "schemas": {
      "TaskResponse": {
        "description": "Standard async task creation response",
        "properties": {
          "code": {
            "description": "Status code returned by the service",
            "example": "success",
            "type": "string"
          },
          "data": {
            "description": "Response payload containing task details",
            "properties": {
              "task_id": {
                "description": "Identifier of the created task",
                "type": "string"
              }
            },
            "required": [
              "task_id"
            ],
            "type": "object"
          },
          "fail_code": {
            "description": "Failure code if the task submission did not succeed",
            "type": "string"
          },
          "message": {
            "description": "Additional information about the request result",
            "type": "string"
          }
        },
        "required": [
          "data",
          "code",
          "message"
        ],
        "type": "object"
      },
      "TaskStatusResponse": {
        "description": "Async task status query response",
        "example": {
          "code": "success",
          "data": {
            "fail_code": "",
            "fail_reason": "",
            "finish_time": 1763274838,
            "outputs": [
              "https://api.siray.ai/redirect/example-output"
            ],
            "progress": "100%",
            "start_time": 1763274702,
            "status": "SUCCESS",
            "submit_time": 1763274672,
            "task_id": "video_69196fafcc9c8190acccf32e9b560c3f0da8a6d1948cfaa5"
          },
          "message": ""
        },
        "properties": {
          "code": {
            "description": "Status code returned by the service",
            "example": "success",
            "type": "string"
          },
          "data": {
            "description": "Task execution details",
            "properties": {
              "fail_code": {
                "description": "Failure code if the task did not succeed",
                "type": "string"
              },
              "fail_reason": {
                "description": "Explanation of the failure if the task did not succeed",
                "type": "string"
              },
              "finish_time": {
                "description": "Unix timestamp when task processing finished",
                "format": "int64",
                "type": "integer"
              },
              "outputs": {
                "description": "URLs for generated assets",
                "items": {
                  "description": "Public URL to the generated asset",
                  "format": "uri",
                  "type": "string"
                },
                "type": "array"
              },
              "progress": {
                "description": "Human-readable task progress indicator",
                "example": "100%",
                "type": "string"
              },
              "start_time": {
                "description": "Unix timestamp when task processing began",
                "format": "int64",
                "type": "integer"
              },
              "status": {
                "description": "Current task status",
                "enum": [
                  "NOT_START",
                  "SUBMITTED",
                  "QUEUED",
                  "IN_PROGRESS",
                  "FAILURE",
                  "SUCCESS"
                ],
                "type": "string"
              },
              "submit_time": {
                "description": "Unix timestamp when the task was submitted",
                "format": "int64",
                "type": "integer"
              },
              "task_id": {
                "description": "Identifier of the task",
                "type": "string"
              }
            },
            "required": [
              "task_id",
              "status"
            ],
            "type": "object"
          },
          "message": {
            "description": "Additional information or error details",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message",
          "data"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "bearerFormat": "API Key",
        "description": "Bearer authentication using API key",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Wan 2.7 Image t2i Spicy by Alibaba Cloud is a Spicy text-to-image model for concept art, marketing visuals, and creative design. It supports mature, boundary-pushing content with polished results.",
    "summary": "API for Wan 2.7 Image t2i Spicy model",
    "title": "Wan 2.7 Image t2i Spicy API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/images/generations/async": {
      "post": {
        "description": "Generate an image using the Wan 2.7 Image t2i Spicy model",
        "operationId": "image_model-qv7s1c2waqwu7w4a",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "aspect_ratio": "1:1",
                "bbox_list": [
                  [
                    [
                      0,
                      0,
                      512,
                      512
                    ]
                  ]
                ],
                "color_palette": [
                  {
                    "hex": "#FF5733",
                    "ratio": "1"
                  }
                ],
                "enable_sequential": true,
                "model": "alibaba/wan-2.7-image-t2i-spicy",
                "n": 1,
                "prompt": "example_value",
                "prompt_expansion_enable": true,
                "seed": -1,
                "size": "1k"
              },
              "schema": {
                "description": "Request format for image generation models",
                "properties": {
                  "aspect_ratio": {
                    "description": "Aspect ratio",
                    "enum": [
                      "1:1",
                      "1:2",
                      "2:1",
                      "1:3",
                      "3:1",
                      "2:3",
                      "3:2",
                      "3:4",
                      "4:3",
                      "4:5",
                      "5:4",
                      "9:16",
                      "16:9",
                      "9:21",
                      "21:9"
                    ],
                    "type": "string"
                  },
                  "bbox_list": {
                    "description": "Interactive edit regions. Outer array aligns with input images; each image has a list of boxes; each box is [x1, y1, x2, y2].",
                    "example": [
                      [
                        [
                          0,
                          0,
                          512,
                          512
                        ]
                      ]
                    ],
                    "items": {
                      "items": {
                        "items": {
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxItems": 4,
                        "minItems": 4,
                        "type": "array"
                      },
                      "type": "array"
                    },
                    "type": "array"
                  },
                  "color_palette": {
                    "description": "Custom color theme",
                    "example": [
                      {
                        "hex": "#FF5733",
                        "ratio": "1"
                      }
                    ],
                    "items": {
                      "properties": {
                        "hex": {
                          "description": "Hex color, for example #FF5733",
                          "type": "string"
                        },
                        "ratio": {
                          "description": "Color ratio",
                          "type": "string"
                        }
                      },
                      "required": [
                        "hex",
                        "ratio"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "enable_sequential": {
                    "description": "Whether to enable sequential group image output. When enabled, state the number of images to generate in the prompt and describe what each image looks like, for example \"generate 4 images: the first one is ..., the second one is ...\". The n parameter then sets the maximum number of images to generate.",
                    "example": true,
                    "type": "boolean"
                  },
                  "model": {
                    "description": "Model name to use for the request",
                    "enum": [
                      "alibaba/wan-2.7-image-t2i-spicy"
                    ],
                    "type": "string"
                  },
                  "n": {
                    "default": 1,
                    "description": "Number of outputs to generate. When enable_sequential is true, this is the maximum number of images to generate; the actual count is determined by the number of images described in the prompt. Billing is based on the images actually generated, not this maximum",
                    "maximum": 12,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "prompt": {
                    "description": "Text prompt for generation",
                    "type": "string"
                  },
                  "prompt_expansion_enable": {
                    "default": true,
                    "description": "Whether to automatically expand the prompt for better results",
                    "type": "boolean"
                  },
                  "seed": {
                    "description": "Random seed for generation",
                    "maximum": 2147483647,
                    "minimum": -1,
                    "type": "integer"
                  },
                  "size": {
                    "description": "Size",
                    "enum": [
                      "1k",
                      "2k"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "model",
                  "prompt",
                  "size",
                  "aspect_ratio"
                ],
                "title": "Image Generation Request",
                "type": "object"
              }
            }
          },
          "description": "Request payload",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskResponse"
                }
              }
            },
            "description": "Successful response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Generate image",
        "tags": [
          "Wan 2.7 Image t2i Spicy"
        ]
      }
    },
    "/v1/images/generations/async/{task_id}": {
      "get": {
        "description": "Query the status and result of an image generation task",
        "operationId": "query_image_task_model-qv7s1c2waqwu7w4a",
        "parameters": [
          {
            "description": "Task ID returned from the image generation request",
            "in": "path",
            "name": "task_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskStatusResponse"
                }
              }
            },
            "description": "Task status and result"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Query image generation task",
        "tags": [
          "Wan 2.7 Image t2i Spicy"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Model Verse API Server",
      "url": "https://api.siray.ai"
    }
  ],
  "tags": [
    {
      "description": "Wan 2.7 Image t2i Spicy - Wan 2.7 Image t2i Spicy by Alibaba Cloud is a Spicy text-to-image model for concept art, marketing visuals, and creative design. It supports mature, boundary-pushing content with polished results.",
      "name": "Wan 2.7 Image t2i Spicy"
    }
  ]
}