{
    "info": {
        "title": "AtlasCloud API",
        "version": "1.0.0",
        "description": "The AtlasCloud API."
    },
    "openapi": "3.0.0",
    "paths": {
        "/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"
        },
        "/api/v1/model/result/{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"
        }
    },
    "components": {
        "schemas": {
            "Input": {
                "properties": {
                    "model": {
                        "type": "string",
                        "description": "model name",
                        "default": "google/veo3.1/text-to-video"
                    },
                    "aspect_ratio": {
                        "default": "16:9",
                        "description": "Aspect ratio of the video.",
                        "enum": [
                            "16:9",
                            "9:16"
                        ],
                        "type": "string",
                        "x-ui-component": "select"
                    },
                    "duration": {
                        "default": 8,
                        "description": "The duration of the generated media in seconds.",
                        "enum": [
                            8,
                            4,
                            6
                        ],
                        "type": "integer",
                        "x-ui-component": "select"
                    },
                    "generate_audio": {
                        "default": false,
                        "description": "Whether to generate audio.",
                        "type": "boolean"
                    },
                    "negative_prompt": {
                        "description": "Negative prompt for the generation.",
                        "type": "string"
                    },
                    "prompt": {
                        "description": "Text prompt for generation; Positive text prompt.",
                        "type": "string"
                    },
                    "resolution": {
                        "default": "720p",
                        "description": "Video resolution.",
                        "enum": [
                            "720p",
                            "1080p",
                            "4k"
                        ],
                        "type": "string",
                        "x-ui-component": "select"
                    },
                    "seed": {
                        "description": "The random seed to use for the generation.",
                        "type": "integer"
                    }
                },
                "required": [
                    "model",
                    "prompt"
                ],
                "seed": {
                    "title": "Seed",
                    "type": "integer"
                },
                "type": "object",
                "x-order-properties": [
                    "model",
                    "prompt",
                    "aspect_ratio",
                    "duration",
                    "resolution",
                    "generate_audio",
                    "negative_prompt",
                    "seed"
                ],
                "allOf": [
                    {
                        "description": "When resolution is 1080p or 4k, duration must be 8 (seconds).",
                        "if": {
                            "properties": {
                                "resolution": {
                                    "enum": [
                                        "1080p",
                                        "4k"
                                    ]
                                }
                            },
                            "required": [
                                "resolution"
                            ]
                        },
                        "then": {
                            "properties": {
                                "duration": {
                                    "enum": [
                                        8
                                    ]
                                }
                            }
                        }
                    }
                ]
            },
            "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"
            }
        }
    },
    "servers": [
        {
            "url": "https://api.atlascloud.ai"
        }
    ]
}