{
  "openapi": "3.1.0",
  "info": {
    "title": "Act-one Expression Migration API",
    "version": "1.0.0",
    "description": "Create a Runway compatibility-format act-one task using a source video plus a target image."
  },
  "servers": [
    {
      "url": "https://api.cometapi.com"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/runway/pro/act_one": {
      "post": {
        "summary": "Act-one Expression Migration",
        "operationId": "act_one_expression_migration",
        "parameters": [
          {
            "name": "X-Runway-Version",
            "in": "header",
            "required": false,
            "description": "Optional Runway version header, for example `2024-11-06`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "video",
                  "image",
                  "callback_url"
                ],
                "properties": {
                  "video": {
                    "type": "string",
                    "description": "URL of the 16:9 source video containing the performance to transfer. Plan source and output assets around a landscape 1280x720 frame target, and keep the source clip short and stable for best results.",
                    "default": "https://your-video-host/source.mp4"
                  },
                  "image": {
                    "type": "string",
                    "description": "URL of the target image whose character will receive the expression.",
                    "default": "https://your-image-host/portrait.jpg"
                  },
                  "callback_url": {
                    "type": "string",
                    "description": "Webhook URL that receives a POST request with the result when the task completes.",
                    "default": "https://example.com/webhook"
                  }
                },
                "default": {
                  "video": "https://your-video-host/source.mp4",
                  "image": "https://your-image-host/portrait.jpg",
                  "callback_url": "https://example.com/webhook"
                }
              },
              "examples": {
                "Default": {
                  "summary": "Default",
                  "value": {
                    "video": "https://your-video-host/source.mp4",
                    "image": "https://your-image-host/portrait.jpg",
                    "callback_url": "https://example.com/webhook"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "HTTP status code returned by the task service."
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "task_id"
                      ],
                      "properties": {
                        "task_id": {
                          "type": "string",
                          "description": "Task ID returned by the create endpoint."
                        }
                      }
                    },
                    "message": {
                      "type": "string",
                      "description": "Empty on success."
                    },
                    "msg": {
                      "type": "string",
                      "description": "Result message."
                    }
                  },
                  "example": {
                    "code": 200,
                    "message": "",
                    "msg": "success",
                    "data": {
                      "task_id": "196642a0-05e1-441a-981e-eb0c1f5d983b"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Bearer token authentication. Use your CometAPI key."
      }
    }
  }
}
