{
  "components": {
    "schemas": {
      "Input": {
        "properties": {
          "model": {
            "type": "string",
            "description": "model name",
            "default": "alibaba/wan-3.0/text-to-video"
          },
          "prompt": {
            "description": "The text prompt describing the scene, subject, and action (up to 20000 characters).",
            "type": "string"
          },
          "resolution": {
            "default": "1080p",
            "description": "Output resolution. Native tiers: 480p, 720p, 1080p. ESR tiers: 720p-esr, 1080p-esr, 1440p-esr, 4k-esr.",
            "enum": [
              "1080p",
              "720p",
              "480p",
              "720p-esr",
              "1080p-esr",
              "1440p-esr",
              "4k-esr"
            ],
            "type": "string",
            "x-ui-component": "select"
          },
          "duration": {
            "default": 5,
            "description": "Video length in seconds (2-30). Pass -1 for smart-duration (the model picks the best length).",
            "enum": [
              -1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30
            ],
            "x-enum-labels": {
              "-1": "Smart"
            },
            "type": "number",
            "x-ui-component": "select"
          },
          "ratio": {
            "default": "adaptive",
            "description": "The aspect ratio of the generated video. Use 'adaptive' to let the model choose.",
            "enum": [
              "adaptive",
              "16:9",
              "4:3",
              "1:1",
              "3:4",
              "9:16"
            ],
            "type": "string",
            "x-ui-component": "select"
          },
          "audio": {
            "default": true,
            "description": "Whether the output video includes an audio track. Same price either way.",
            "type": "boolean",
            "x-ui-component": "switch"
          },
          "seed": {
            "description": "The random seed to use for the generation. -1 means a random seed will be used.",
            "type": "integer"
          }
        },
        "required": [
          "model",
          "prompt"
        ],
        "type": "object",
        "x-order-properties": [
          "model",
          "prompt",
          "resolution",
          "duration",
          "ratio",
          "audio",
          "seed"
        ]
      },
      "PredictionResponse": {
        "properties": {
          "created_at": {
            "description": "ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”).",
            "format": "date-time",
            "type": "string"
          },
          "has_nsfw_contents": {
            "description": "Array of boolean values indicating NSFW detection for each output.",
            "items": {
              "type": "boolean"
            },
            "type": "array"
          },
          "id": {
            "description": "Unique identifier for the prediction, the ID of the prediction to get.",
            "type": "string"
          },
          "model": {
            "description": "Model ID used for the prediction.",
            "type": "string"
          },
          "outputs": {
            "description": "Array of URLs to the generated content (empty when status is not completed).",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "status": {
            "description": "Status of the task: created, processing, completed, or failed.",
            "type": "string"
          },
          "urls": {
            "description": "Object containing related API endpoints.",
            "type": "object"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "in": "header",
        "name": "Authorization",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "The AtlasCloud API.",
    "title": "AtlasCloud API",
    "version": "1.0.0"
  },
  "openapi": "3.0.0",
  "paths": {
    "/api/v1/model/prediction/{request_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "description": "Request ID",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredictionResponse"
                }
              }
            },
            "description": "Result of the request."
          }
        }
      },
      "x-api-name": "model_result"
    },
    "/api/v1/model/generateVideo": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Input"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredictionResponse"
                }
              }
            },
            "description": "The request status."
          }
        }
      },
      "x-api-name": "model_run"
    }
  },
  "servers": [
    {
      "url": "https://api.atlascloud.ai"
    }
  ]
}
