{
  "openapi": "3.0.0",
  "info": {
    "title": "Levea AI Video Editor API",
    "version": "1.0.0",
    "description": "API to interact with Levea's autonomous AI video editor. Allows submitting natural-language editing briefs, generating viral clips, adding active word-by-word captions, applying motion graphics, and exporting final MP4 videos."
  },
  "servers": [
    {
      "url": "https://api.livecore.ai",
      "description": "Production Server"
    }
  ],
  "paths": {
    "/api/v1/misc/openclaw/v1/execute": {
      "post": {
        "operationId": "executeAutonomousEdit",
        "summary": "Execute autonomous video edit",
        "description": "Takes a natural-language description (prompt) of the desired edit, planning, executing, and returning the result.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "params"
                ],
                "properties": {
                  "tool": {
                    "type": "string",
                    "default": "autonomous_edit",
                    "description": "The tool to run. Keep as 'autonomous_edit' for natural-language prompts."
                  },
                  "params": {
                    "type": "object",
                    "required": [
                      "prompt"
                    ],
                    "properties": {
                      "prompt": {
                        "type": "string",
                        "description": "Natural-language description of the desired edit or creative brief. The backend planner decomposes it into canonical actions (viral clips, captions, reframe, export, …). Send the user's intent verbatim — do not pre-decompose."
                      },
                      "project_id": {
                        "type": "string",
                        "description": "Optional project id for tracking and continuity. Reuse the projectId returned by the first call for every continuation."
                      },
                      "video_url": {
                        "type": "string",
                        "description": "Optional public source video URL (HTTP/HTTPS: S3, Google Drive public link, Dropbox, direct MP4) for a new project. A local file path cannot be read directly: upload the file first (with the MCP server: call asset_upload_url, PUT the bytes to uploadUrl, then pass the returned fileUrl here)."
                      },
                      "assets": {
                        "type": "array",
                        "description": "Optional input media assets. URLs must be public HTTP/HTTPS links; upload local files first (with the MCP server: asset_upload_url, then use the returned fileUrl).",
                        "items": {
                          "type": "object",
                          "required": [
                            "url"
                          ],
                          "properties": {
                            "url": {
                              "type": "string",
                              "description": "Publicly accessible HTTP/HTTPS URL to the video, image, or audio asset."
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "video",
                                "audio",
                                "image"
                              ]
                            },
                            "id": {
                              "type": "string"
                            },
                            "mimeType": {
                              "type": "string"
                            },
                            "duration": {
                              "type": "number"
                            }
                          }
                        }
                      },
                      "captionTemplatePreset": {
                        "type": "string",
                        "description": "Optional caption template to apply when (re)generating captions: a builtin slug (e.g. hormozi, mrbeast, viral-pop, karaoke, neon-pop, subtitle-bar) or a user-saved template id. With the MCP server, list_caption_templates lists the exact ids."
                      },
                      "captionTemplateMode": {
                        "type": "string",
                        "enum": [
                          "add",
                          "recreate",
                          "style",
                          "translate",
                          "clear",
                          "remove_fillers"
                        ],
                        "description": "How to apply captionTemplatePreset."
                      },
                      "style_reference_url": {
                        "type": "string",
                        "description": "Optional reference video URL whose editing style the result should match (pacing, captions, framing, zooms, transitions, grade)."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful edit execution result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "True when the edit completed and its checks passed."
                    },
                    "status": {
                      "type": "string",
                      "description": "completed, failed, or awaiting_approval (the plan is waiting for approval)."
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable summary of the edits performed."
                    },
                    "videoUrl": {
                      "type": "string",
                      "description": "Direct URL to the finished MP4 video render."
                    },
                    "export_url": {
                      "type": "string",
                      "description": "Same URL as videoUrl when an export ran (legacy name)."
                    },
                    "jobId": {
                      "type": "string",
                      "description": "Numeric id of the export job, for polling."
                    },
                    "projectId": {
                      "type": "string",
                      "description": "Project id; send it as params.project_id on every follow-up edit."
                    },
                    "workingMemory": {
                      "type": "object",
                      "description": "Returned with status awaiting_approval; send it back with planDecision \"approve\" to run the plan."
                    },
                    "verificationReport": {
                      "type": "object",
                      "description": "Verification of the finished edit: status is verified, rejected, unverified, or not_applicable, with each failed check and what repair tried."
                    },
                    "qualityNotes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Advisory notes about the result."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. Missing prompt or invalid parameter format."
          },
          "401": {
            "description": "Unauthorized. Check your Levea API key."
          },
          "402": {
            "description": "Payment Required. Quota exceeded on current subscription plan."
          }
        }
      }
    }
  }
}
