{
  "paths": {
    "/api/v1/capabilities": {
      "get": {
        "operationId": "listCapabilities",
        "summary": "いま使える機能を見る",
        "tags": [
          "利用可能な機能"
        ],
        "description": "現在の API 環境で利用できる機能・モデル・アップロード形式と制作上限を取得します。",
        "x-required-scope": "projects:read",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicCapabilityPage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works": {
      "get": {
        "operationId": "listProjects",
        "summary": "プロジェクト一覧を見る",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "アクセス可能な作品を取得します。state で状態を絞り込み、cursor と limit でページを指定します。",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicProjectPage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createProject",
        "summary": "新しいプロジェクトを作る",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "name を指定して作品を作成します。返された作品 ID で素材を追加し、制作を進めます。",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicProject"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}": {
      "get": {
        "operationId": "getProject",
        "summary": "プロジェクトの情報を見る",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "作品名・状態・現在の revision を取得します。編集や制作のリクエスト前に最新版を確認できます。",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicProject"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "patch": {
        "operationId": "updateProject",
        "summary": "プロジェクトの情報を変更する",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "作品名や active・archived の状態を変更します。最新の ETag を If-Match に指定してください。",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "最新の ETag を引用符も含めて入力してください。",
            "schema": {
              "type": "string",
              "pattern": "^\"[1-9][0-9]*\"$",
              "example": "\"1\""
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicProject"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/resources": {
      "get": {
        "operationId": "listResources",
        "summary": "アップロードした資料の一覧を見る",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "作品の脚本・キャラクター・シーン・小道具・エピソード・ショットを取得します。kind で種類を選べます。",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "script",
                "character",
                "scene",
                "prop",
                "episode",
                "shot"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicResourcePage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createResource",
        "summary": "脚本や画像などの資料を登録する",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "kind と data で脚本文やショット情報を作品に登録します。ファイル本体は /uploads で送信します。",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicResource"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/resources/{resource_id}": {
      "get": {
        "operationId": "getResource",
        "summary": "資料を 1 件見る",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "作品内の resource_id で指定した資料の種類・内容・revision を取得します。",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "resource_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicResource"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "patch": {
        "operationId": "updateResource",
        "summary": "資料を修正する",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "資料の kind と data を更新します。編集の競合を防ぐため、最新 ETag を If-Match に指定してください。",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "resource_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "最新の ETag を引用符も含めて入力してください。",
            "schema": {
              "type": "string",
              "pattern": "^\"[1-9][0-9]*\"$",
              "example": "\"1\""
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicResource"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/uploads": {
      "post": {
        "operationId": "createUpload",
        "summary": "ファイルのアップロード先を受け取る",
        "tags": [
          "アップロード"
        ],
        "description": "ファイル情報を登録し upload_url を取得します。その URL にファイルを PUT し、アップロード完了 API を呼び出してください。 TXT・Markdown・DOCX・PNG・JPEG・WebP・AVIF・WAV・ZIP に対応します。容量制限は Studio と共通です。GET /capabilities の upload_limits を確認してください。脚本は最大 5,000,000 文字です。ファイル名にパス区切り文字は使えません。WAV は PCM または IEEE float です。",
        "x-required-scope": "assets:write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicUploadTicket"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/uploads/{upload_id}/complete": {
      "post": {
        "operationId": "completeUpload",
        "summary": "ファイルを上げ終えたと知らせる",
        "tags": [
          "アップロード"
        ],
        "description": "送信されたファイルを登録情報と照合し、制作に使えるアセット情報を返します。",
        "x-required-scope": "assets:write",
        "parameters": [
          {
            "name": "upload_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicAsset"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/assets/{asset_id}": {
      "get": {
        "operationId": "getAsset",
        "summary": "成果物の情報とダウンロードリンクを見る",
        "tags": [
          "アセット・結果"
        ],
        "description": "アセット情報と、利用可能な場合は署名付き download_url を取得します。有効期限内にダウンロードしてください。",
        "x-required-scope": "assets:read",
        "parameters": [
          {
            "name": "asset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicAsset"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/plans": {
      "post": {
        "operationId": "createPlan",
        "deprecated": true,
        "summary": "制作プランと必要クレジットを確認する",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "実際の制作は始めずに、何を作るのかと必要なクレジットだけを先に確認します。",
        "x-required-scope": "runs:write",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicPlan"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/runs": {
      "post": {
        "operationId": "createRun",
        "deprecated": true,
        "summary": "制作を開始する",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "作成済みの plan_id の制作計画を実行し、実行 ID を返します。getRun で状態と結果を確認します。",
        "x-required-scope": "runs:write",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicRun"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/runs": {
      "get": {
        "operationId": "listRuns",
        "summary": "制作の一覧を見る",
        "tags": [
          "制作実行"
        ],
        "description": "制作の実行一覧を取得します。作品・状態・client_reference・期間で絞り込めます。",
        "x-required-scope": "runs:read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "running",
                "awaiting_review",
                "stopping",
                "paused",
                "needs_attention",
                "partially_succeeded",
                "succeeded",
                "failed",
                "cancelled"
              ]
            }
          },
          {
            "name": "client_reference",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicRunPage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}": {
      "get": {
        "operationId": "getRun",
        "summary": "制作の進み具合を見る",
        "tags": [
          "制作実行"
        ],
        "description": "制作実行の現在の状態・バージョン・利用可能な結果を取得します。承認や停止の操作にはこのバージョンを使います。",
        "x-required-scope": "runs:read",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicRun"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/steps": {
      "get": {
        "operationId": "listRunSteps",
        "summary": "段階ごとの進行状況を見る",
        "tags": [
          "制作実行"
        ],
        "description": "制作実行の各ステップと状態を取得し、待機中・実行中・完了の段階を確認できます。",
        "x-required-scope": "runs:read",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStepPage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/events": {
      "get": {
        "operationId": "listRunEvents",
        "summary": "制作中に残った記録を見る",
        "tags": [
          "制作実行"
        ],
        "description": "状態変更やレビュー依頼などの実行イベントを取得し、制作の経過を確認します。",
        "x-required-scope": "runs:read",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicRunEventPage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/decisions": {
      "post": {
        "operationId": "decideRun",
        "summary": "続けるか止めるかを決める",
        "tags": [
          "制作実行"
        ],
        "description": "制作実行に approve・stop・resume・cancel_remaining・retry_result の操作を送信します。最新バージョンを expected_version に指定します。 retry_result は保存済み動画タスクの結果照会のみ再開します。最新の expected_version と step_id を指定してください。元のジョブと予約クレジットを維持し、再生成しません。受付から24時間以内の復旧可能な動画のみ対応します。その他の結果・使用量不明のタスクは運営者の確認が必要です。",
        "x-required-scope": "runs:write",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecisionInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicRun"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/jobs": {
      "post": {
        "operationId": "createJob",
        "deprecated": true,
        "summary": "機能を 1 つだけすぐ実行する",
        "tags": [
          "ワークフロー機能"
        ],
        "description": "制作全体を動かさずに、機能を 1 つだけ選んですぐ実行します。analyze_script は脚本を読んでショットを作り、generate_image はキャラクター・シーン・小道具・ショットの画像を作ります。generate_video は画像を選んだショットの映像を作り、assemble_video はすべてのショットに映像がそろったエピソードをつなぎます。リクエストには必ずプロジェクトの最新 revision を入れてください。Live で送るとクレジットを先に確保します。",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/jobs/{job_id}": {
      "get": {
        "operationId": "getJob",
        "summary": "実行したジョブの状態と結果を見る",
        "tags": [
          "ワークフロー機能"
        ],
        "description": "ジョブの現在の状態と出力アセット ID を取得します。完了後、getAsset で結果ファイルを取得します。",
        "x-required-scope": "jobs:read",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/requests": {
      "get": {
        "operationId": "listRequests",
        "summary": "送ったリクエストの履歴一覧を見る",
        "tags": [
          "リクエストログ"
        ],
        "description": "HTTP ステータスや処理時間を含む API 呼び出し履歴を取得します。作品や期間で絞り込めます。",
        "x-required-scope": "requests:read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "run_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "job_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "key_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status_code",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            }
          },
          {
            "name": "method",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "GET",
                "POST",
                "PATCH",
                "PUT"
              ]
            }
          },
          {
            "name": "route_template",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicRequestLogPage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/requests/{request_id}": {
      "get": {
        "operationId": "getRequest",
        "summary": "送ったリクエストの履歴を 1 件見る",
        "tags": [
          "リクエストログ"
        ],
        "description": "request_id で API 呼び出しの HTTP ステータス・処理時間・関連する実行やジョブを取得します。",
        "x-required-scope": "requests:read",
        "parameters": [
          {
            "name": "request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicRequestLog"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/usage": {
      "get": {
        "operationId": "getUsage",
        "summary": "クレジットの使用量を見る",
        "tags": [
          "使用量"
        ],
        "description": "指定期間の使用量合計と、予約済み・精算済みの金額を取得します。",
        "x-required-scope": "usage:read",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicUsage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/webhook-endpoints": {
      "get": {
        "operationId": "listWebhookEndpoints",
        "summary": "Webhook 通知先の一覧を見る",
        "tags": [
          "Webhook"
        ],
        "description": "登録済み Webhook の URL・購読イベント・有効状態を取得します。",
        "x-required-scope": "webhooks:read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicWebhookEndpointPage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createWebhookEndpoint",
        "summary": "Webhook 通知先を登録する",
        "tags": [
          "Webhook"
        ],
        "description": "指定作品で選択した制作イベントを受け取る Webhook URL を登録します。",
        "x-required-scope": "webhooks:write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicWebhookIssued"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/webhook-endpoints/{endpoint_id}": {
      "patch": {
        "operationId": "updateWebhookEndpoint",
        "summary": "Webhook 通知先を変更する",
        "tags": [
          "Webhook"
        ],
        "description": "Webhook を有効・無効にし、受信するイベントの種類を変更します。",
        "x-required-scope": "webhooks:write",
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "最新の ETag を引用符も含めて入力してください。",
            "schema": {
              "type": "string",
              "pattern": "^\"[1-9][0-9]*\"$",
              "example": "\"1\""
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicWebhookEndpoint"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/webhook-deliveries": {
      "get": {
        "operationId": "listWebhookDeliveries",
        "summary": "Webhook を送った履歴を見る",
        "tags": [
          "Webhook 配信"
        ],
        "description": "Webhook の送信履歴と状態を取得し、通知が届いたか確認できます。",
        "x-required-scope": "webhooks:read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicWebhookDeliveryPage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/webhook-deliveries/{delivery_id}/redeliver": {
      "post": {
        "operationId": "redeliverWebhook",
        "summary": "Webhook を再送する",
        "tags": [
          "Webhook 配信"
        ],
        "description": "delivery_id で指定した既存の Webhook 通知の再送を依頼します。",
        "x-required-scope": "webhooks:write",
        "parameters": [
          {
            "name": "delivery_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicWebhookDelivery"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/uploads/{upload_id}/content": {
      "put": {
        "operationId": "uploadContent",
        "summary": "ファイルの中身をアップロードする",
        "tags": [
          "アップロード"
        ],
        "description": "発行済みのアップロード先に application/octet-stream でファイル本体を送信します。成功後に completeUpload を呼び出します。",
        "x-required-scope": "assets:write",
        "parameters": [
          {
            "name": "upload_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicUploaded"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/workflow": {
      "get": {
        "operationId": "getStudioWorkflow",
        "summary": "スタジオ制作データを取得",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "作品の脚本・エピソード・デザイン・シーン・アセット・テイク・カット選択と最新 revision をまとめて取得します。",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioWorkflow"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/workflow/commands": {
      "post": {
        "operationId": "executeStudioCommand",
        "deprecated": true,
        "summary": "スタジオ制作を編集",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "脚本・シーン・デザイン・テイク選択などを編集します。operation を選び、対応する input と最新 revision を送信します。",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/script/analyses": {
      "post": {
        "operationId": "analyzeStudioScript",
        "summary": "スタジオの脚本を分析",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "作品の脚本を分析して制作構造を抽出します。script_text を指定すると更新後に分析し、省略時は保存済み脚本を使います。getJob で進捗を確認します。",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioAnalysis"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/cut/exports": {
      "post": {
        "operationId": "exportStudioCut",
        "deprecated": true,
        "summary": "スタジオのカットを書き出す",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "選択した動画をエピソード・シーン順に結合します。selections でテイク、allow_partial で未作成シーンの省略を指定します。getJob で確認します。",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioCutExport"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/storyboard/videos": {
      "post": {
        "operationId": "generateStudioVideo",
        "deprecated": true,
        "summary": "絵コンテのシーン動画を生成",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "scene_id の動画を指定モデル・長さ・解像度で生成します。anchor_asset_id で開始画像を指定できます。getJob で確認します。",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioVideo"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/designs/images": {
      "post": {
        "operationId": "generateStudioImage",
        "deprecated": true,
        "summary": "キャラクター・背景・小道具・グリッドの画像を生成",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "design_id に1〜4枚の画像を生成します。プロンプト・参照画像と基本画像またはバリアント枠を指定し、getJob で確認します。",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioImage"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/script/builds": {
      "post": {
        "operationId": "buildStudioScript",
        "summary": "脚本から制作全体を構成",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "検証済みの script_asset_ids と revision で脚本・参照項目・絵コンテを構成します。full_rebuild は既存の構成を置き換えます。画像と動画は別途生成します。 Studioと同じ料金で、報告された実際の入力・出力トークンを精算します。リクエストごとのクレジット上限は指定しません。 GET /jobs/{job_id} → output_asset_ids.",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioBuild"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/library": {
      "get": {
        "operationId": "listStudioLibrary",
        "summary": "共有ライブラリ素材を取得",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "作品に取り込める資料を取得します。scope=personal は個人ライブラリ、既定の scope=studio は共有ライブラリです。",
        "x-required-scope": "assets:read",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "schema": {
              "type": "string",
              "enum": [
                "studio",
                "personal"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioLibrary"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/imports": {
      "post": {
        "operationId": "importStudioAsset",
        "summary": "素材を作品に取り込む",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "asset_id の個人・共有資料を作品のコピーとして取り込みます。元資料の変更や削除はコピーに影響しません。",
        "x-required-scope": "assets:write",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioImport"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicAsset"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/script/drafts": {
      "post": {
        "operationId": "draftStudioScript",
        "summary": "脚本の下書きを生成",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "instructions、任意の source_text、revision、max_output_tokens を送信します。既存の脚本を上書きせず新規資料として保存します。 Studioと同じ料金で、報告された実際の入力・出力トークンを精算します。リクエストごとのクレジット上限は指定しません。 GET /jobs/{job_id} → output_asset_ids.",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioDraft"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/jobs/{job_id}/build": {
      "get": {
        "operationId": "getStudioBuildProgress",
        "summary": "自動構成の進行状況と資料を取得",
        "tags": [
          "ワークフロー機能"
        ],
        "description": "脚本の自動構成ジョブの段階・進行メッセージ・元資料・処理用テキストを取得します。",
        "x-required-scope": "jobs:read",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioBuildProgress"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/characters": {
      "get": {
        "operationId": "listCharacters",
        "summary": "キャラクター · 取得 (list)",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "キャラクター · 取得 (list). GET /api/v1/works/{work_id}/characters. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicReferencePage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createCharacter",
        "summary": "キャラクター · 登録",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "キャラクター · 登録. POST /api/v1/works/{work_id}/characters. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createCharacterInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/characters/{reference_id}": {
      "get": {
        "operationId": "getCharacter",
        "summary": "キャラクター · 取得",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "キャラクター · 取得. GET /api/v1/works/{work_id}/characters/{reference_id}. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicReference"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "patch": {
        "operationId": "updateCharacter",
        "summary": "キャラクター · 更新",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "キャラクター · 更新. PATCH /api/v1/works/{work_id}/characters/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateCharacterInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "deleteCharacter",
        "summary": "キャラクター · 削除",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "キャラクター · 削除. DELETE /api/v1/works/{work_id}/characters/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/deleteCharacterInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/characters/{reference_id}/primary-image": {
      "put": {
        "operationId": "setCharacterImage",
        "summary": "キャラクター · 参照画像を設定",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "キャラクター · 参照画像を設定. PUT /api/v1/works/{work_id}/characters/{reference_id}/primary-image. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/setCharacterImageInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/characters/{reference_id}/image-generations": {
      "post": {
        "operationId": "generateCharacterImage",
        "summary": "キャラクター · 参照画像を生成",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "キャラクター · 参照画像を生成. POST /api/v1/works/{work_id}/characters/{reference_id}/image-generations. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/generateCharacterImageInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/scenes/{scene_id}/references/characters/{reference_id}": {
      "put": {
        "operationId": "attachSceneCharacter",
        "summary": "キャラクター · シーンに関連付け",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "キャラクター · シーンに関連付け. PUT /api/v1/works/{work_id}/scenes/{scene_id}/references/characters/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/attachSceneCharacterInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "detachSceneCharacter",
        "summary": "キャラクター · シーンから解除",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "キャラクター · シーンから解除. DELETE /api/v1/works/{work_id}/scenes/{scene_id}/references/characters/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/detachSceneCharacterInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/background-scenes": {
      "get": {
        "operationId": "listBackgroundScenes",
        "summary": "背景シーン · 取得 (list)",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "背景シーン · 取得 (list). GET /api/v1/works/{work_id}/background-scenes. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicReferencePage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createBackgroundScene",
        "summary": "背景シーン · 登録",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "背景シーン · 登録. POST /api/v1/works/{work_id}/background-scenes. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createBackgroundSceneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/background-scenes/{reference_id}": {
      "get": {
        "operationId": "getBackgroundScene",
        "summary": "背景シーン · 取得",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "背景シーン · 取得. GET /api/v1/works/{work_id}/background-scenes/{reference_id}. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicReference"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "patch": {
        "operationId": "updateBackgroundScene",
        "summary": "背景シーン · 更新",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "背景シーン · 更新. PATCH /api/v1/works/{work_id}/background-scenes/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateBackgroundSceneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "deleteBackgroundScene",
        "summary": "背景シーン · 削除",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "背景シーン · 削除. DELETE /api/v1/works/{work_id}/background-scenes/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/deleteBackgroundSceneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/background-scenes/{reference_id}/primary-image": {
      "put": {
        "operationId": "setBackgroundSceneImage",
        "summary": "背景シーン · 参照画像を設定",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "背景シーン · 参照画像を設定. PUT /api/v1/works/{work_id}/background-scenes/{reference_id}/primary-image. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/setBackgroundSceneImageInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/background-scenes/{reference_id}/image-generations": {
      "post": {
        "operationId": "generateBackgroundSceneImage",
        "summary": "背景シーン · 参照画像を生成",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "背景シーン · 参照画像を生成. POST /api/v1/works/{work_id}/background-scenes/{reference_id}/image-generations. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/generateBackgroundSceneImageInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/scenes/{scene_id}/references/background-scenes/{reference_id}": {
      "put": {
        "operationId": "attachSceneBackgroundScene",
        "summary": "背景シーン · シーンに関連付け",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "背景シーン · シーンに関連付け. PUT /api/v1/works/{work_id}/scenes/{scene_id}/references/background-scenes/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/attachSceneBackgroundSceneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "detachSceneBackgroundScene",
        "summary": "背景シーン · シーンから解除",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "背景シーン · シーンから解除. DELETE /api/v1/works/{work_id}/scenes/{scene_id}/references/background-scenes/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/detachSceneBackgroundSceneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/props": {
      "get": {
        "operationId": "listProps",
        "summary": "小道具 · 取得 (list)",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "小道具 · 取得 (list). GET /api/v1/works/{work_id}/props. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicReferencePage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createProp",
        "summary": "小道具 · 登録",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "小道具 · 登録. POST /api/v1/works/{work_id}/props. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createPropInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/props/{reference_id}": {
      "get": {
        "operationId": "getProp",
        "summary": "小道具 · 取得",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "小道具 · 取得. GET /api/v1/works/{work_id}/props/{reference_id}. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicReference"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "patch": {
        "operationId": "updateProp",
        "summary": "小道具 · 更新",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "小道具 · 更新. PATCH /api/v1/works/{work_id}/props/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updatePropInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "deleteProp",
        "summary": "小道具 · 削除",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "小道具 · 削除. DELETE /api/v1/works/{work_id}/props/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/deletePropInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/props/{reference_id}/primary-image": {
      "put": {
        "operationId": "setPropImage",
        "summary": "小道具 · 参照画像を設定",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "小道具 · 参照画像を設定. PUT /api/v1/works/{work_id}/props/{reference_id}/primary-image. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/setPropImageInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/props/{reference_id}/image-generations": {
      "post": {
        "operationId": "generatePropImage",
        "summary": "小道具 · 参照画像を生成",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "小道具 · 参照画像を生成. POST /api/v1/works/{work_id}/props/{reference_id}/image-generations. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/generatePropImageInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/scenes/{scene_id}/references/props/{reference_id}": {
      "put": {
        "operationId": "attachSceneProp",
        "summary": "小道具 · シーンに関連付け",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "小道具 · シーンに関連付け. PUT /api/v1/works/{work_id}/scenes/{scene_id}/references/props/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/attachScenePropInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "detachSceneProp",
        "summary": "小道具 · シーンから解除",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "小道具 · シーンから解除. DELETE /api/v1/works/{work_id}/scenes/{scene_id}/references/props/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/detachScenePropInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/grids": {
      "get": {
        "operationId": "listGrids",
        "summary": "グリッド · 取得 (list)",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "グリッド · 取得 (list). GET /api/v1/works/{work_id}/grids. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicReferencePage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createGrid",
        "summary": "グリッド · 登録",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "グリッド · 登録. POST /api/v1/works/{work_id}/grids. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createGridInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/grids/{reference_id}": {
      "get": {
        "operationId": "getGrid",
        "summary": "グリッド · 取得",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "グリッド · 取得. GET /api/v1/works/{work_id}/grids/{reference_id}. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicReference"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "patch": {
        "operationId": "updateGrid",
        "summary": "グリッド · 更新",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "グリッド · 更新. PATCH /api/v1/works/{work_id}/grids/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateGridInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "deleteGrid",
        "summary": "グリッド · 削除",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "グリッド · 削除. DELETE /api/v1/works/{work_id}/grids/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/deleteGridInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/grids/{reference_id}/primary-image": {
      "put": {
        "operationId": "setGridImage",
        "summary": "グリッド · 参照画像を設定",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "グリッド · 参照画像を設定. PUT /api/v1/works/{work_id}/grids/{reference_id}/primary-image. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/setGridImageInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/grids/{reference_id}/image-generations": {
      "post": {
        "operationId": "generateGridImage",
        "summary": "グリッド · 参照画像を生成",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "グリッド · 参照画像を生成. POST /api/v1/works/{work_id}/grids/{reference_id}/image-generations. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/generateGridImageInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/scenes/{scene_id}/references/grids/{reference_id}": {
      "put": {
        "operationId": "attachSceneGrid",
        "summary": "グリッド · シーンに関連付け",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "グリッド · シーンに関連付け. PUT /api/v1/works/{work_id}/scenes/{scene_id}/references/grids/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/attachSceneGridInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "detachSceneGrid",
        "summary": "グリッド · シーンから解除",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "グリッド · シーンから解除. DELETE /api/v1/works/{work_id}/scenes/{scene_id}/references/grids/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/detachSceneGridInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/episodes": {
      "get": {
        "operationId": "listEpisodes",
        "summary": "エピソード · 取得 (list)",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "エピソード · 取得 (list). GET /api/v1/works/{work_id}/episodes. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicEpisodePage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createEpisode",
        "summary": "エピソードを作成",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "エピソードを作成. POST /api/v1/works/{work_id}/episodes. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createEpisodeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/episodes/{episode_id}": {
      "get": {
        "operationId": "getEpisode",
        "summary": "エピソード · 取得",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "エピソード · 取得. GET /api/v1/works/{work_id}/episodes/{episode_id}. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "episode_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicEpisode"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "patch": {
        "operationId": "updateEpisode",
        "summary": "エピソード · 更新",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "エピソード · 更新. PATCH /api/v1/works/{work_id}/episodes/{episode_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "episode_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateEpisodeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "deleteEpisode",
        "summary": "エピソード · 削除",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "エピソード · 削除. DELETE /api/v1/works/{work_id}/episodes/{episode_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "episode_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/deleteEpisodeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/episodes/{episode_id}/scenes": {
      "get": {
        "operationId": "listScenes",
        "summary": "シーン · 取得 (list)",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "シーン · 取得 (list). GET /api/v1/works/{work_id}/episodes/{episode_id}/scenes. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "episode_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicScenePage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createScene",
        "summary": "シーンを作成",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "シーンを作成. POST /api/v1/works/{work_id}/episodes/{episode_id}/scenes. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "episode_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createSceneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/episodes/{episode_id}/scenes/{scene_id}": {
      "get": {
        "operationId": "getScene",
        "summary": "シーン · 取得",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "シーン · 取得. GET /api/v1/works/{work_id}/episodes/{episode_id}/scenes/{scene_id}. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "episode_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicScene"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "patch": {
        "operationId": "updateScene",
        "summary": "シーン · 更新",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "シーン · 更新. PATCH /api/v1/works/{work_id}/episodes/{episode_id}/scenes/{scene_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "episode_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateSceneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/archive-imports": {
      "post": {
        "operationId": "createArchiveImport",
        "summary": "ZIP資料の取り込み",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "ZIP資料の取り込み. POST /api/v1/works/{work_id}/archive-imports. Use a verified ZIP asset_id and current revision. Preserves the archive and uses the same name-based material update rules as Studio. Check imported, failed and asset_ids on completion. Creation requires jobs:create, assets:read, assets:write and projects:write. Idempotency-Key; GET /api/v1/works/{work_id}/archive-imports/{import_id}",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createArchiveImportInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicArchiveImport"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/archive-imports/{import_id}": {
      "get": {
        "operationId": "getArchiveImport",
        "summary": "ZIP取り込み状況の取得",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "ZIP取り込み状況の取得. GET /api/v1/works/{work_id}/archive-imports/{import_id}. Use a verified ZIP asset_id and current revision. Preserves the archive and uses the same name-based material update rules as Studio. Check imported, failed and asset_ids on completion. Creation requires jobs:create, assets:read, assets:write and projects:write. jobs:read",
        "x-required-scope": "jobs:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "import_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicArchiveImport"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/uploads": {
      "post": {
        "operationId": "createWorkUploads",
        "summary": "ファイル一括アップロードの準備",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "ファイル一括アップロードの準備. POST /api/v1/works/{work_id}/uploads. Idempotency-Key + files (1–20) → PUT upload_url → POST /api/v1/uploads/{upload_id}/complete",
        "x-required-scope": "assets:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createWorkUploadsInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicUploadBatch"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/scenes/{scene_id}": {
      "delete": {
        "operationId": "deleteScene",
        "summary": "シーン · 削除",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "シーン · 削除. DELETE /api/v1/works/{work_id}/scenes/{scene_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/deleteSceneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/episodes/{episode_id}/scene-order": {
      "put": {
        "operationId": "reorderScenes",
        "summary": "シーンを並べ替え",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "シーンを並べ替え. PUT /api/v1/works/{work_id}/episodes/{episode_id}/scene-order. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "episode_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/reorderScenesInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/script": {
      "put": {
        "operationId": "saveScript",
        "summary": "脚本を保存",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "脚本を保存. PUT /api/v1/works/{work_id}/script. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/saveScriptInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/scenes/{scene_id}/video-generations": {
      "post": {
        "operationId": "generateSceneVideo",
        "summary": "シーン動画を生成",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "シーン動画を生成. POST /api/v1/works/{work_id}/scenes/{scene_id}/video-generations. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/generateSceneVideoInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/scenes/{scene_id}/selected-take": {
      "put": {
        "operationId": "selectSceneTake",
        "summary": "最終テイクを選択",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "最終テイクを選択. PUT /api/v1/works/{work_id}/scenes/{scene_id}/selected-take. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/selectSceneTakeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/exports": {
      "post": {
        "operationId": "exportWork",
        "summary": "最終動画を書き出す",
        "tags": [
          "プロジェクト・資料"
        ],
        "description": "最終動画を書き出す. POST /api/v1/works/{work_id}/exports. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "同じ Idempotency-Key とリクエスト本文で再試行してください。",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/exportWorkInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "成功",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "変更可能な資料のバージョン。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "推奨ポーリング間隔（秒）。"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/openapi.json": {
      "get": {
        "operationId": "openapiDocument",
        "summary": "API 仕様をダウンロードする",
        "description": "API パス・リクエスト項目・レスポンス構造を含む OpenAPI 仕様をダウンロードします。",
        "tags": [
          "仕様書"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OpenAPI 仕様書",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/downloads/{asset_id}": {
      "get": {
        "operationId": "downloadAsset",
        "summary": "完成したファイルをダウンロードする",
        "tags": [
          "アセット・結果"
        ],
        "security": [],
        "description": "getAsset が返す署名付き download_url 全体を使ってファイルを取得します。有効期限は5分です。",
        "parameters": [
          {
            "name": "asset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expires",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ファイルのバイト列",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    }
  },
  "openapi": "3.1.0",
  "info": {
    "title": "FECINE Open API",
    "version": "1.1.0",
    "description": "FECINE 制作ワークフロー API。ログインなしで閲覧でき、FECINE API Key で実行します。GET /capabilities で利用可能な機能を確認できます。Live はクレジットを使用し、サンドボックスはテスト結果を返します。POST の再試行には同じ Idempotency-Key を使用します。この仕様は実際のリクエスト・レスポンス契約から生成されます。"
  },
  "servers": [
    {
      "url": "/",
      "description": "現在の FECINE サーバー"
    }
  ],
  "security": [
    {
      "PartnerApiKey": []
    }
  ],
  "components": {
    "responses": {
      "ApiError": {
        "description": "2xx が返ればリクエストは受け付けられています。201 は新しく作成されたこと、202 は「受け付けて処理中」という意味で、まだ結果はありません。202 のときはジョブの状態を照会して完了を確認してください。\n成功レスポンスには request_id と data が入ります。例外はファイルのダウンロードと API 仕様の応答だけです。\n失敗した場合は、どのエンドポイントも同じ形の error を返します。プログラムの分岐には error.code を使い、message は原因と対処を人が読むための文章です。\n送り直してよいかは retryable で判断します。true のときだけ自動再試行し、retry_after_seconds または Retry-After の秒数だけ待ってから送ってください。POST を再送するときは、最初と同じ Idempotency-Key と同じ本文を使うと二重課金や二重生成を防げます。\n知らない error.code が来たら、HTTP ステータスと retryable だけで処理して問題ありません。問い合わせの際は request_id をお知らせください。ジョブ受付後に起きた失敗は、このレスポンスではなくジョブの状態と結果で確認できます。",
        "headers": {
          "X-Request-Id": {
            "description": "Request identifier for support.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          "Retry-After": {
            "description": "Optional retry delay in seconds; check error.retryable.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "request_id": "11111111-1111-4111-8111-111111111111",
              "error": {
                "code": "INVALID_REQUEST",
                "message": "Invalid input. Check the required fields, types and values.",
                "retryable": false
              }
            }
          }
        },
        "x-error-codes": [
          {
            "code": "INVALID_REFERENCE",
            "status": "422",
            "description": "A selected reference is unavailable or does not belong to this project. Select a ready image from this project."
          },
          {
            "code": "MODEL_UNAVAILABLE",
            "status": "422",
            "description": "The selected model is unavailable. Refresh the model list and select another model."
          },
          {
            "code": "MODEL_POLICY_REQUIRED",
            "status": "503",
            "description": "No default model policy is configured. Specify a model or ask the administrator to configure the task policy."
          },
          {
            "code": "BUILD_REPLAY_CONFLICT",
            "status": "409",
            "description": "The build inputs changed. Review the saved build before continuing."
          },
          {
            "code": "INVALID_REQUEST",
            "status": "400,422",
            "description": "Invalid input. Check the required fields, types and values."
          },
          {
            "code": "INVALID_API_KEY",
            "status": "401",
            "description": "Invalid credentials or download signature. Check the API key or obtain a new download URL."
          },
          {
            "code": "INSUFFICIENT_SCOPE",
            "status": "403",
            "description": "Permission denied. Check the key scopes and project access."
          },
          {
            "code": "PARTNER_BLOCKED",
            "status": "403",
            "description": "Account blocked. Contact support."
          },
          {
            "code": "PARTNER_PAUSED",
            "status": "403",
            "description": "Account paused. Ask the administrator to resume access."
          },
          {
            "code": "RESOURCE_NOT_FOUND",
            "status": "404",
            "description": "Resource unavailable. Check its ID and access permissions."
          },
          {
            "code": "METHOD_NOT_ALLOWED",
            "status": "405",
            "description": "Unsupported HTTP method. Use the documented method."
          },
          {
            "code": "REQUEST_TIMEOUT",
            "status": "408",
            "description": "Request body timed out. Check the connection and upload size."
          },
          {
            "code": "IDEMPOTENCY_KEY_REQUIRED",
            "status": "400",
            "description": "Provide a valid Idempotency-Key header."
          },
          {
            "code": "IDEMPOTENCY_CONFLICT",
            "status": "409",
            "description": "This Idempotency-Key belongs to a different request. Reuse it only with the original request."
          },
          {
            "code": "IDEMPOTENCY_KEY_EXPIRED",
            "status": "409",
            "description": "Idempotency record expired. Check the original result before starting a new operation."
          },
          {
            "code": "PRECONDITION_FAILED",
            "status": "412",
            "description": "Provide the latest quoted ETag in If-Match."
          },
          {
            "code": "REVISION_CONFLICT",
            "status": "409",
            "description": "Resource changed. Read the latest revision before updating."
          },
          {
            "code": "RESOURCE_CONFLICT",
            "status": "409",
            "description": "Resource conflicts with existing data. Review the current resource."
          },
          {
            "code": "INVALID_TRANSITION",
            "status": "409",
            "description": "Action is unavailable in the current state. Read the latest state."
          },
          {
            "code": "RUN_IN_PROGRESS",
            "status": "409",
            "description": "A run is in progress. Check its status before starting another."
          },
          {
            "code": "JOB_RUNNING",
            "status": "409",
            "description": "A job is running. Wait for completion before editing."
          },
          {
            "code": "PLAN_EXPIRED",
            "status": "409",
            "description": "Plan expired. Create a new plan and review its quote."
          },
          {
            "code": "INSUFFICIENT_CREDITS",
            "status": "402",
            "description": "Insufficient credits. Check the balance and required credits."
          },
          {
            "code": "BUDGET_EXCEEDED",
            "status": "409,429",
            "description": "Budget limit exceeded. Review usage and the configured budget."
          },
          {
            "code": "RATE_LIMITED",
            "status": "429",
            "description": "Request rate exceeded. Follow retryable and Retry-After before retrying."
          },
          {
            "code": "CAPACITY_EXCEEDED",
            "status": "429",
            "description": "Capacity limit exceeded. Reduce the workload or wait for active work to finish."
          },
          {
            "code": "PAYLOAD_TOO_LARGE",
            "status": "413",
            "description": "Request body too large. Reduce it to the documented limit."
          },
          {
            "code": "UNSUPPORTED_MEDIA_TYPE",
            "status": "415",
            "description": "Unsupported content type or encoding. Use the documented Content-Type without Content-Encoding."
          },
          {
            "code": "UPLOAD_TOO_LARGE",
            "status": "422",
            "description": "Uploaded content exceeds its processing limit. Reduce the file size."
          },
          {
            "code": "UPLOAD_NOT_VERIFIED",
            "status": "422",
            "description": "Upload is incomplete, expired or invalid. Check the upload and verification steps."
          },
          {
            "code": "ASSET_KIND_MISMATCH",
            "status": "422",
            "description": "Asset type does not match the operation. Select a compatible asset."
          },
          {
            "code": "SELECTED_IMAGE_REQUIRED",
            "status": "422",
            "description": "Select a valid image before generating video."
          },
          {
            "code": "SELECTED_VIDEO_REQUIRED",
            "status": "422",
            "description": "Select valid videos for the requested shots before assembly."
          },
          {
            "code": "REFERENCE_LIMIT_EXCEEDED",
            "status": "422",
            "description": "Too many reference assets. Reduce them to the model limit."
          },
          {
            "code": "REFERENCE_IMAGE_REQUIRED",
            "status": "422",
            "description": "This model requires a reference image. Add an image or select a text-to-image model."
          },
          {
            "code": "INVALID_GENERATION_OPTIONS",
            "status": "422",
            "description": "Generation options are invalid. Check the model capabilities."
          },
          {
            "code": "PROMPT_REQUIRED",
            "status": "422",
            "description": "Provide a generation prompt."
          },
          {
            "code": "SCRIPT_TEXT_REQUIRED",
            "status": "422",
            "description": "Provide script text before starting this operation."
          },
          {
            "code": "SCENES_REQUIRED",
            "status": "422",
            "description": "Create scenes before starting this operation."
          },
          {
            "code": "VARIANT_NAME_REQUIRED",
            "status": "422",
            "description": "Provide a variant name."
          },
          {
            "code": "EPISODE_ALREADY_STRUCTURED",
            "status": "409",
            "description": "Episode already has shots. Review its existing structure."
          },
          {
            "code": "ONE_SCRIPT_PER_PROJECT",
            "status": "409",
            "description": "This project supports one script. Use the existing script."
          },
          {
            "code": "MULTIPLE_SCRIPTS_REQUIRE_REVIEW",
            "status": "409",
            "description": "Multiple scripts need review before continuing."
          },
          {
            "code": "NATIVE_CONTENT_ALREADY_EXISTS",
            "status": "409",
            "description": "Studio content already exists. Review it before continuing."
          },
          {
            "code": "LIVE_PROJECT_REQUIRED",
            "status": "409",
            "description": "This operation requires a live project."
          },
          {
            "code": "STUDIO_MIGRATION_REQUIRED",
            "status": "409",
            "description": "Project needs Studio migration. Contact support."
          },
          {
            "code": "UNSUPPORTED_CAPABILITY",
            "status": "422",
            "description": "Unsupported operation or profile. Check GET /capabilities."
          },
          {
            "code": "CAPABILITY_UNAVAILABLE",
            "status": "503",
            "description": "Capability currently unavailable. Check GET /capabilities."
          },
          {
            "code": "API_NOT_ACCEPTING",
            "status": "503",
            "description": "New requests are paused. Check service availability."
          },
          {
            "code": "DEPENDENCY_UNAVAILABLE",
            "status": "503",
            "description": "A required service is unavailable. Follow the retry guidance or contact support."
          },
          {
            "code": "PRICING_UNAVAILABLE",
            "status": "503",
            "description": "Pricing unavailable. A valid quote is required to proceed."
          },
          {
            "code": "MEDIA_TOOLS_UNAVAILABLE",
            "status": "503",
            "description": "Media processing unavailable. Contact support."
          },
          {
            "code": "STORAGE_READ_FAILED",
            "status": "503",
            "description": "Could not read the stored asset. Contact support with request_id."
          },
          {
            "code": "STORAGE_WRITE_FAILED",
            "status": "503",
            "description": "Could not save the asset. Check the result before retrying."
          },
          {
            "code": "INTERNAL_ERROR",
            "status": "500",
            "description": "Internal error. Follow retry guidance; include request_id when contacting support."
          },
          {
            "code": "RESPONSE_CONTRACT_VIOLATION",
            "status": "500",
            "description": "Server response validation failed. Contact support with request_id."
          },
          {
            "code": "INVALID_EXECUTION_CONTEXT",
            "status": "500",
            "description": "Execution context is invalid. Contact support."
          },
          {
            "code": "RETRY_TRANSACTION",
            "status": "503",
            "description": "Transaction could not complete. Follow the response retry guidance."
          },
          {
            "code": "CLAIM_LOST",
            "status": "409",
            "description": "Execution ownership changed. Check the current job state."
          },
          {
            "code": "PROVIDER_TIMEOUT",
            "status": "504",
            "description": "Generation service timed out. Check the existing job before submitting again."
          },
          {
            "code": "PROVIDER_TERMINAL_FAILURE",
            "status": "422",
            "description": "Generation failed. Review the job result and inputs."
          },
          {
            "code": "PROVIDER_RESULT_UNAVAILABLE",
            "status": "502",
            "description": "Generation result unavailable. Check the existing job and recovery options."
          },
          {
            "code": "INVALID_RESULT",
            "status": "422,503",
            "description": "Result failed validation. Review the job or contact support."
          },
          {
            "code": "RESULT_TOO_LARGE",
            "status": "422",
            "description": "Result exceeds the processing limit. Reduce the requested output."
          },
          {
            "code": "EXPORT_TOO_LARGE",
            "status": "422",
            "description": "Export exceeds the size limit. Reduce the export selection."
          },
          {
            "code": "RECOVERY_BACKOFF",
            "status": "409",
            "description": "Existing result recovery is delayed. Check again later; do not resubmit generation."
          },
          {
            "code": "VIDEO_RECOVERY_REVIEW_REQUIRED",
            "status": "503",
            "description": "The original video task needs scheduled recovery or operator review. Do not resubmit generation."
          },
          {
            "code": "RESULT_RECOVERY_REQUIRED",
            "status": "409,503",
            "description": "Existing result needs recovery. Check the run recovery options before resubmitting."
          },
          {
            "code": "RESULT_NOT_RECOVERABLE",
            "status": "409",
            "description": "Result cannot be recovered through this action. Review the run or contact support."
          },
          {
            "code": "RECOVERY_CAPACITY_EXCEEDED",
            "status": "409",
            "description": "Recovery limit reached. Contact support before further recovery attempts."
          },
          {
            "code": "USAGE_RECOVERY_REQUIRED",
            "status": "503",
            "description": "Usage needs reconciliation. Contact support; do not resubmit generation blindly."
          }
        ]
      }
    },
    "securitySchemes": {
      "PartnerApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "FECINE API Key",
        "description": "fec_live_* または fec_test_* の FECINE キーを入力してください。"
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable error identifier. See components.responses.ApiError.x-error-codes; handle unknown codes safely."
              },
              "message": {
                "type": "string",
                "description": "Human-readable cause and action. Use code, not message, for program logic."
              },
              "retryable": {
                "type": "boolean",
                "description": "Whether automatic retry is allowed. Do not infer this from the HTTP status alone."
              },
              "retry_after_seconds": {
                "type": "integer",
                "minimum": 1,
                "description": "Wait at least this many seconds before an allowed retry."
              }
            },
            "required": [
              "code",
              "message",
              "retryable"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "request_id",
          "error"
        ],
        "additionalProperties": false
      },
      "Money": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "micro_units": {
            "type": "string",
            "pattern": "^[0-9]+$"
          }
        },
        "required": [
          "currency",
          "micro_units"
        ],
        "additionalProperties": false
      },
      "ProjectCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "client_reference": {
            "type": "string",
            "maxLength": 128
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "ProjectPatch": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          }
        },
        "additionalProperties": false,
        "description": "少なくとも1つのフィールドが必要です。"
      },
      "Project": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "revision",
          "state",
          "created_at",
          "client_reference"
        ],
        "additionalProperties": false
      },
      "ResourceInput": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "script"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "data": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 900000
                  },
                  "source_asset_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "language": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 16
                  }
                },
                "required": [
                  "language"
                ],
                "additionalProperties": false,
                "description": "text と source_asset_id のどちらか一方だけを指定してください。"
              }
            },
            "required": [
              "kind",
              "name",
              "data"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "character"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "data": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "reference_asset_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 8,
                    "default": []
                  }
                },
                "required": [
                  "description"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "kind",
              "name",
              "data"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "scene"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "data": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "reference_asset_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 8,
                    "default": []
                  }
                },
                "required": [
                  "description"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "kind",
              "name",
              "data"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "prop"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "data": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "reference_asset_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 8,
                    "default": []
                  }
                },
                "required": [
                  "description"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "kind",
              "name",
              "data"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "episode"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "data": {
                "type": "object",
                "properties": {
                  "script_resource_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "sequence": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "raw_content": {
                    "type": "string",
                    "maxLength": 20000
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4000
                  }
                },
                "required": [
                  "script_resource_id",
                  "sequence"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "kind",
              "name",
              "data"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "shot"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "data": {
                "type": "object",
                "properties": {
                  "episode_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "scene_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "character_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 8,
                    "default": []
                  },
                  "prop_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 8,
                    "default": []
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "video_prompt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sequence": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "duration_seconds": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 60
                  },
                  "selected_image_asset_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "selected_video_asset_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "episode_id",
                  "description",
                  "duration_seconds"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "kind",
              "name",
              "data"
            ],
            "additionalProperties": false
          }
        ]
      },
      "Resource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "content": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "script"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 900000
                      },
                      "source_asset_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "language": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 16
                      }
                    },
                    "required": [
                      "language"
                    ],
                    "additionalProperties": false,
                    "description": "text と source_asset_id のどちらか一方だけを指定してください。"
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "character"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "reference_asset_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      }
                    },
                    "required": [
                      "description"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "scene"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "reference_asset_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      }
                    },
                    "required": [
                      "description"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "prop"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "reference_asset_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      }
                    },
                    "required": [
                      "description"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "episode"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "script_resource_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "raw_content": {
                        "type": "string",
                        "maxLength": 20000
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      }
                    },
                    "required": [
                      "script_resource_id",
                      "sequence"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "shot"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "episode_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "scene_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "character_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      },
                      "prop_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "video_prompt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 4000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "duration_seconds": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 60
                      },
                      "selected_image_asset_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "selected_video_asset_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "episode_id",
                      "description",
                      "duration_seconds"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "project_id",
          "revision",
          "content",
          "created_at"
        ],
        "additionalProperties": false
      },
      "Capability": {
        "type": "object",
        "properties": {
          "studio_workflow": {
            "type": "object",
            "properties": {
              "equivalent": {
                "type": "boolean"
              },
              "stages": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "script",
                    "designs",
                    "storyboard",
                    "cut"
                  ]
                }
              },
              "project_access": {
                "type": "string",
                "enum": [
                  "read_only",
                  "read_write",
                  "mixed"
                ]
              },
              "gaps": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "operations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "path",
                    "enabled"
                  ],
                  "additionalProperties": false
                },
                "default": []
              },
              "commands": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "default": []
              },
              "image_models": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "aspect_ratios": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "image_sizes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "max_reference_images": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "max_variants": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    }
                  },
                  "required": [
                    "id",
                    "enabled",
                    "aspect_ratios",
                    "image_sizes",
                    "max_reference_images",
                    "max_variants"
                  ],
                  "additionalProperties": false
                },
                "default": []
              }
            },
            "required": [
              "equivalent",
              "stages",
              "project_access",
              "gaps"
            ],
            "additionalProperties": false
          },
          "template_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "template_version": {
            "type": "integer",
            "minimum": 1
          },
          "enabled": {
            "type": "boolean"
          },
          "stages": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "output_profiles": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "unsupported_reasons": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          "max_shots": {
            "type": "integer",
            "minimum": 1
          },
          "max_episode_seconds": {
            "type": "integer",
            "minimum": 1
          },
          "upload_mime_types": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "max_upload_bytes": {
            "type": "integer",
            "minimum": 1
          },
          "upload_limits": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "exclusiveMinimum": 0
            }
          },
          "job_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "analyze_script",
                "generate_image",
                "generate_video",
                "assemble_video"
              ]
            }
          },
          "operations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                }
              },
              "required": [
                "type",
                "enabled"
              ],
              "additionalProperties": false
            }
          },
          "image_size": {
            "type": "string"
          },
          "max_reference_images": {
            "type": "integer"
          }
        },
        "required": [
          "studio_workflow",
          "template_id",
          "template_version",
          "enabled",
          "stages",
          "output_profiles",
          "unsupported_reasons",
          "max_shots",
          "max_episode_seconds",
          "upload_mime_types",
          "max_upload_bytes"
        ],
        "additionalProperties": false
      },
      "PlanInput": {
        "type": "object",
        "properties": {
          "template_id": {
            "type": "string",
            "const": "episode-production"
          },
          "template_version": {
            "type": "number",
            "const": 1
          },
          "project_revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "episode_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1,
            "maxItems": 10,
            "description": "エピソード ID は重複できません。"
          },
          "mode": {
            "type": "string",
            "enum": [
              "reviewed",
              "automatic"
            ]
          },
          "output_profile": {
            "type": "string",
            "enum": [
              "sandbox-episode-v1",
              "episode-standard-v1"
            ]
          }
        },
        "required": [
          "template_id",
          "template_version",
          "project_revision",
          "episode_ids",
          "mode",
          "output_profile"
        ],
        "additionalProperties": false
      },
      "PlannedStep": {
        "type": "object",
        "properties": {
          "stage_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "target_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "depends_on": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "requires_review": {
            "type": "boolean"
          },
          "max_cost": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "stage_key",
          "target_ids",
          "depends_on",
          "requires_review",
          "max_cost"
        ],
        "additionalProperties": false
      },
      "Plan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "project_revision": {
            "type": "integer",
            "minimum": 1
          },
          "template_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "template_version": {
            "type": "integer",
            "minimum": 1
          },
          "executable": {
            "type": "boolean"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "budget_ceiling": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "stage_key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "target_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "depends_on": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "requires_review": {
                  "type": "boolean"
                },
                "max_cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        "micro_units": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        }
                      },
                      "required": [
                        "currency",
                        "micro_units"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "stage_key",
                "target_ids",
                "depends_on",
                "requires_review",
                "max_cost"
              ],
              "additionalProperties": false
            }
          },
          "unsupported_reasons": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          }
        },
        "required": [
          "id",
          "project_id",
          "project_revision",
          "template_id",
          "template_version",
          "executable",
          "expires_at",
          "budget_ceiling",
          "steps",
          "unsupported_reasons"
        ],
        "additionalProperties": false
      },
      "RunInput": {
        "type": "object",
        "properties": {
          "plan_id": {
            "type": "string",
            "format": "uuid"
          },
          "client_reference": {
            "type": "string",
            "maxLength": 128
          }
        },
        "required": [
          "plan_id"
        ],
        "additionalProperties": false
      },
      "Run": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "plan_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "awaiting_review",
              "stopping",
              "paused",
              "needs_attention",
              "partially_succeeded",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "budget_remaining": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "micro_units": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": [
              "currency",
              "micro_units"
            ],
            "additionalProperties": false
          },
          "committed_cost": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "unresolved_cost": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "output_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "id",
          "project_id",
          "plan_id",
          "version",
          "state",
          "client_reference",
          "created_at",
          "completed_at",
          "budget_remaining",
          "committed_cost",
          "unresolved_cost",
          "output_asset_ids"
        ],
        "additionalProperties": false
      },
      "Step": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "stage_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "target_id": {
            "type": "string",
            "format": "uuid"
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "blocked",
              "ready",
              "queued",
              "running",
              "awaiting_review",
              "succeeded",
              "failed",
              "cancelled",
              "unknown"
            ]
          },
          "output_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "ordinal": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "run_id",
          "stage_key",
          "target_id",
          "job_id",
          "state",
          "output_asset_ids",
          "error_code",
          "ordinal"
        ],
        "additionalProperties": false
      },
      "RunEvent": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "sequence": {
            "type": "integer",
            "minimum": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "run.state_changed",
              "run.review_required",
              "run.result_ready",
              "run.needs_attention"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "awaiting_review",
              "stopping",
              "paused",
              "needs_attention",
              "partially_succeeded",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "step_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "event_id",
          "run_id",
          "sequence",
          "type",
          "state",
          "step_id",
          "created_at"
        ],
        "additionalProperties": false
      },
      "DecisionInput": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "approve",
              "stop",
              "resume",
              "cancel_remaining",
              "retry_result"
            ],
            "description": "retry_result resumes result polling for an accepted Studio video on the original reservation; requires step_id and expected_version. It never resubmits generation. Unconfirmed usage without a saved video task requires operator review."
          },
          "expected_version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "step_id": {
            "type": "string",
            "format": "uuid"
          },
          "selected_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 10
          }
        },
        "required": [
          "action",
          "expected_version"
        ],
        "additionalProperties": false
      },
      "JobInput": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "project_revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "target_id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "analyze_script",
              "generate_image",
              "generate_video",
              "assemble_video"
            ]
          },
          "profile_id": {
            "type": "string",
            "maxLength": 100
          },
          "client_reference": {
            "type": "string",
            "maxLength": 128
          }
        },
        "required": [
          "project_id",
          "project_revision",
          "target_id",
          "type",
          "profile_id"
        ],
        "additionalProperties": false
      },
      "Job": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "ready",
              "blocked",
              "processing",
              "awaiting_review",
              "succeeded",
              "failed",
              "cancelled",
              "needs_review"
            ]
          },
          "output_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "resource_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "skipped_scene_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "id",
          "project_id",
          "run_id",
          "state",
          "output_asset_ids",
          "error_code"
        ],
        "additionalProperties": false
      },
      "UploadInput": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[^\\\\/\\x00-\\x1f]+$"
          },
          "mime_type": {
            "type": "string",
            "enum": [
              "text/plain",
              "text/markdown",
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
              "image/png",
              "image/jpeg",
              "image/webp",
              "image/avif",
              "audio/wav",
              "application/zip"
            ]
          },
          "size_bytes": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 1073741824
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "project_id",
          "filename",
          "mime_type",
          "size_bytes",
          "sha256"
        ],
        "additionalProperties": false,
        "description": "TXT・Markdown・DOCX・PNG・JPEG・WebP・AVIF・WAV・ZIP に対応します。容量制限は Studio と共通です。GET /capabilities の upload_limits を確認してください。脚本は最大 5,000,000 文字です。ファイル名にパス区切り文字は使えません。WAV は PCM または IEEE float です。"
      },
      "UploadTicket": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "upload_url": {
            "type": "string",
            "format": "uri"
          },
          "method": {
            "type": "string",
            "enum": [
              "PUT"
            ]
          },
          "content_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "asset_id",
          "upload_url",
          "method",
          "content_type",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "Asset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "verified",
              "ready",
              "errored",
              "expired"
            ]
          },
          "mime_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "download_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "project_id",
          "state",
          "mime_type",
          "size_bytes",
          "download_url",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "RequestLog": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PATCH",
              "PUT"
            ]
          },
          "route_template": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "status_code": {
            "type": "integer",
            "minimum": 100,
            "maximum": 599
          },
          "duration_ms": {
            "type": "integer",
            "minimum": 0
          },
          "actor_kind": {
            "type": "string",
            "enum": [
              "api_key",
              "console"
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "replayed": {
            "type": "boolean"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "request_id",
          "created_at",
          "method",
          "route_template",
          "status_code",
          "duration_ms",
          "actor_kind",
          "project_id",
          "run_id",
          "job_id",
          "replayed",
          "error_code"
        ],
        "additionalProperties": false
      },
      "Usage": {
        "type": "object",
        "properties": {
          "period_start": {
            "type": "string",
            "format": "date-time"
          },
          "period_end": {
            "type": "string",
            "format": "date-time"
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "http_requests": {
            "type": "integer",
            "minimum": 0
          },
          "runs": {
            "type": "integer",
            "minimum": 0
          },
          "jobs": {
            "type": "integer",
            "minimum": 0
          },
          "reserved": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "micro_units": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": [
              "currency",
              "micro_units"
            ],
            "additionalProperties": false
          },
          "committed": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "micro_units": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": [
              "currency",
              "micro_units"
            ],
            "additionalProperties": false
          },
          "unresolved": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "remaining": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "micro_units": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": [
              "currency",
              "micro_units"
            ],
            "additionalProperties": false
          },
          "amount_basis": {
            "type": "string",
            "enum": [
              "partner_limit"
            ]
          },
          "billing_mode": {
            "type": "string",
            "enum": [
              "pilot",
              "contract"
            ]
          }
        },
        "required": [
          "period_start",
          "period_end",
          "as_of",
          "http_requests",
          "runs",
          "jobs",
          "reserved",
          "committed",
          "unresolved",
          "remaining",
          "amount_basis",
          "billing_mode"
        ],
        "additionalProperties": false
      },
      "WebhookCreate": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2000
          },
          "project_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 100
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "run.state_changed",
                "run.review_required",
                "run.result_ready",
                "run.needs_attention"
              ]
            },
            "minItems": 1,
            "maxItems": 4
          }
        },
        "required": [
          "url",
          "project_ids",
          "events"
        ],
        "additionalProperties": false
      },
      "WebhookPatch": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "run.state_changed",
                "run.review_required",
                "run.result_ready",
                "run.needs_attention"
              ]
            },
            "minItems": 1,
            "maxItems": 4
          }
        },
        "additionalProperties": false,
        "description": "少なくとも1つのフィールドが必要です。"
      },
      "WebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "project_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "run.state_changed",
                "run.review_required",
                "run.result_ready",
                "run.needs_attention"
              ]
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "verified": {
            "type": "boolean"
          },
          "secret_version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "url",
          "project_ids",
          "events",
          "enabled",
          "verified",
          "secret_version",
          "created_at"
        ],
        "additionalProperties": false
      },
      "WebhookIssued": {
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "project_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "run.state_changed",
                    "run.review_required",
                    "run.result_ready",
                    "run.needs_attention"
                  ]
                }
              },
              "enabled": {
                "type": "boolean"
              },
              "verified": {
                "type": "boolean"
              },
              "secret_version": {
                "type": "integer",
                "minimum": 1
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "url",
              "project_ids",
              "events",
              "enabled",
              "verified",
              "secret_version",
              "created_at"
            ],
            "additionalProperties": false
          },
          "signing_secret": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "required": [
          "endpoint"
        ],
        "additionalProperties": false
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "endpoint_id": {
            "type": "string",
            "format": "uuid"
          },
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "sending",
              "succeeded",
              "retrying",
              "exhausted"
            ]
          },
          "attempt": {
            "type": "integer",
            "minimum": 0
          },
          "http_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "endpoint_id",
          "event_id",
          "state",
          "attempt",
          "http_status",
          "next_attempt_at",
          "created_at"
        ],
        "additionalProperties": false
      },
      "Empty": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "CapabilityPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "studio_workflow": {
                  "type": "object",
                  "properties": {
                    "equivalent": {
                      "type": "boolean"
                    },
                    "stages": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "script",
                          "designs",
                          "storyboard",
                          "cut"
                        ]
                      }
                    },
                    "project_access": {
                      "type": "string",
                      "enum": [
                        "read_only",
                        "read_write",
                        "mixed"
                      ]
                    },
                    "gaps": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "operations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "path": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "path",
                          "enabled"
                        ],
                        "additionalProperties": false
                      },
                      "default": []
                    },
                    "commands": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "default": []
                    },
                    "image_models": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "aspect_ratios": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "image_sizes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "max_reference_images": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "max_variants": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "id",
                          "enabled",
                          "aspect_ratios",
                          "image_sizes",
                          "max_reference_images",
                          "max_variants"
                        ],
                        "additionalProperties": false
                      },
                      "default": []
                    }
                  },
                  "required": [
                    "equivalent",
                    "stages",
                    "project_access",
                    "gaps"
                  ],
                  "additionalProperties": false
                },
                "template_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "template_version": {
                  "type": "integer",
                  "minimum": 1
                },
                "enabled": {
                  "type": "boolean"
                },
                "stages": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "output_profiles": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "unsupported_reasons": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "max_shots": {
                  "type": "integer",
                  "minimum": 1
                },
                "max_episode_seconds": {
                  "type": "integer",
                  "minimum": 1
                },
                "upload_mime_types": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "max_upload_bytes": {
                  "type": "integer",
                  "minimum": 1
                },
                "upload_limits": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "job_types": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "analyze_script",
                      "generate_image",
                      "generate_video",
                      "assemble_video"
                    ]
                  }
                },
                "operations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "enabled": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "type",
                      "enabled"
                    ],
                    "additionalProperties": false
                  }
                },
                "image_size": {
                  "type": "string"
                },
                "max_reference_images": {
                  "type": "integer"
                }
              },
              "required": [
                "studio_workflow",
                "template_id",
                "template_version",
                "enabled",
                "stages",
                "output_profiles",
                "unsupported_reasons",
                "max_shots",
                "max_episode_seconds",
                "upload_mime_types",
                "max_upload_bytes"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ProjectPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "active",
                    "archived"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "client_reference": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 128
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "revision",
                "state",
                "created_at",
                "client_reference"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ResourcePage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "project_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "content": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "script"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 900000
                            },
                            "source_asset_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "language": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 16
                            }
                          },
                          "required": [
                            "language"
                          ],
                          "additionalProperties": false,
                          "description": "text と source_asset_id のどちらか一方だけを指定してください。"
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "character"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "reference_asset_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            }
                          },
                          "required": [
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "scene"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "reference_asset_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            }
                          },
                          "required": [
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "prop"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "reference_asset_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            }
                          },
                          "required": [
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "episode"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "script_resource_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "sequence": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "raw_content": {
                              "type": "string",
                              "maxLength": 20000
                            },
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            }
                          },
                          "required": [
                            "script_resource_id",
                            "sequence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "shot"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "episode_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "scene_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "character_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            },
                            "prop_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            },
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "video_prompt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 4000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sequence": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "duration_seconds": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 60
                            },
                            "selected_image_asset_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "selected_video_asset_id": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "required": [
                            "episode_id",
                            "description",
                            "duration_seconds"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "project_id",
                "revision",
                "content",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "RunPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "project_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "plan_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "version": {
                  "type": "integer",
                  "minimum": 1
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "awaiting_review",
                    "stopping",
                    "paused",
                    "needs_attention",
                    "partially_succeeded",
                    "succeeded",
                    "failed",
                    "cancelled"
                  ]
                },
                "client_reference": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 128
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "completed_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "budget_remaining": {
                  "type": "object",
                  "properties": {
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$"
                    },
                    "micro_units": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    }
                  },
                  "required": [
                    "currency",
                    "micro_units"
                  ],
                  "additionalProperties": false
                },
                "committed_cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        "micro_units": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        }
                      },
                      "required": [
                        "currency",
                        "micro_units"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unresolved_cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        "micro_units": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        }
                      },
                      "required": [
                        "currency",
                        "micro_units"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "output_asset_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              "required": [
                "id",
                "project_id",
                "plan_id",
                "version",
                "state",
                "client_reference",
                "created_at",
                "completed_at",
                "budget_remaining",
                "committed_cost",
                "unresolved_cost",
                "output_asset_ids"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "StepPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "run_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "stage_key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "target_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "job_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "blocked",
                    "ready",
                    "queued",
                    "running",
                    "awaiting_review",
                    "succeeded",
                    "failed",
                    "cancelled",
                    "unknown"
                  ]
                },
                "output_asset_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "error_code": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ordinal": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "run_id",
                "stage_key",
                "target_id",
                "job_id",
                "state",
                "output_asset_ids",
                "error_code",
                "ordinal"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "RunEventPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "event_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "run_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "sequence": {
                  "type": "integer",
                  "minimum": 1
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "run.state_changed",
                    "run.review_required",
                    "run.result_ready",
                    "run.needs_attention"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "awaiting_review",
                    "stopping",
                    "paused",
                    "needs_attention",
                    "partially_succeeded",
                    "succeeded",
                    "failed",
                    "cancelled"
                  ]
                },
                "step_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "event_id",
                "run_id",
                "sequence",
                "type",
                "state",
                "step_id",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "RequestLogPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "request_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "method": {
                  "type": "string",
                  "enum": [
                    "GET",
                    "POST",
                    "PATCH",
                    "PUT"
                  ]
                },
                "route_template": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                },
                "status_code": {
                  "type": "integer",
                  "minimum": 100,
                  "maximum": 599
                },
                "duration_ms": {
                  "type": "integer",
                  "minimum": 0
                },
                "actor_kind": {
                  "type": "string",
                  "enum": [
                    "api_key",
                    "console"
                  ]
                },
                "project_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "run_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "job_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "replayed": {
                  "type": "boolean"
                },
                "error_code": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "request_id",
                "created_at",
                "method",
                "route_template",
                "status_code",
                "duration_ms",
                "actor_kind",
                "project_id",
                "run_id",
                "job_id",
                "replayed",
                "error_code"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "WebhookEndpointPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "project_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "events": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "run.state_changed",
                      "run.review_required",
                      "run.result_ready",
                      "run.needs_attention"
                    ]
                  }
                },
                "enabled": {
                  "type": "boolean"
                },
                "verified": {
                  "type": "boolean"
                },
                "secret_version": {
                  "type": "integer",
                  "minimum": 1
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "url",
                "project_ids",
                "events",
                "enabled",
                "verified",
                "secret_version",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "WebhookDeliveryPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "endpoint_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "event_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "sending",
                    "succeeded",
                    "retrying",
                    "exhausted"
                  ]
                },
                "attempt": {
                  "type": "integer",
                  "minimum": 0
                },
                "http_status": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "next_attempt_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "endpoint_id",
                "event_id",
                "state",
                "attempt",
                "http_status",
                "next_attempt_at",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ArchiveImport": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "deferred",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "progress": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "phase": {
                    "type": "string",
                    "enum": [
                      "extracting",
                      "importing"
                    ]
                  },
                  "current": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "phase",
                  "current",
                  "total"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "imported": {
            "type": "integer",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "minimum": 0
          },
          "asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "work_id",
          "state",
          "progress",
          "imported",
          "failed",
          "asset_ids",
          "error_code"
        ],
        "additionalProperties": false
      },
      "Episode": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "title": {
            "type": "string"
          },
          "raw_content": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "number",
          "title",
          "raw_content",
          "description"
        ],
        "additionalProperties": false
      },
      "Scene": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "episode_id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "heading": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "video_prompt": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "episode_id",
          "number",
          "heading",
          "description",
          "video_prompt"
        ],
        "additionalProperties": false
      },
      "EpisodePage": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "title": {
                  "type": "string"
                },
                "raw_content": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "number",
                "title",
                "raw_content",
                "description"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "work_id",
          "revision",
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ScenePage": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "episode_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "heading": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "video_prompt": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "episode_id",
                "number",
                "heading",
                "description",
                "video_prompt"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "work_id",
          "revision",
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "Reference": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "character",
              "scene",
              "prop",
              "grid"
            ]
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "primary_asset_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "description",
          "tags",
          "primary_asset_id"
        ],
        "additionalProperties": false
      },
      "ReferencePage": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "character",
                    "scene",
                    "prop",
                    "grid"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "primary_asset_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "name",
                "description",
                "tags",
                "primary_asset_id"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "work_id",
          "revision",
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "UploadBatch": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "filename": {
                  "type": "string"
                },
                "ticket": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "asset_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "upload_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "PUT"
                      ]
                    },
                    "content_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "asset_id",
                    "upload_url",
                    "method",
                    "content_type",
                    "expires_at"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "filename",
                "ticket"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "project_id",
          "items"
        ],
        "additionalProperties": false
      },
      "listCharactersInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "getCharacterInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "createCharacterInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 8
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "name",
          "revision"
        ],
        "additionalProperties": false
      },
      "updateCharacterInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 8
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "name",
          "revision"
        ],
        "additionalProperties": false
      },
      "deleteCharacterInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "setCharacterImageInput": {
        "type": "object",
        "properties": {
          "asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "current_asset_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "asset_id",
          "current_asset_id",
          "revision"
        ],
        "additionalProperties": false
      },
      "generateCharacterImageInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "variants": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4,
            "default": 1
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "default": "image-standard"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000
          },
          "aspect_ratio": {
            "type": "string",
            "pattern": "^(auto|[1-9]\\d*:[1-9]\\d*)$"
          },
          "image_size": {
            "type": "string",
            "maxLength": 40
          },
          "quality": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "background": {
            "type": "string",
            "enum": [
              "auto",
              "opaque",
              "transparent"
            ]
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "jpeg"
            ]
          },
          "reference_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 16,
            "default": []
          },
          "slot": {
            "type": "string",
            "enum": [
              "primary",
              "variant"
            ],
            "default": "primary"
          },
          "variant_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "current_asset_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "attachSceneCharacterInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "detachSceneCharacterInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "listBackgroundScenesInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "getBackgroundSceneInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "createBackgroundSceneInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 8
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "name",
          "revision"
        ],
        "additionalProperties": false
      },
      "updateBackgroundSceneInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 8
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "name",
          "revision"
        ],
        "additionalProperties": false
      },
      "deleteBackgroundSceneInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "setBackgroundSceneImageInput": {
        "type": "object",
        "properties": {
          "asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "current_asset_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "asset_id",
          "current_asset_id",
          "revision"
        ],
        "additionalProperties": false
      },
      "generateBackgroundSceneImageInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "variants": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4,
            "default": 1
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "default": "image-standard"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000
          },
          "aspect_ratio": {
            "type": "string",
            "pattern": "^(auto|[1-9]\\d*:[1-9]\\d*)$"
          },
          "image_size": {
            "type": "string",
            "maxLength": 40
          },
          "quality": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "background": {
            "type": "string",
            "enum": [
              "auto",
              "opaque",
              "transparent"
            ]
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "jpeg"
            ]
          },
          "reference_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 16,
            "default": []
          },
          "slot": {
            "type": "string",
            "enum": [
              "primary",
              "variant"
            ],
            "default": "primary"
          },
          "variant_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "current_asset_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "attachSceneBackgroundSceneInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "detachSceneBackgroundSceneInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "listPropsInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "getPropInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "createPropInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 8
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "name",
          "revision"
        ],
        "additionalProperties": false
      },
      "updatePropInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 8
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "name",
          "revision"
        ],
        "additionalProperties": false
      },
      "deletePropInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "setPropImageInput": {
        "type": "object",
        "properties": {
          "asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "current_asset_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "asset_id",
          "current_asset_id",
          "revision"
        ],
        "additionalProperties": false
      },
      "generatePropImageInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "variants": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4,
            "default": 1
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "default": "image-standard"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000
          },
          "aspect_ratio": {
            "type": "string",
            "pattern": "^(auto|[1-9]\\d*:[1-9]\\d*)$"
          },
          "image_size": {
            "type": "string",
            "maxLength": 40
          },
          "quality": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "background": {
            "type": "string",
            "enum": [
              "auto",
              "opaque",
              "transparent"
            ]
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "jpeg"
            ]
          },
          "reference_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 16,
            "default": []
          },
          "slot": {
            "type": "string",
            "enum": [
              "primary",
              "variant"
            ],
            "default": "primary"
          },
          "variant_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "current_asset_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "attachScenePropInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "detachScenePropInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "listGridsInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "getGridInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "createGridInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 8
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "name",
          "revision"
        ],
        "additionalProperties": false
      },
      "updateGridInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 8
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "name",
          "revision"
        ],
        "additionalProperties": false
      },
      "deleteGridInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "setGridImageInput": {
        "type": "object",
        "properties": {
          "asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "current_asset_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "asset_id",
          "current_asset_id",
          "revision"
        ],
        "additionalProperties": false
      },
      "generateGridImageInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "variants": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4,
            "default": 1
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "default": "image-standard"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000
          },
          "aspect_ratio": {
            "type": "string",
            "pattern": "^(auto|[1-9]\\d*:[1-9]\\d*)$"
          },
          "image_size": {
            "type": "string",
            "maxLength": 40
          },
          "quality": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "background": {
            "type": "string",
            "enum": [
              "auto",
              "opaque",
              "transparent"
            ]
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "jpeg"
            ]
          },
          "reference_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 16,
            "default": []
          },
          "slot": {
            "type": "string",
            "enum": [
              "primary",
              "variant"
            ],
            "default": "primary"
          },
          "variant_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "current_asset_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "attachSceneGridInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "detachSceneGridInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "listEpisodesInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "getEpisodeInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "listScenesInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "getSceneInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "createArchiveImportInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "asset_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "revision",
          "asset_id"
        ],
        "additionalProperties": false
      },
      "getArchiveImportInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "createWorkUploadsInput": {
        "type": "object",
        "properties": {
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "filename": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "pattern": "^[^\\\\/\\x00-\\x1f]+$"
                },
                "mime_type": {
                  "type": "string",
                  "enum": [
                    "text/plain",
                    "text/markdown",
                    "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
                    "image/png",
                    "image/jpeg",
                    "image/webp",
                    "image/avif",
                    "audio/wav",
                    "application/zip"
                  ]
                },
                "size_bytes": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 1073741824
                },
                "sha256": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                }
              },
              "required": [
                "filename",
                "mime_type",
                "size_bytes",
                "sha256"
              ],
              "additionalProperties": false
            },
            "minItems": 1,
            "maxItems": 20
          }
        },
        "required": [
          "files"
        ],
        "additionalProperties": false
      },
      "updateEpisodeInput": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "raw_content": {
            "type": "string",
            "maxLength": 20000
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "title",
          "revision"
        ],
        "additionalProperties": false
      },
      "deleteEpisodeInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "updateSceneInput": {
        "type": "object",
        "properties": {
          "heading": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "video_prompt": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "heading",
          "revision"
        ],
        "additionalProperties": false
      },
      "deleteSceneInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "reorderScenesInput": {
        "type": "object",
        "properties": {
          "scene_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1,
            "maxItems": 500
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "scene_ids",
          "revision"
        ],
        "additionalProperties": false
      },
      "createEpisodeInput": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "raw_content": {
            "type": "string",
            "maxLength": 20000
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "title",
          "revision"
        ],
        "additionalProperties": false
      },
      "createSceneInput": {
        "type": "object",
        "properties": {
          "heading": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "video_prompt": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "heading",
          "revision"
        ],
        "additionalProperties": false
      },
      "saveScriptInput": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 5000000
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "text",
          "revision"
        ],
        "additionalProperties": false
      },
      "generateSceneVideoInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "anchor_asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "reference_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 12
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "default": "video-standard"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "duration_seconds": {
            "type": "integer",
            "minimum": 1,
            "maximum": 60
          },
          "resolution": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20
          },
          "aspect_ratio": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20
          },
          "generate_audio": {
            "type": "boolean"
          }
        },
        "required": [
          "revision",
          "duration_seconds",
          "resolution",
          "aspect_ratio"
        ],
        "additionalProperties": false
      },
      "selectSceneTakeInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "take_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "revision",
          "take_id"
        ],
        "additionalProperties": false
      },
      "exportWorkInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "allow_partial": {
            "type": "boolean",
            "default": true
          },
          "selections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scene_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "scene_id",
                "asset_id"
              ],
              "additionalProperties": false
            },
            "maxItems": 200
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "StudioBuildProgress": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "run_version": {
            "type": "integer"
          },
          "state": {
            "type": "string"
          },
          "wait_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "stage": {
            "type": [
              "string",
              "null"
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "assistant",
                    "system_note"
                  ]
                },
                "stage": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "content": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "streaming",
                    "final"
                  ]
                },
                "seq": {
                  "type": "number"
                },
                "created_at": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "role",
                "stage",
                "content",
                "status",
                "seq",
                "created_at",
                "updated_at"
              ],
              "additionalProperties": false
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "filterMode": {
                  "type": "string",
                  "enum": [
                    "prompt_index",
                    "full_text"
                  ]
                },
                "sourceText": {
                  "type": "string"
                },
                "llmText": {
                  "type": "string"
                },
                "originalChars": {
                  "type": "number"
                },
                "preparedChars": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "name",
                "filterMode",
                "sourceText",
                "llmText",
                "originalChars",
                "preparedChars"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "state",
          "stage",
          "messages",
          "sources"
        ],
        "additionalProperties": false
      },
      "StudioDraft": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "instructions": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          },
          "source_text": {
            "type": "string",
            "maxLength": 50000
          },
          "max_output_tokens": {
            "type": "integer",
            "minimum": 256,
            "maximum": 8192,
            "default": 2048
          }
        },
        "required": [
          "revision",
          "instructions"
        ],
        "additionalProperties": false
      },
      "StudioImport": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "asset_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "revision",
          "asset_id"
        ],
        "additionalProperties": false
      },
      "StudioLibrary": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "media_type": {
                  "type": "string"
                },
                "mime": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "is_current_version": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "name",
                "kind",
                "media_type",
                "mime",
                "version",
                "is_current_version"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "StudioCommand": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "design.asset.set"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "asset_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "primary",
                      "variant"
                    ]
                  },
                  "current_asset_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                },
                "required": [
                  "id",
                  "asset_id",
                  "kind",
                  "current_asset_id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "asset.delete"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "trash.restore"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity_type": {
                    "type": "string",
                    "enum": [
                      "asset",
                      "design"
                    ]
                  }
                },
                "required": [
                  "id",
                  "entity_type"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "scene.duplicate"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "project.settings.update"
              },
              "input": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 24
                    },
                    "maxItems": 8
                  },
                  "cover": {
                    "type": "string",
                    "enum": [
                      "amber",
                      "indigo",
                      "teal",
                      "rust",
                      "moss",
                      "ink",
                      "sage",
                      "bone",
                      "wine",
                      "wash",
                      "blush",
                      "void"
                    ]
                  },
                  "aspect": {
                    "type": "string",
                    "enum": [
                      "16:9",
                      "9:16",
                      "1:1",
                      "4:3",
                      "21:9"
                    ]
                  },
                  "resolution": {
                    "type": "string",
                    "enum": [
                      "480p",
                      "720p",
                      "1080p",
                      "2k"
                    ]
                  },
                  "style": {
                    "type": "string",
                    "enum": [
                      "realistic_general",
                      "realistic_urban",
                      "realistic_cinematic",
                      "2d_japanese_manga",
                      "2d_korean_urban",
                      "2d_korean",
                      "2d_otome",
                      "2d_chinese_manga",
                      "2d_classical",
                      "3d_chinese",
                      "3d_xianxia",
                      "3d_cartoon",
                      "cg_general",
                      "cg_cyberpunk",
                      "ink_gongbi",
                      "custom"
                    ]
                  },
                  "style_prompt": {
                    "type": "string",
                    "maxLength": 1000
                  }
                },
                "required": [
                  "title",
                  "tags",
                  "cover",
                  "aspect",
                  "resolution",
                  "style",
                  "style_prompt"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "project.rename"
              },
              "input": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "project.state.set"
              },
              "input": {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "active",
                      "archived"
                    ]
                  }
                },
                "required": [
                  "state"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "script.update"
              },
              "input": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "maxLength": 5000000
                  }
                },
                "required": [
                  "text"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "script.bible.update"
              },
              "input": {
                "type": "object",
                "properties": {
                  "logline": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "synopsis": {
                    "type": "string",
                    "maxLength": 4000
                  }
                },
                "required": [
                  "logline",
                  "synopsis"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "episode.save"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "number": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "raw_content": {
                    "type": "string",
                    "maxLength": 20000
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4000
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "episode.delete"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "scene.save"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "episode_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "heading": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "number": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "video_prompt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "episode_id",
                  "heading"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "scene.delete"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "scene.reorder"
              },
              "input": {
                "type": "object",
                "properties": {
                  "episode_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "scene_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "maxItems": 500
                  }
                },
                "required": [
                  "episode_id",
                  "scene_ids"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "design.save"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "character",
                      "scene",
                      "prop",
                      "grid"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "maxItems": 8
                  }
                },
                "required": [
                  "kind",
                  "name"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "design.delete"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "design.voice.set"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "asset_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "asset_id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "design.asset.detach"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "asset_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "primary",
                      "variant",
                      "voice"
                    ]
                  }
                },
                "required": [
                  "id",
                  "asset_id",
                  "kind"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "design.asset.restore"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "current_asset_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "restore_asset_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "primary",
                      "variant"
                    ]
                  }
                },
                "required": [
                  "id",
                  "current_asset_id",
                  "restore_asset_id",
                  "kind"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "design.variant.rename"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "asset_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                },
                "required": [
                  "id",
                  "asset_id",
                  "name"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "scene.design.attach"
              },
              "input": {
                "type": "object",
                "properties": {
                  "scene_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "design_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "scene_id",
                  "design_id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "scene.design.detach"
              },
              "input": {
                "type": "object",
                "properties": {
                  "scene_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "design_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "scene_id",
                  "design_id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "cut.take.select"
              },
              "input": {
                "type": "object",
                "properties": {
                  "scene_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "asset_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "scene_id",
                  "asset_id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "take.delete"
              },
              "input": {
                "type": "object",
                "properties": {
                  "scene_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "asset_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "scene_id",
                  "asset_id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          }
        ]
      },
      "StudioMutation": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "changed_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "studio_url": {
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "changed_id",
          "revision",
          "studio_url"
        ],
        "additionalProperties": false
      },
      "StudioWorkflow": {
        "type": "object",
        "properties": {
          "api_runs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string"
                },
                "completed_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "total_steps": {
                  "type": "integer",
                  "minimum": 0
                },
                "completed_steps": {
                  "type": "integer",
                  "minimum": 0
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "state",
                "created_at",
                "completed_at",
                "total_steps",
                "completed_steps",
                "error_code"
              ],
              "additionalProperties": false
            }
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "studio_url": {
            "type": "string"
          },
          "trash": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "entity_type": {
                  "type": "string",
                  "enum": [
                    "asset",
                    "design"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "deleted_at": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "entity_type",
                "name",
                "deleted_at"
              ],
              "additionalProperties": false
            }
          },
          "assets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "media_type": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "mime": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lineage_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "is_current_version": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "name",
                "kind",
                "media_type",
                "status",
                "mime",
                "lineage_id",
                "version",
                "is_current_version"
              ],
              "additionalProperties": false
            }
          },
          "settings": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "cover": {
                "type": "string"
              },
              "aspect": {
                "type": "string"
              },
              "resolution": {
                "type": "string"
              },
              "style": {
                "type": "string"
              },
              "style_prompt": {
                "type": "string"
              },
              "state": {
                "type": "string"
              }
            },
            "required": [
              "title",
              "tags",
              "cover",
              "aspect",
              "resolution",
              "style",
              "style_prompt",
              "state"
            ],
            "additionalProperties": false
          },
          "script": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "logline": {
                "type": "string"
              },
              "synopsis": {
                "type": "string"
              }
            },
            "required": [
              "text",
              "logline",
              "synopsis"
            ],
            "additionalProperties": false
          },
          "episodes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "title": {
                  "type": "string"
                },
                "raw_content": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "number",
                "title",
                "raw_content",
                "description"
              ],
              "additionalProperties": false
            }
          },
          "designs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "character",
                    "scene",
                    "prop",
                    "grid"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "primary_asset_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "name",
                "description",
                "tags",
                "primary_asset_id"
              ],
              "additionalProperties": false
            }
          },
          "scenes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "episode_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "heading": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "video_prompt": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "episode_id",
                "number",
                "heading",
                "description",
                "video_prompt"
              ],
              "additionalProperties": false
            }
          },
          "scene_designs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scene_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "design_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string"
                },
                "position": {
                  "type": "integer"
                }
              },
              "required": [
                "scene_id",
                "design_id",
                "kind",
                "position"
              ],
              "additionalProperties": false
            }
          },
          "takes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scene_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "position": {
                  "type": "integer"
                }
              },
              "required": [
                "scene_id",
                "asset_id",
                "position"
              ],
              "additionalProperties": false
            }
          },
          "cut_selections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scene_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "scene_id",
                "asset_id"
              ],
              "additionalProperties": false
            }
          },
          "design_assets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "design_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "position": {
                  "type": "integer"
                }
              },
              "required": [
                "design_id",
                "asset_id",
                "kind",
                "name",
                "position"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "api_runs",
          "project_id",
          "revision",
          "studio_url",
          "trash",
          "assets",
          "settings",
          "script",
          "episodes",
          "designs",
          "scenes",
          "scene_designs",
          "takes",
          "cut_selections",
          "design_assets"
        ],
        "additionalProperties": false
      },
      "StudioAnalysis": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "script_text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000000
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "StudioBuild": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "script_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "default": []
          },
          "material_scope": {
            "type": "string",
            "enum": [
              "unclassified",
              "all"
            ],
            "default": "unclassified"
          },
          "preprocess": {
            "type": "object",
            "properties": {
              "ignoreAttachments": {
                "type": "boolean",
                "default": true
              },
              "discardKeywords": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "maxItems": 100,
                "default": [
                  "提示词",
                  "prompt",
                  "Midjourney",
                  "Stable Diffusion",
                  "DALL-E",
                  "Image1",
                  "Image2",
                  "正向提示词",
                  "负向提示词",
                  "视觉描述",
                  "出图要求",
                  "技术规格",
                  "画面描述",
                  "镜头提示词",
                  "请生成",
                  "角色三视图",
                  "服装本体展示",
                  "局部材质与细节放大"
                ]
              },
              "keepLabels": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "maxItems": 100,
                "default": [
                  "资产名称",
                  "资产ID",
                  "资产版本",
                  "关联角色资产名称",
                  "关联角色资产ID",
                  "关联场景资产名称",
                  "关联场景资产ID",
                  "关联道具资产名称",
                  "关联道具资产ID",
                  "服装变体ID",
                  "服装名称",
                  "道具资产ID",
                  "道具名称",
                  "场景资产ID",
                  "场景名称",
                  "宫格图ID",
                  "集数",
                  "主题",
                  "场景",
                  "角色名称",
                  "用途"
                ]
              }
            },
            "additionalProperties": false
          },
          "rebuild_policy": {
            "type": "string",
            "const": "full_rebuild"
          }
        },
        "required": [
          "revision",
          "rebuild_policy"
        ],
        "additionalProperties": false
      },
      "StudioCutExport": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "allow_partial": {
            "type": "boolean",
            "default": true
          },
          "selections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scene_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "scene_id",
                "asset_id"
              ],
              "additionalProperties": false
            },
            "maxItems": 200
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "StudioVideo": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "scene_id": {
            "type": "string",
            "format": "uuid"
          },
          "anchor_asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "reference_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 12
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "default": "video-standard"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "duration_seconds": {
            "type": "integer",
            "minimum": 1,
            "maximum": 60
          },
          "resolution": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20
          },
          "aspect_ratio": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20
          },
          "generate_audio": {
            "type": "boolean"
          }
        },
        "required": [
          "revision",
          "scene_id",
          "duration_seconds",
          "resolution",
          "aspect_ratio"
        ],
        "additionalProperties": false
      },
      "StudioImage": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "design_id": {
            "type": "string",
            "format": "uuid"
          },
          "variants": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4,
            "default": 1
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "default": "image-standard"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000
          },
          "aspect_ratio": {
            "type": "string",
            "pattern": "^(auto|[1-9]\\d*:[1-9]\\d*)$"
          },
          "image_size": {
            "type": "string",
            "maxLength": 40
          },
          "quality": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "background": {
            "type": "string",
            "enum": [
              "auto",
              "opaque",
              "transparent"
            ]
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "jpeg"
            ]
          },
          "reference_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 16,
            "default": []
          },
          "slot": {
            "type": "string",
            "enum": [
              "primary",
              "variant"
            ],
            "default": "primary"
          },
          "variant_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "current_asset_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "revision",
          "design_id"
        ],
        "additionalProperties": false
      },
      "Uploaded": {
        "type": "object",
        "properties": {
          "uploaded": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "uploaded"
        ],
        "additionalProperties": false
      },
      "PublicCapabilityPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "studio_workflow": {
                  "type": "object",
                  "properties": {
                    "equivalent": {
                      "type": "boolean"
                    },
                    "stages": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "script",
                          "designs",
                          "storyboard",
                          "cut"
                        ]
                      }
                    },
                    "project_access": {
                      "type": "string",
                      "enum": [
                        "read_only",
                        "read_write",
                        "mixed"
                      ]
                    },
                    "gaps": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "operations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "path": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "path",
                          "enabled"
                        ],
                        "additionalProperties": false
                      },
                      "default": []
                    },
                    "commands": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "default": []
                    },
                    "image_models": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "aspect_ratios": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "image_sizes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "max_reference_images": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "max_variants": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "id",
                          "enabled",
                          "aspect_ratios",
                          "image_sizes",
                          "max_reference_images",
                          "max_variants"
                        ],
                        "additionalProperties": false
                      },
                      "default": []
                    }
                  },
                  "required": [
                    "equivalent",
                    "stages",
                    "project_access",
                    "gaps"
                  ],
                  "additionalProperties": false
                },
                "template_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "template_version": {
                  "type": "integer",
                  "minimum": 1
                },
                "enabled": {
                  "type": "boolean"
                },
                "stages": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "output_profiles": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "unsupported_reasons": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "max_shots": {
                  "type": "integer",
                  "minimum": 1
                },
                "max_episode_seconds": {
                  "type": "integer",
                  "minimum": 1
                },
                "upload_mime_types": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "max_upload_bytes": {
                  "type": "integer",
                  "minimum": 1
                },
                "upload_limits": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "job_types": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "analyze_script",
                      "generate_image",
                      "generate_video",
                      "assemble_video"
                    ]
                  }
                },
                "operations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "enabled": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "type",
                      "enabled"
                    ],
                    "additionalProperties": false
                  }
                },
                "image_size": {
                  "type": "string"
                },
                "max_reference_images": {
                  "type": "integer"
                }
              },
              "required": [
                "studio_workflow",
                "template_id",
                "template_version",
                "enabled",
                "stages",
                "output_profiles",
                "unsupported_reasons",
                "max_shots",
                "max_episode_seconds",
                "upload_mime_types",
                "max_upload_bytes"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicProjectPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "active",
                    "archived"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "client_reference": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 128
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "revision",
                "state",
                "created_at",
                "client_reference"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicProject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "revision",
          "state",
          "created_at",
          "client_reference"
        ],
        "additionalProperties": false
      },
      "PublicResourcePage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "work_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "content": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "script"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 900000
                            },
                            "source_asset_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "language": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 16
                            }
                          },
                          "required": [
                            "language"
                          ],
                          "additionalProperties": false,
                          "description": "text と source_asset_id のどちらか一方だけを指定してください。"
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "character"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "reference_asset_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            }
                          },
                          "required": [
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "scene"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "reference_asset_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            }
                          },
                          "required": [
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "prop"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "reference_asset_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            }
                          },
                          "required": [
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "episode"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "script_resource_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "sequence": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "raw_content": {
                              "type": "string",
                              "maxLength": 20000
                            },
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            }
                          },
                          "required": [
                            "script_resource_id",
                            "sequence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "shot"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "episode_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "scene_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "character_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            },
                            "prop_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            },
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "video_prompt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 4000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sequence": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "duration_seconds": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 60
                            },
                            "selected_image_asset_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "selected_video_asset_id": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "required": [
                            "episode_id",
                            "description",
                            "duration_seconds"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "work_id",
                "revision",
                "content",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "content": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "script"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 900000
                      },
                      "source_asset_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "language": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 16
                      }
                    },
                    "required": [
                      "language"
                    ],
                    "additionalProperties": false,
                    "description": "text と source_asset_id のどちらか一方だけを指定してください。"
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "character"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "reference_asset_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      }
                    },
                    "required": [
                      "description"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "scene"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "reference_asset_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      }
                    },
                    "required": [
                      "description"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "prop"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "reference_asset_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      }
                    },
                    "required": [
                      "description"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "episode"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "script_resource_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "raw_content": {
                        "type": "string",
                        "maxLength": 20000
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      }
                    },
                    "required": [
                      "script_resource_id",
                      "sequence"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "shot"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "episode_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "scene_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "character_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      },
                      "prop_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "video_prompt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 4000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "duration_seconds": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 60
                      },
                      "selected_image_asset_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "selected_video_asset_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "episode_id",
                      "description",
                      "duration_seconds"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "work_id",
          "revision",
          "content",
          "created_at"
        ],
        "additionalProperties": false
      },
      "PublicUploadTicket": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "upload_url": {
            "type": "string",
            "format": "uri"
          },
          "method": {
            "type": "string",
            "enum": [
              "PUT"
            ]
          },
          "content_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "asset_id",
          "upload_url",
          "method",
          "content_type",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "PublicAsset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "verified",
              "ready",
              "errored",
              "expired"
            ]
          },
          "mime_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "download_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "work_id",
          "state",
          "mime_type",
          "size_bytes",
          "download_url",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "PublicPlan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "project_revision": {
            "type": "integer",
            "minimum": 1
          },
          "template_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "template_version": {
            "type": "integer",
            "minimum": 1
          },
          "executable": {
            "type": "boolean"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "budget_ceiling": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "stage_key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "target_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "depends_on": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "requires_review": {
                  "type": "boolean"
                },
                "max_cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        "micro_units": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        }
                      },
                      "required": [
                        "currency",
                        "micro_units"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "stage_key",
                "target_ids",
                "depends_on",
                "requires_review",
                "max_cost"
              ],
              "additionalProperties": false
            }
          },
          "unsupported_reasons": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          }
        },
        "required": [
          "id",
          "work_id",
          "project_revision",
          "template_id",
          "template_version",
          "executable",
          "expires_at",
          "budget_ceiling",
          "steps",
          "unsupported_reasons"
        ],
        "additionalProperties": false
      },
      "PublicRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "plan_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "awaiting_review",
              "stopping",
              "paused",
              "needs_attention",
              "partially_succeeded",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "budget_remaining": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "micro_units": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": [
              "currency",
              "micro_units"
            ],
            "additionalProperties": false
          },
          "committed_cost": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "unresolved_cost": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "output_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "id",
          "work_id",
          "plan_id",
          "version",
          "state",
          "client_reference",
          "created_at",
          "completed_at",
          "budget_remaining",
          "committed_cost",
          "unresolved_cost",
          "output_asset_ids"
        ],
        "additionalProperties": false
      },
      "PublicRunPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "work_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "plan_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "version": {
                  "type": "integer",
                  "minimum": 1
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "awaiting_review",
                    "stopping",
                    "paused",
                    "needs_attention",
                    "partially_succeeded",
                    "succeeded",
                    "failed",
                    "cancelled"
                  ]
                },
                "client_reference": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 128
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "completed_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "budget_remaining": {
                  "type": "object",
                  "properties": {
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$"
                    },
                    "micro_units": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    }
                  },
                  "required": [
                    "currency",
                    "micro_units"
                  ],
                  "additionalProperties": false
                },
                "committed_cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        "micro_units": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        }
                      },
                      "required": [
                        "currency",
                        "micro_units"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unresolved_cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        "micro_units": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        }
                      },
                      "required": [
                        "currency",
                        "micro_units"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "output_asset_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              "required": [
                "id",
                "work_id",
                "plan_id",
                "version",
                "state",
                "client_reference",
                "created_at",
                "completed_at",
                "budget_remaining",
                "committed_cost",
                "unresolved_cost",
                "output_asset_ids"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicStepPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "run_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "stage_key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "target_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "job_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "blocked",
                    "ready",
                    "queued",
                    "running",
                    "awaiting_review",
                    "succeeded",
                    "failed",
                    "cancelled",
                    "unknown"
                  ]
                },
                "output_asset_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "error_code": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ordinal": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "run_id",
                "stage_key",
                "target_id",
                "job_id",
                "state",
                "output_asset_ids",
                "error_code",
                "ordinal"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicRunEventPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "event_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "run_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "sequence": {
                  "type": "integer",
                  "minimum": 1
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "run.state_changed",
                    "run.review_required",
                    "run.result_ready",
                    "run.needs_attention"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "awaiting_review",
                    "stopping",
                    "paused",
                    "needs_attention",
                    "partially_succeeded",
                    "succeeded",
                    "failed",
                    "cancelled"
                  ]
                },
                "step_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "event_id",
                "run_id",
                "sequence",
                "type",
                "state",
                "step_id",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicJob": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "ready",
              "blocked",
              "processing",
              "awaiting_review",
              "succeeded",
              "failed",
              "cancelled",
              "needs_review"
            ]
          },
          "output_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "resource_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "skipped_scene_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "id",
          "work_id",
          "run_id",
          "state",
          "output_asset_ids",
          "error_code"
        ],
        "additionalProperties": false
      },
      "PublicRequestLogPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "request_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "method": {
                  "type": "string",
                  "enum": [
                    "GET",
                    "POST",
                    "PATCH",
                    "PUT"
                  ]
                },
                "route_template": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                },
                "status_code": {
                  "type": "integer",
                  "minimum": 100,
                  "maximum": 599
                },
                "duration_ms": {
                  "type": "integer",
                  "minimum": 0
                },
                "actor_kind": {
                  "type": "string",
                  "enum": [
                    "api_key",
                    "console"
                  ]
                },
                "work_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "run_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "job_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "replayed": {
                  "type": "boolean"
                },
                "error_code": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "request_id",
                "created_at",
                "method",
                "route_template",
                "status_code",
                "duration_ms",
                "actor_kind",
                "work_id",
                "run_id",
                "job_id",
                "replayed",
                "error_code"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicRequestLog": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PATCH",
              "PUT"
            ]
          },
          "route_template": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "status_code": {
            "type": "integer",
            "minimum": 100,
            "maximum": 599
          },
          "duration_ms": {
            "type": "integer",
            "minimum": 0
          },
          "actor_kind": {
            "type": "string",
            "enum": [
              "api_key",
              "console"
            ]
          },
          "work_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "replayed": {
            "type": "boolean"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "request_id",
          "created_at",
          "method",
          "route_template",
          "status_code",
          "duration_ms",
          "actor_kind",
          "work_id",
          "run_id",
          "job_id",
          "replayed",
          "error_code"
        ],
        "additionalProperties": false
      },
      "PublicUsage": {
        "type": "object",
        "properties": {
          "period_start": {
            "type": "string",
            "format": "date-time"
          },
          "period_end": {
            "type": "string",
            "format": "date-time"
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "http_requests": {
            "type": "integer",
            "minimum": 0
          },
          "runs": {
            "type": "integer",
            "minimum": 0
          },
          "jobs": {
            "type": "integer",
            "minimum": 0
          },
          "reserved": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "micro_units": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": [
              "currency",
              "micro_units"
            ],
            "additionalProperties": false
          },
          "committed": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "micro_units": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": [
              "currency",
              "micro_units"
            ],
            "additionalProperties": false
          },
          "unresolved": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "remaining": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "micro_units": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": [
              "currency",
              "micro_units"
            ],
            "additionalProperties": false
          },
          "amount_basis": {
            "type": "string",
            "enum": [
              "partner_limit"
            ]
          },
          "billing_mode": {
            "type": "string",
            "enum": [
              "pilot",
              "contract"
            ]
          }
        },
        "required": [
          "period_start",
          "period_end",
          "as_of",
          "http_requests",
          "runs",
          "jobs",
          "reserved",
          "committed",
          "unresolved",
          "remaining",
          "amount_basis",
          "billing_mode"
        ],
        "additionalProperties": false
      },
      "PublicWebhookEndpointPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "work_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "events": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "run.state_changed",
                      "run.review_required",
                      "run.result_ready",
                      "run.needs_attention"
                    ]
                  }
                },
                "enabled": {
                  "type": "boolean"
                },
                "verified": {
                  "type": "boolean"
                },
                "secret_version": {
                  "type": "integer",
                  "minimum": 1
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "url",
                "work_ids",
                "events",
                "enabled",
                "verified",
                "secret_version",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicWebhookIssued": {
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "work_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "run.state_changed",
                    "run.review_required",
                    "run.result_ready",
                    "run.needs_attention"
                  ]
                }
              },
              "enabled": {
                "type": "boolean"
              },
              "verified": {
                "type": "boolean"
              },
              "secret_version": {
                "type": "integer",
                "minimum": 1
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "url",
              "work_ids",
              "events",
              "enabled",
              "verified",
              "secret_version",
              "created_at"
            ],
            "additionalProperties": false
          },
          "signing_secret": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "required": [
          "endpoint"
        ],
        "additionalProperties": false
      },
      "PublicWebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "work_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "run.state_changed",
                "run.review_required",
                "run.result_ready",
                "run.needs_attention"
              ]
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "verified": {
            "type": "boolean"
          },
          "secret_version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "url",
          "work_ids",
          "events",
          "enabled",
          "verified",
          "secret_version",
          "created_at"
        ],
        "additionalProperties": false
      },
      "PublicWebhookDeliveryPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "endpoint_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "event_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "sending",
                    "succeeded",
                    "retrying",
                    "exhausted"
                  ]
                },
                "attempt": {
                  "type": "integer",
                  "minimum": 0
                },
                "http_status": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "next_attempt_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "endpoint_id",
                "event_id",
                "state",
                "attempt",
                "http_status",
                "next_attempt_at",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicWebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "endpoint_id": {
            "type": "string",
            "format": "uuid"
          },
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "sending",
              "succeeded",
              "retrying",
              "exhausted"
            ]
          },
          "attempt": {
            "type": "integer",
            "minimum": 0
          },
          "http_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "endpoint_id",
          "event_id",
          "state",
          "attempt",
          "http_status",
          "next_attempt_at",
          "created_at"
        ],
        "additionalProperties": false
      },
      "PublicUploaded": {
        "type": "object",
        "properties": {
          "uploaded": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "uploaded"
        ],
        "additionalProperties": false
      },
      "PublicStudioWorkflow": {
        "type": "object",
        "properties": {
          "api_runs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string"
                },
                "completed_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "total_steps": {
                  "type": "integer",
                  "minimum": 0
                },
                "completed_steps": {
                  "type": "integer",
                  "minimum": 0
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "state",
                "created_at",
                "completed_at",
                "total_steps",
                "completed_steps",
                "error_code"
              ],
              "additionalProperties": false
            }
          },
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "studio_url": {
            "type": "string"
          },
          "trash": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "entity_type": {
                  "type": "string",
                  "enum": [
                    "asset",
                    "design"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "deleted_at": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "entity_type",
                "name",
                "deleted_at"
              ],
              "additionalProperties": false
            }
          },
          "assets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "media_type": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "mime": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lineage_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "is_current_version": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "name",
                "kind",
                "media_type",
                "status",
                "mime",
                "lineage_id",
                "version",
                "is_current_version"
              ],
              "additionalProperties": false
            }
          },
          "settings": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "cover": {
                "type": "string"
              },
              "aspect": {
                "type": "string"
              },
              "resolution": {
                "type": "string"
              },
              "style": {
                "type": "string"
              },
              "style_prompt": {
                "type": "string"
              },
              "state": {
                "type": "string"
              }
            },
            "required": [
              "title",
              "tags",
              "cover",
              "aspect",
              "resolution",
              "style",
              "style_prompt",
              "state"
            ],
            "additionalProperties": false
          },
          "script": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "logline": {
                "type": "string"
              },
              "synopsis": {
                "type": "string"
              }
            },
            "required": [
              "text",
              "logline",
              "synopsis"
            ],
            "additionalProperties": false
          },
          "episodes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "title": {
                  "type": "string"
                },
                "raw_content": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "number",
                "title",
                "raw_content",
                "description"
              ],
              "additionalProperties": false
            }
          },
          "designs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "character",
                    "scene",
                    "prop",
                    "grid"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "primary_asset_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "name",
                "description",
                "tags",
                "primary_asset_id"
              ],
              "additionalProperties": false
            }
          },
          "scenes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "episode_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "heading": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "video_prompt": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "episode_id",
                "number",
                "heading",
                "description",
                "video_prompt"
              ],
              "additionalProperties": false
            }
          },
          "scene_designs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scene_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "design_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string"
                },
                "position": {
                  "type": "integer"
                }
              },
              "required": [
                "scene_id",
                "design_id",
                "kind",
                "position"
              ],
              "additionalProperties": false
            }
          },
          "takes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scene_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "position": {
                  "type": "integer"
                }
              },
              "required": [
                "scene_id",
                "asset_id",
                "position"
              ],
              "additionalProperties": false
            }
          },
          "cut_selections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scene_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "scene_id",
                "asset_id"
              ],
              "additionalProperties": false
            }
          },
          "design_assets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "design_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "position": {
                  "type": "integer"
                }
              },
              "required": [
                "design_id",
                "asset_id",
                "kind",
                "name",
                "position"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "api_runs",
          "work_id",
          "revision",
          "studio_url",
          "trash",
          "assets",
          "settings",
          "script",
          "episodes",
          "designs",
          "scenes",
          "scene_designs",
          "takes",
          "cut_selections",
          "design_assets"
        ],
        "additionalProperties": false
      },
      "PublicStudioMutation": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "changed_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "studio_url": {
            "type": "string"
          }
        },
        "required": [
          "work_id",
          "changed_id",
          "revision",
          "studio_url"
        ],
        "additionalProperties": false
      },
      "PublicStudioLibrary": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "media_type": {
                  "type": "string"
                },
                "mime": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "is_current_version": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "name",
                "kind",
                "media_type",
                "mime",
                "version",
                "is_current_version"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicStudioBuildProgress": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "run_version": {
            "type": "integer"
          },
          "state": {
            "type": "string"
          },
          "wait_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "stage": {
            "type": [
              "string",
              "null"
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "assistant",
                    "system_note"
                  ]
                },
                "stage": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "content": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "streaming",
                    "final"
                  ]
                },
                "seq": {
                  "type": "number"
                },
                "created_at": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "role",
                "stage",
                "content",
                "status",
                "seq",
                "created_at",
                "updated_at"
              ],
              "additionalProperties": false
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "filterMode": {
                  "type": "string",
                  "enum": [
                    "prompt_index",
                    "full_text"
                  ]
                },
                "sourceText": {
                  "type": "string"
                },
                "llmText": {
                  "type": "string"
                },
                "originalChars": {
                  "type": "number"
                },
                "preparedChars": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "name",
                "filterMode",
                "sourceText",
                "llmText",
                "originalChars",
                "preparedChars"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "state",
          "stage",
          "messages",
          "sources"
        ],
        "additionalProperties": false
      },
      "PublicReferencePage": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "character",
                    "scene",
                    "prop",
                    "grid"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "primary_asset_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "name",
                "description",
                "tags",
                "primary_asset_id"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "work_id",
          "revision",
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicReference": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "character",
              "scene",
              "prop",
              "grid"
            ]
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "primary_asset_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "description",
          "tags",
          "primary_asset_id"
        ],
        "additionalProperties": false
      },
      "PublicEpisodePage": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "title": {
                  "type": "string"
                },
                "raw_content": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "number",
                "title",
                "raw_content",
                "description"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "work_id",
          "revision",
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicEpisode": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "title": {
            "type": "string"
          },
          "raw_content": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "number",
          "title",
          "raw_content",
          "description"
        ],
        "additionalProperties": false
      },
      "PublicScenePage": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "episode_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "heading": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "video_prompt": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "episode_id",
                "number",
                "heading",
                "description",
                "video_prompt"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "work_id",
          "revision",
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicScene": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "episode_id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "heading": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "video_prompt": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "episode_id",
          "number",
          "heading",
          "description",
          "video_prompt"
        ],
        "additionalProperties": false
      },
      "PublicArchiveImport": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "deferred",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "progress": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "phase": {
                    "type": "string",
                    "enum": [
                      "extracting",
                      "importing"
                    ]
                  },
                  "current": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "phase",
                  "current",
                  "total"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "imported": {
            "type": "integer",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "minimum": 0
          },
          "asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "work_id",
          "state",
          "progress",
          "imported",
          "failed",
          "asset_ids",
          "error_code"
        ],
        "additionalProperties": false
      },
      "PublicUploadBatch": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "filename": {
                  "type": "string"
                },
                "ticket": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "asset_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "upload_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "PUT"
                      ]
                    },
                    "content_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "asset_id",
                    "upload_url",
                    "method",
                    "content_type",
                    "expires_at"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "filename",
                "ticket"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "work_id",
          "items"
        ],
        "additionalProperties": false
      }
    }
  },
  "x-documentation-language": "ja",
  "tags": [
    {
      "name": "利用可能な機能",
      "description": "利用可能な機能",
      "x-tag-id": "capabilities"
    },
    {
      "name": "プロジェクト・資料",
      "description": "プロジェクト・資料",
      "x-tag-id": "projects"
    },
    {
      "name": "アップロード",
      "description": "アップロード",
      "x-tag-id": "uploads"
    },
    {
      "name": "アセット・結果",
      "description": "アセット・結果",
      "x-tag-id": "assets"
    },
    {
      "name": "制作実行",
      "description": "制作実行",
      "x-tag-id": "runs"
    },
    {
      "name": "ワークフロー機能",
      "description": "ワークフロー機能",
      "x-tag-id": "jobs"
    },
    {
      "name": "リクエストログ",
      "description": "リクエストログ",
      "x-tag-id": "requests"
    },
    {
      "name": "使用量",
      "description": "使用量",
      "x-tag-id": "usage"
    },
    {
      "name": "Webhook",
      "description": "Webhook",
      "x-tag-id": "webhook-endpoints"
    },
    {
      "name": "Webhook 配信",
      "description": "Webhook 配信",
      "x-tag-id": "webhook-deliveries"
    },
    {
      "name": "仕様書",
      "description": "仕様書",
      "x-tag-id": "Documentation"
    }
  ]
}
