{ "openapi": "3.1.0",
  "info": { "title": "UGCMaker API", "version": "1.0.0", "description": "Generate AI UGC video ads from product/app links. Pay per video. Keys: https://ugcmaker.app/account" },
  "servers": [{ "url": "https://ugcmaker.app" }],
  "paths": {
    "/api/videos": { "post": { "summary": "Generate video ads",
      "security": [{ "apiKey": [] }],
      "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["url"], "properties": {
        "url": { "type": "string" }, "count": { "type": "integer", "minimum": 1, "maximum": 5 },
        "format": { "type": "string" }, "hook": { "type": "string" }, "setting": { "type": "string" },
        "avatar": { "type": "string" }, "desc": { "type": "string" },
        "aspect": { "type": "string", "enum": ["9:16", "1:1", "16:9"] },
        "duration": { "type": "string", "enum": ["8", "10", "12"] },
        "quality": { "type": "string", "enum": ["1080p", "720p"] } } } } } },
      "responses": { "201": { "description": "Batch queued", "content": { "application/json": { "schema": { "type": "object", "properties": { "batch": { "type": "array", "items": { "type": "string" } } } } } } }, "402": { "description": "Not enough credits" } } } },
    "/api/videos/{id}": { "get": { "summary": "Job status", "parameters": [{ "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }],
      "responses": { "200": { "description": "Status", "content": { "application/json": { "schema": { "type": "object", "properties": { "state": { "type": "string" }, "videoUrl": { "type": "string", "nullable": true } } } } } } } } }
  },
  "components": { "securitySchemes": { "apiKey": { "type": "apiKey", "in": "header", "name": "X-Api-Key" } } } }
