{
  "info": {
    "title": "AtlasCloud API",
    "version": "1.0.0",
    "description": "Seedance 2.5 text-to-video with native, FlashVSR SR, and Atlas Video Enhance ESR resolution options."
  },
  "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"
    }
  },
  "openapi": "3.0.0",
  "servers": [
    {
      "url": "https://api.atlascloud.ai"
    }
  ],
  "components": {
    "schemas": {
      "Input": {
        "type": "object",
        "required": [
          "model",
          "prompt"
        ],
        "properties": {
          "model": {
            "type": "string",
            "description": "Model name.",
            "default": "bytedance/seedance-2.5/text-to-video"
          },
          "prompt": {
            "type": "string",
            "default": "A golden retriever running on a sunny beach, waves crashing in the background, cinematic lighting",
            "description": "Text prompt describing the desired video. Supports Chinese and English. Recommended length: Chinese < 500 characters, English < 1000 words."
          },
          "duration": {
            "type": "integer",
            "default": 5,
            "enum": [
              -1,
              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
            ],
            "description": "Video duration in seconds (4-30), or -1 for model to choose automatically.",
            "x-ui-component": "slider"
          },
          "resolution": {
            "type": "string",
            "default": "720p",
            "enum": [
              "480p",
              "720p",
              "720p-sr",
              "720p-esr",
              "1080p",
              "4k",
              "1080p-sr",
              "1080p-esr",
              "1080p-esr & 60fps",
              "1440p-sr",
              "1440p-esr",
              "4k-esr"
            ],
            "description": "Video resolution. 480p, 720p, and 1080p are native Seedance outputs. Every -sr and -esr option first generates the nearest native source, then upscales or enhances it: 720p-sr and 720p-esr from 480p; 1080p-sr, 1080p-esr, and 1080p-esr & 60fps from 720p; 1440p-sr, 1440p-esr, and 4k-esr from 1080p. Example: 4k-esr enhances a native 1080p source, not 720p. Native 1080p, 1080p-sr, and 1080p-esr are different products and are priced differently. 4k-esr delivers a 2160-pixel short edge (3840x2160 at 16:9), not native 4K generation."
          },
          "ratio": {
            "type": "string",
            "default": "adaptive",
            "enum": [
              "16:9",
              "4:3",
              "1:1",
              "3:4",
              "9:16",
              "21:9",
              "adaptive"
            ],
            "description": "Aspect ratio. 'adaptive' automatically selects based on prompt context."
          },
          "generate_audio": {
            "type": "boolean",
            "default": true,
            "description": "Whether to generate synchronized audio (voice, sound effects, background music)."
          },
          "watermark": {
            "type": "boolean",
            "default": false,
            "description": "Whether to add a watermark."
          },
          "return_last_frame": {
            "type": "boolean",
            "default": false,
            "description": "Whether to return the last frame as a separate image."
          },
          "output_format": {
            "type": "string",
            "default": "mp4",
            "enum": [
              "mp4",
              "mov"
            ],
            "description": "Output video container format. 'mp4' is the default; 'mov' encodes yuv444p for higher color fidelity, suited to multi-round editing/extension pipelines where recompression loss accumulates."
          },
          "draft": {
            "type": "boolean",
            "default": false,
            "description": "Generate a draft preview at 480p, overriding resolution. The response carries a draft_id for completing the draft at 1080p with bytedance/seedance-2.5/draft-complete within seven days. A draft is billed as a normal 480p render.",
            "x-ui-component": "switch"
          }
        },
        "x-order-properties": [
          "model",
          "prompt",
          "duration",
          "resolution",
          "ratio",
          "output_format",
          "generate_audio",
          "watermark",
          "return_last_frame",
          "draft"
        ]
      },
      "PredictionData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the prediction."
          },
          "urls": {
            "type": "object",
            "description": "Object containing related API endpoints."
          },
          "model": {
            "type": "string",
            "description": "Model ID used for the prediction."
          },
          "status": {
            "type": "string",
            "description": "Status: processing, completed, failed, or timeout."
          },
          "outputs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "URLs to generated content (video + optional last frame)."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "ISO timestamp of creation."
          },
          "completion_tokens": {
            "type": "integer",
            "description": "Tokens consumed for billing."
          },
          "total_tokens": {
            "type": "integer",
            "description": "Total tokens consumed."
          },
          "has_nsfw_contents": {
            "type": "array",
            "items": {
              "type": "boolean"
            },
            "description": "NSFW detection per output."
          },
          "draft": {
            "type": "boolean",
            "description": "True when this task is a 480p draft render."
          },
          "draft_id": {
            "type": "string",
            "description": "Pass as draft_id to bytedance/seedance-2.5/draft-complete to render the 1080p final (valid for 7 days)."
          }
        }
      },
      "PredictionResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/PredictionData"
          }
        }
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "in": "header",
        "name": "Authorization",
        "type": "apiKey"
      }
    }
  }
}