{
  "info": {
    "title": "AtlasCloud API",
    "version": "1.0.0",
    "description": "LTX-2.5 Fast text-to-video (Lightricks LTX-2 native API)."
  },
  "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": "ltx/ltx-2.5-fast/text-to-video"
          },
          "prompt": {
            "type": "string",
            "default": "A majestic eagle soaring through golden clouds at sunset, slow cinematic dolly-in, warm light.",
            "description": "Scene description including desired content, camera movement and atmosphere."
          },
          "duration": {
            "type": "integer",
            "default": -1,
            "enum": [
              -1,
              6,
              8,
              10,
              12,
              14,
              16,
              18,
              20
            ],
            "description": "Video length in seconds. Durations above 10s (12–20) require 720p or 1080p at 24/25 fps; 1440p, 4k and 48 fps are limited to 6–10s. Use -1 to let the model choose the duration automatically.",
            "x-ui-component": "slider"
          },
          "resolution": {
            "type": "string",
            "default": "720p",
            "enum": [
              "720p",
              "1080p",
              "1440p",
              "4k"
            ],
            "description": "Output resolution tier. Combined with aspect_ratio to select the exact frame size (720p→1280x720, 1080p→1920x1080, 1440p→2560x1440, 4k→3840x2160; portrait 9:16 swaps width/height). 1440p and 4k support 6–10s durations only."
          },
          "aspect_ratio": {
            "type": "string",
            "default": "16:9",
            "enum": [
              "16:9",
              "9:16"
            ],
            "description": "Frame orientation: 16:9 landscape or 9:16 portrait."
          },
          "fps": {
            "type": "integer",
            "default": 24,
            "enum": [
              24,
              25,
              48,
              50
            ],
            "description": "Frames per second. 48 fps is available only for durations ≤10s; at 1440p and 4k all durations are ≤10s regardless of fps."
          },
          "generate_audio": {
            "type": "boolean",
            "default": true,
            "description": "Whether to generate AI audio (ambience, effects, speech) matching the scene."
          },
          "camera_motion": {
            "type": "string",
            "enum": [
              "dolly_in",
              "dolly_out",
              "dolly_left",
              "dolly_right",
              "jib_up",
              "jib_down",
              "static",
              "focus_shift"
            ],
            "description": "Optional camera movement directive applied to the shot."
          }
        },
        "x-order-properties": [
          "model",
          "prompt",
          "duration",
          "resolution",
          "aspect_ratio",
          "fps",
          "generate_audio",
          "camera_motion"
        ],
        "allOf": [
          {
            "if": {
              "properties": {
                "resolution": {
                  "enum": [
                    "720p",
                    "1080p"
                  ]
                },
                "fps": {
                  "enum": [
                    24,
                    25
                  ]
                }
              },
              "required": [
                "resolution",
                "fps"
              ]
            },
            "then": {
              "properties": {
                "duration": {
                  "enum": [
                    -1,
                    6,
                    8,
                    10,
                    12,
                    14,
                    16,
                    18,
                    20
                  ]
                }
              }
            },
            "else": {
              "properties": {
                "duration": {
                  "enum": [
                    -1,
                    6,
                    8,
                    10
                  ],
                  "default": 10
                }
              }
            }
          }
        ]
      },
      "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 the generated video."
          },
          "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."
          }
        }
      },
      "PredictionResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/PredictionData"
          }
        }
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "in": "header",
        "name": "Authorization",
        "type": "apiKey"
      }
    }
  }
}
