{
  "openapi": "3.1.0",
  "info": {
    "title": "Tong API",
    "version": "0.1.0",
    "description": "Tong account API and MCP public testing contract."
  },
  "servers": [
    {
      "url": "https://platform.tongai.io"
    }
  ],
  "paths": {
    "/v1/tools/tong_image_upload/operations": {
      "post": {
        "operationId": "tong_image_upload",
        "description": "Pass an existing owned attachment through the current upload validation for an image. Use its assetId from chat/library; never invent an ID or upload bytes in a prompt.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "assetId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "assetId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_reference_upload/operations": {
      "post": {
        "operationId": "tong_reference_upload",
        "description": "Pass an existing owned attachment through the current upload validation for an audio reference or document. Use its assetId from chat/library; never invent an ID or upload bytes in a prompt.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "assetId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "assetId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_video_upload/operations": {
      "post": {
        "operationId": "tong_video_upload",
        "description": "Pass an existing owned attachment through the current upload validation for an MP4 or MOV video. Use its assetId from chat/library; never invent an ID or upload bytes in a prompt.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "assetId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "assetId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_audio_reference_upload/operations": {
      "post": {
        "operationId": "tong_audio_reference_upload",
        "description": "Pass an existing owned attachment through the current upload validation for reference speech. Use its assetId from chat/library; never invent an ID or upload bytes in a prompt.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "assetId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "assetId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_document_upload/operations": {
      "post": {
        "operationId": "tong_director_document_upload",
        "description": "Pass an existing owned attachment through the current upload validation for a PDF or Word script for extraction; the existing script is only changed by its save operation. Use its assetId from chat/library; never invent an ID or upload bytes in a prompt.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "assetId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "assetId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_reference_upload/operations": {
      "post": {
        "operationId": "tong_director_reference_upload",
        "description": "Pass an existing owned attachment through the current upload validation for a reference video for analysis. Use its assetId from chat/library; never invent an ID or upload bytes in a prompt.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "assetId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "assetId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_lora_media_upload/operations": {
      "post": {
        "operationId": "tong_lora_media_upload",
        "description": "Pass an existing owned attachment through the current upload validation for a custom-model audio or video reference. Use its assetId from chat/library; never invent an ID or upload bytes in a prompt.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "assetId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "assetId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_motion_video_upload/operations": {
      "post": {
        "operationId": "tong_motion_video_upload",
        "description": "Pass an existing owned attachment through the current upload validation for a performance video. Use its assetId from chat/library; never invent an ID or upload bytes in a prompt.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "assetId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "assetId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_motion_image_upload/operations": {
      "post": {
        "operationId": "tong_motion_image_upload",
        "description": "Pass an existing owned attachment through the current upload validation for a character image. Use its assetId from chat/library; never invent an ID or upload bytes in a prompt.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "assetId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "assetId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_video_edit_upload/operations": {
      "post": {
        "operationId": "tong_video_edit_upload",
        "description": "Pass an existing owned attachment through the current upload validation for a video or reference image for editing. Use its assetId from chat/library; never invent an ID or upload bytes in a prompt.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "assetId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "assetId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_workflows/operations": {
      "post": {
        "operationId": "tong_workflows",
        "description": "Discover enabled models and prices. Filter query.operation for the needed workflow, then query.operation and query.model for exact prices and reference capabilities.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "catalog:read"
            ]
          }
        ],
        "x-required-scopes": [
          "catalog:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "query": {
                        "type": "object",
                        "properties": {
                          "operation": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "model": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_config/operations": {
      "post": {
        "operationId": "tong_director_config",
        "description": "Read current director capabilities before selecting parameters.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "catalog:read"
            ]
          }
        ],
        "x-required-scopes": [
          "catalog:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_audio_config/operations": {
      "post": {
        "operationId": "tong_audio_config",
        "description": "Read current audio capabilities before selecting parameters.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "catalog:read"
            ]
          }
        ],
        "x-required-scopes": [
          "catalog:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_video_editor_config/operations": {
      "post": {
        "operationId": "tong_video_editor_config",
        "description": "Read current video_editor capabilities before selecting parameters.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "catalog:read"
            ]
          }
        ],
        "x-required-scopes": [
          "catalog:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_motion_config/operations": {
      "post": {
        "operationId": "tong_motion_config",
        "description": "Read current motion capabilities before selecting parameters.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "catalog:read"
            ]
          }
        ],
        "x-required-scopes": [
          "catalog:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_lora_config/operations": {
      "post": {
        "operationId": "tong_lora_config",
        "description": "Read current lora capabilities before selecting parameters.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "catalog:read"
            ]
          }
        ],
        "x-required-scopes": [
          "catalog:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_library_search/operations": {
      "post": {
        "operationId": "tong_library_search",
        "description": "Find owned image, video or audio assets by project, kind and search.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:read"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "query": {
                        "type": "object",
                        "properties": {
                          "projectId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "directorId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "unfiled": {
                            "type": "string",
                            "enum": [
                              "true",
                              "false"
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "IMAGE",
                              "VIDEO",
                              "AUDIO"
                            ]
                          },
                          "search": {
                            "type": "string",
                            "maxLength": 100
                          },
                          "cursor": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "limit": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_asset_download/operations": {
      "post": {
        "operationId": "tong_asset_download",
        "description": "Resolve an owned asset download. Returns a URL; never fetch arbitrary model-supplied URLs.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:read"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "query": {
                        "type": "object",
                        "properties": {
                          "resolve": {
                            "type": "string",
                            "const": "1"
                          }
                        },
                        "required": [
                          "resolve"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "query"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_workspace_list/operations": {
      "post": {
        "operationId": "tong_workspace_list",
        "description": "List creative workspace projects.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "projects:read"
            ]
          }
        ],
        "x-required-scopes": [
          "projects:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "query": {
                        "type": "object",
                        "properties": {
                          "cursor": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "search": {
                            "type": "string",
                            "maxLength": 100
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_workspace_get/operations": {
      "post": {
        "operationId": "tong_workspace_get",
        "description": "Read an owned workspace project.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "projects:read"
            ]
          }
        ],
        "x-required-scopes": [
          "projects:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_workspace_create/operations": {
      "post": {
        "operationId": "tong_workspace_create",
        "description": "Create a workspace project with a stable creation key.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "projects:write"
            ]
          }
        ],
        "x-required-scopes": [
          "projects:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "required": [
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_conversation_create/operations": {
      "post": {
        "operationId": "tong_conversation_create",
        "description": "Create an internal media conversation for generated outputs; link it to the integration conversation without changing the user entrypoint.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "conversations:write"
            ]
          }
        ],
        "x-required-scopes": [
          "conversations:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_conversation_get/operations": {
      "post": {
        "operationId": "tong_conversation_get",
        "description": "Read an existing media conversation.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "conversations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "conversations:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_conversation_messages/operations": {
      "post": {
        "operationId": "tong_conversation_messages",
        "description": "Read output messages and job status; queued does not mean completed.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "conversations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "conversations:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_generation_reuse/operations": {
      "post": {
        "operationId": "tong_generation_reuse",
        "description": "Read reusable settings and source assets for an existing generation.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "generation:read"
            ]
          }
        ],
        "x-required-scopes": [
          "generation:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "messageId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id",
                          "messageId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_generation_quote/operations": {
      "post": {
        "operationId": "tong_generation_quote",
        "description": "Quote an image/video operation with its exact reference and routing inputs. This body has no top-level prompt: put creative text in generation_submit body.prompt.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "generation:write",
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "generation:write",
          "quotes:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "operation": {
                            "type": "string",
                            "enum": [
                              "TEXT_TO_IMAGE",
                              "IMAGE_EDIT",
                              "CHARACTER_RECREATE",
                              "CHARACTER_RECREATE_SPICY",
                              "TEXT_TO_VIDEO",
                              "IMAGE_TO_VIDEO",
                              "CHARACTER_TO_VIDEO",
                              "CHARACTER_TO_VIDEO_SPICY",
                              "FIRST_LAST_TO_VIDEO"
                            ]
                          },
                          "model": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "resolution": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "480p",
                                  "720p",
                                  "768p",
                                  "1080p",
                                  "2k",
                                  "4k"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "quantity": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 60
                          },
                          "durationSeconds": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 60
                          },
                          "inputAssetIds": {
                            "maxItems": 20,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[a-f\\d]{24}$"
                            }
                          },
                          "characterProfileId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "annotationGuide": {
                            "type": "boolean"
                          },
                          "routingParameters": {
                            "type": "object",
                            "properties": {
                              "directorRequiredReferenceCount": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 20
                              },
                              "recreateReferenceRoles": {
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "SCENE",
                                    "CHARACTER"
                                  ]
                                }
                              },
                              "ratio": {
                                "type": "string",
                                "enum": [
                                  "21:9",
                                  "16:9",
                                  "4:3",
                                  "1:1",
                                  "3:4",
                                  "9:16",
                                  "adaptive"
                                ]
                              },
                              "generateAudio": {
                                "type": "boolean"
                              },
                              "promptExtend": {
                                "type": "boolean"
                              },
                              "seed": {
                                "type": "integer",
                                "minimum": -1,
                                "maximum": 2147483647
                              },
                              "negativePrompt": {
                                "type": "string",
                                "maxLength": 3000
                              },
                              "negativePromptMode": {
                                "type": "string",
                                "const": "REPLACE"
                              }
                            },
                            "additionalProperties": false
                          },
                          "referenceRequest": {
                            "type": "object",
                            "properties": {
                              "ratio": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 20
                              },
                              "generateAudio": {
                                "type": "boolean"
                              },
                              "prompt": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 20000
                              },
                              "direction": {
                                "type": "object",
                                "properties": {
                                  "version": {
                                    "type": "number",
                                    "const": 1
                                  },
                                  "capabilityRevision": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  },
                                  "keepVideoSound": {
                                    "type": "boolean"
                                  },
                                  "seed": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 2147483647
                                  },
                                  "automaticShots": {
                                    "type": "boolean"
                                  },
                                  "automaticDuration": {
                                    "type": "boolean"
                                  },
                                  "outputResolution": {
                                    "type": "string",
                                    "enum": [
                                      "720p-SR",
                                      "1080p-SR",
                                      "1440p-SR"
                                    ]
                                  },
                                  "bitrate": {
                                    "type": "string",
                                    "enum": [
                                      "standard",
                                      "high"
                                    ]
                                  },
                                  "returnLastFrame": {
                                    "type": "boolean"
                                  },
                                  "documentUrl": {
                                    "type": "string",
                                    "maxLength": 2048,
                                    "format": "uri"
                                  },
                                  "subjectSequence": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 999
                                  },
                                  "subjects": {
                                    "maxItems": 6,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "pattern": "^Subject[1-9]\\d{0,2}$"
                                        },
                                        "name": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 80
                                        },
                                        "description": {
                                          "type": "string",
                                          "maxLength": 500
                                        },
                                        "assetIds": {
                                          "minItems": 1,
                                          "maxItems": 4,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^[a-f\\d]{24}$"
                                          }
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "name",
                                        "assetIds"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "shots": {
                                    "minItems": 1,
                                    "maxItems": 6,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 80
                                        },
                                        "prompt": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 1800
                                        },
                                        "durationSeconds": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 15
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "prompt",
                                        "durationSeconds"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "references": {
                                    "maxItems": 120,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 80
                                        },
                                        "assetId": {
                                          "type": "string",
                                          "pattern": "^[a-f\\d]{24}$"
                                        },
                                        "field": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 80
                                        },
                                        "label": {
                                          "type": "string",
                                          "pattern": "^(Image|Video|Audio|Document)[1-9]\\d{0,3}$"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "assetId",
                                        "field",
                                        "label"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "version",
                                  "capabilityRevision",
                                  "references"
                                ],
                                "additionalProperties": false
                              },
                              "assetIds": {
                                "maxItems": 120,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "^[a-f\\d]{24}$"
                                }
                              }
                            },
                            "required": [
                              "prompt",
                              "direction",
                              "assetIds"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "operation",
                          "model"
                        ],
                        "additionalProperties": false
                      },
                      "filmScene": {
                        "type": "object",
                        "properties": {
                          "projectId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "shotId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "projectId",
                          "shotId",
                          "revision"
                        ],
                        "additionalProperties": false
                      },
                      "filmReference": {
                        "type": "object",
                        "properties": {
                          "projectId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "entityId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "projectId",
                          "entityId",
                          "revision"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_generation_submit/operations": {
      "post": {
        "operationId": "tong_generation_submit",
        "description": "Generate an image, edit an image, animate or create video using an authorized exact quote and selected source assets. params.id must be the MEDIA conversation result.id from conversation_create or conversation_get, never an integration chat ID or a quote id/publicId.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "generation:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "generation:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "quoteId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "prompt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 5000
                          },
                          "operation": {
                            "type": "string",
                            "enum": [
                              "TEXT_TO_IMAGE",
                              "IMAGE_EDIT",
                              "CHARACTER_RECREATE",
                              "CHARACTER_RECREATE_SPICY",
                              "TEXT_TO_VIDEO",
                              "IMAGE_TO_VIDEO",
                              "CHARACTER_TO_VIDEO",
                              "CHARACTER_TO_VIDEO_SPICY",
                              "FIRST_LAST_TO_VIDEO"
                            ]
                          },
                          "inputAssetIds": {
                            "maxItems": 120,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[a-f\\d]{24}$"
                            }
                          },
                          "parameters": {
                            "type": "object",
                            "properties": {
                              "directorRequiredReferenceCount": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 20
                              },
                              "referenceDirection": {
                                "type": "object",
                                "properties": {
                                  "version": {
                                    "type": "number",
                                    "const": 1
                                  },
                                  "capabilityRevision": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  },
                                  "keepVideoSound": {
                                    "type": "boolean"
                                  },
                                  "seed": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 2147483647
                                  },
                                  "automaticShots": {
                                    "type": "boolean"
                                  },
                                  "automaticDuration": {
                                    "type": "boolean"
                                  },
                                  "outputResolution": {
                                    "type": "string",
                                    "enum": [
                                      "720p-SR",
                                      "1080p-SR",
                                      "1440p-SR"
                                    ]
                                  },
                                  "bitrate": {
                                    "type": "string",
                                    "enum": [
                                      "standard",
                                      "high"
                                    ]
                                  },
                                  "returnLastFrame": {
                                    "type": "boolean"
                                  },
                                  "documentUrl": {
                                    "type": "string",
                                    "maxLength": 2048,
                                    "format": "uri"
                                  },
                                  "subjectSequence": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 999
                                  },
                                  "subjects": {
                                    "maxItems": 6,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "pattern": "^Subject[1-9]\\d{0,2}$"
                                        },
                                        "name": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 80
                                        },
                                        "description": {
                                          "type": "string",
                                          "maxLength": 500
                                        },
                                        "assetIds": {
                                          "minItems": 1,
                                          "maxItems": 4,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^[a-f\\d]{24}$"
                                          }
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "name",
                                        "assetIds"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "shots": {
                                    "minItems": 1,
                                    "maxItems": 6,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 80
                                        },
                                        "prompt": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 1800
                                        },
                                        "durationSeconds": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 15
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "prompt",
                                        "durationSeconds"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "references": {
                                    "maxItems": 120,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 80
                                        },
                                        "assetId": {
                                          "type": "string",
                                          "pattern": "^[a-f\\d]{24}$"
                                        },
                                        "field": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 80
                                        },
                                        "label": {
                                          "type": "string",
                                          "pattern": "^(Image|Video|Audio|Document)[1-9]\\d{0,3}$"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "assetId",
                                        "field",
                                        "label"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "version",
                                  "capabilityRevision",
                                  "references"
                                ],
                                "additionalProperties": false
                              },
                              "autoEnhancePrompt": {
                                "type": "boolean"
                              },
                              "promptEnhancementId": {
                                "type": "string",
                                "pattern": "^[a-f\\d]{24}$"
                              },
                              "negativePromptMode": {
                                "type": "string",
                                "const": "REPLACE"
                              },
                              "cameraMotion": {
                                "type": "string",
                                "enum": [
                                  "AUTO",
                                  "ORBIT_RIGHT",
                                  "ORBIT_LEFT",
                                  "PUSH_IN",
                                  "PULL_BACK",
                                  "RISE"
                                ]
                              },
                              "qualityPreset": {
                                "type": "string",
                                "enum": [
                                  "REALISTIC",
                                  "DRAFT"
                                ]
                              },
                              "casualPhoneFinish": {
                                "type": "boolean"
                              },
                              "recreateReferenceRoles": {
                                "minItems": 2,
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "SCENE",
                                    "CHARACTER"
                                  ]
                                }
                              },
                              "characterVideoReferenceRoles": {
                                "minItems": 1,
                                "maxItems": 30,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "FACE",
                                    "BODY",
                                    "CHEST",
                                    "REAR_HIPS",
                                    "GENITAL_ANATOMY",
                                    "STORYBOARD"
                                  ]
                                }
                              },
                              "imageModel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 150
                              },
                              "textToImageModel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 150
                              },
                              "videoModel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 150
                              },
                              "durationSeconds": {
                                "type": "integer",
                                "minimum": 2,
                                "maximum": 30
                              },
                              "resolution": {
                                "type": "string",
                                "enum": [
                                  "480p",
                                  "720p",
                                  "768p",
                                  "1080p",
                                  "2k",
                                  "4k"
                                ]
                              },
                              "ratio": {
                                "type": "string",
                                "enum": [
                                  "21:9",
                                  "16:9",
                                  "4:3",
                                  "1:1",
                                  "3:4",
                                  "9:16",
                                  "adaptive"
                                ]
                              },
                              "videoStyle": {
                                "type": "string",
                                "enum": [
                                  "NATURAL_PHONE",
                                  "CINEMATIC",
                                  "FOLLOW_PROMPT"
                                ]
                              },
                              "generateAudio": {
                                "type": "boolean"
                              },
                              "seed": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 2147483647
                              },
                              "promptExtend": {
                                "type": "boolean"
                              },
                              "negativePrompt": {
                                "type": "string",
                                "maxLength": 2000
                              }
                            },
                            "additionalProperties": false
                          },
                          "workspaceProjectId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[a-f\\d]{24}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "characterProfileId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "annotations": {
                            "maxItems": 8,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "x": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 1
                                },
                                "y": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 1
                                },
                                "radius": {
                                  "type": "number",
                                  "minimum": 0.02,
                                  "maximum": 0.5
                                },
                                "comment": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                }
                              },
                              "required": [
                                "x",
                                "y",
                                "radius",
                                "comment"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "quoteId",
                          "prompt",
                          "operation",
                          "inputAssetIds",
                          "parameters"
                        ],
                        "additionalProperties": false
                      },
                      "filmScene": {
                        "type": "object",
                        "properties": {
                          "projectId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "shotId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "projectId",
                          "shotId",
                          "revision"
                        ],
                        "additionalProperties": false
                      },
                      "filmReference": {
                        "type": "object",
                        "properties": {
                          "projectId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "entityId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "projectId",
                          "entityId",
                          "revision"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_continuity_read/operations": {
      "post": {
        "operationId": "tong_director_continuity_read",
        "description": "Read owned shared-reference readiness and actual source provenance. query.assetIds is a comma-separated list of the exact scene images or completed video being considered.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:read"
            ]
          }
        ],
        "x-required-scopes": [
          "films:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "query": {
                        "type": "object",
                        "properties": {
                          "shotId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          },
                          "assetIds": {
                            "type": "string",
                            "maxLength": 500
                          }
                        },
                        "required": [
                          "shotId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "query"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_projects/operations": {
      "post": {
        "operationId": "tong_director_projects",
        "description": "List saved film projects; integration and Director can use the same projects.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:read"
            ]
          }
        ],
        "x-required-scopes": [
          "films:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_get/operations": {
      "post": {
        "operationId": "tong_director_get",
        "description": "Read film script, cast references, shots, selected versions and saved exports. settings.generationMode TEXT_TO_VIDEO generates videos directly; FRAME_GUIDED or an omitted generationMode uses legacy approved opening/closing frames.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:read"
            ]
          }
        ],
        "x-required-scopes": [
          "films:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_video_attach/operations": {
      "post": {
        "operationId": "tong_director_video_attach",
        "description": "Use a completed owned video from any tool or upload as one film scene. Keeps all older versions and other scenes; creates no generation or charge.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "shotId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          }
                        },
                        "required": [
                          "id",
                          "shotId"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "assetId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "trimStart": {
                            "type": "number",
                            "minimum": 0
                          },
                          "trimEnd": {
                            "type": "number",
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "revision",
                          "assetId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_draft_create/operations": {
      "post": {
        "operationId": "tong_director_draft_create",
        "description": "Create a film draft only when the task needs a film project. Does not generate media.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "required": [
                          "title"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_script_save/operations": {
      "post": {
        "operationId": "tong_director_script_save",
        "description": "Save a supplied or edited script with optimistic revision checking. Also completes existing setup: after a saved scene plan is reviewed and the user asks to start, send only revision and onboarding copied from the current project with step STUDIO; keep totalDurationSeconds, maxSceneSeconds and documentName exactly.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "brief": {
                            "type": "string",
                            "maxLength": 200000
                          },
                          "settings": {
                            "type": "object",
                            "properties": {
                              "generationMode": {
                                "type": "string",
                                "enum": [
                                  "TEXT_TO_VIDEO",
                                  "FRAME_GUIDED"
                                ]
                              },
                              "autoEnhancePrompt": {
                                "type": "boolean"
                              },
                              "storyboardModel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "negativePrompt": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "storyboardNegativePrompt": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "videoStyle": {
                                "type": "string",
                                "enum": [
                                  "NATURAL_PHONE",
                                  "CINEMATIC",
                                  "FOLLOW_PROMPT"
                                ]
                              },
                              "videoModel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "resolution": {
                                "type": "string",
                                "enum": [
                                  "480p",
                                  "720p",
                                  "768p",
                                  "1080p",
                                  "2k",
                                  "4k"
                                ]
                              },
                              "ratio": {
                                "type": "string",
                                "enum": [
                                  "16:9",
                                  "9:16",
                                  "1:1"
                                ]
                              },
                              "generateAudio": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "videoModel"
                            ],
                            "additionalProperties": false
                          },
                          "onboarding": {
                            "type": "object",
                            "properties": {
                              "step": {
                                "type": "string",
                                "enum": [
                                  "METHOD",
                                  "SCRIPT",
                                  "DURATION",
                                  "MODELS",
                                  "SETTINGS",
                                  "REFERENCES",
                                  "REVIEW",
                                  "STUDIO"
                                ]
                              },
                              "totalDurationSeconds": {
                                "type": "integer",
                                "minimum": 4,
                                "maximum": 1800
                              },
                              "maxSceneSeconds": {
                                "type": "integer",
                                "minimum": 2,
                                "maximum": 30
                              },
                              "documentName": {
                                "type": "string",
                                "maxLength": 200
                              }
                            },
                            "required": [
                              "step",
                              "totalDurationSeconds",
                              "maxSceneSeconds"
                            ],
                            "additionalProperties": false
                          },
                          "namedReferences": {
                            "maxItems": 5,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "assetId": {
                                  "type": "string",
                                  "pattern": "^[a-f\\d]{24}$"
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 80
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "CHARACTER",
                                    "IMAGE"
                                  ]
                                }
                              },
                              "required": [
                                "assetId",
                                "name",
                                "kind"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "revision"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_planning_quote/operations": {
      "post": {
        "operationId": "tong_director_planning_quote",
        "description": "Quote planning shots from the accepted script and references.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write",
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write",
          "quotes:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "revision"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_planning_submit/operations": {
      "post": {
        "operationId": "tong_director_planning_submit",
        "description": "Submit authorized shot planning. Poll planning status until completed.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "quoteId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "quoteId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_planning_status/operations": {
      "post": {
        "operationId": "tong_director_planning_status",
        "description": "Read the persisted shot-planning job.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:read"
            ]
          }
        ],
        "x-required-scopes": [
          "films:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_estimate/operations": {
      "post": {
        "operationId": "tong_director_estimate",
        "description": "Read a planning estimate. An estimate is not an execution quote or liability cap.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:read"
            ]
          }
        ],
        "x-required-scopes": [
          "films:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_shots_reorder/operations": {
      "post": {
        "operationId": "tong_director_shots_reorder",
        "description": "Reorder shots without regenerating media; requires the current project revision.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "shotIds": {
                            "minItems": 1,
                            "maxItems": 60,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9_-]{1,120}$"
                            }
                          }
                        },
                        "required": [
                          "revision",
                          "shotIds"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_shot_select/operations": {
      "post": {
        "operationId": "tong_director_shot_select",
        "description": "Select an existing completed shot version. Selection is not user approval.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "shotId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          }
                        },
                        "required": [
                          "id",
                          "shotId"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "versionId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          }
                        },
                        "required": [
                          "revision",
                          "versionId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_frame_approve/operations": {
      "post": {
        "operationId": "tong_director_frame_approve",
        "description": "Legacy frame-guided storyboard approval only; this is NOT approval of a completed video shot.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "shotId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          }
                        },
                        "required": [
                          "id",
                          "shotId"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "revision"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_shot_delete/operations": {
      "post": {
        "operationId": "tong_director_shot_delete",
        "description": "Delete only the explicitly selected shot after a trusted deletion authorization.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:delete"
            ]
          }
        ],
        "x-required-scopes": [
          "films:delete"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "shotId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          }
                        },
                        "required": [
                          "id",
                          "shotId"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "revision"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_shots_quote/operations": {
      "post": {
        "operationId": "tong_director_shots_quote",
        "description": "Quote new shot/frame versions or regenerations. direction.prompt is additive: it does not replace saved ACTION/CAMERA/OPENING/CLOSING.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write",
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write",
          "quotes:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "requests": {
                            "minItems": 1,
                            "maxItems": 120,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "shotId": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9_-]{1,120}$"
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "START",
                                    "END",
                                    "VIDEO"
                                  ]
                                },
                                "direction": {
                                  "type": "object",
                                  "properties": {
                                    "prompt": {
                                      "type": "string",
                                      "maxLength": 2000
                                    },
                                    "sourceVersionId": {
                                      "type": "string",
                                      "pattern": "^[A-Za-z0-9_-]{1,120}$"
                                    },
                                    "annotations": {
                                      "maxItems": 8,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "x": {
                                            "type": "number",
                                            "minimum": 0,
                                            "maximum": 1
                                          },
                                          "y": {
                                            "type": "number",
                                            "minimum": 0,
                                            "maximum": 1
                                          },
                                          "radius": {
                                            "type": "number",
                                            "minimum": 0.02,
                                            "maximum": 0.5
                                          },
                                          "comment": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          }
                                        },
                                        "required": [
                                          "x",
                                          "y",
                                          "radius",
                                          "comment"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "prompt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "shotId",
                                "kind"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "revision",
                          "requests"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_shots_submit/operations": {
      "post": {
        "operationId": "tong_director_shots_submit",
        "description": "Submit the exact authorized shot batch. Copy director_shots_quote result.id byte for byte into body.quoteId: it is a 24-character hexadecimal database ID.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "quoteId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "quoteId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_resume/operations": {
      "post": {
        "operationId": "tong_director_resume",
        "description": "Resume dispatch of already-authorized work; do not confuse this with a fresh generation.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_export/operations": {
      "post": {
        "operationId": "tong_director_export",
        "description": "Create or reuse the cumulative Director cut of selected shot versions at the current revision. Set transition CUT for simple cuts or an exact sum of the selected scene lengths; this reuses approved footage and source sound, saves a genuine project export and updates Film so far without generating scenes.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assembly:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assembly:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "transition": {
                            "type": "string",
                            "enum": [
                              "CUT",
                              "SMOOTH"
                            ]
                          }
                        },
                        "required": [
                          "revision"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_reference_read/operations": {
      "post": {
        "operationId": "tong_reference_read",
        "description": "Read the reference source and analysis/script job results belonging to a Director project. params.id is the project id, NEVER a VIDEO asset id.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "analysis:read"
            ]
          }
        ],
        "x-required-scopes": [
          "analysis:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_reference_import/operations": {
      "post": {
        "operationId": "tong_reference_import",
        "description": "Import a user-provided public Instagram, TikTok or YouTube video URL into a Director project through existing backend SSRF/media validation. params.id is the project id.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "analysis:write"
            ]
          }
        ],
        "x-required-scopes": [
          "analysis:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "maxLength": 2000,
                            "format": "uri"
                          }
                        },
                        "required": [
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_reference_direction/operations": {
      "post": {
        "operationId": "tong_reference_direction",
        "description": "Record which aspects of a reference inspire a new original script.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "analysis:write"
            ]
          }
        ],
        "x-required-scopes": [
          "analysis:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "direction": {
                            "type": "object",
                            "properties": {
                              "borrow": {
                                "maxItems": 4,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "structure",
                                    "pacing",
                                    "visualMood",
                                    "camera"
                                  ]
                                }
                              },
                              "premise": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 6000
                              },
                              "characters": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "setting": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "ending": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "tone": {
                                "type": "string",
                                "maxLength": 500
                              },
                              "include": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "duration": {
                                "type": "integer",
                                "minimum": 4,
                                "maximum": 1800
                              }
                            },
                            "required": [
                              "borrow",
                              "premise",
                              "duration"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "revision",
                          "direction"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_reference_quote/operations": {
      "post": {
        "operationId": "tong_reference_quote",
        "description": "Quote visual video analysis, a complete original screenplay, or cast extraction from an existing script. params.id is the Director project id, never a source video asset id.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "analysis:write",
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "analysis:write",
          "quotes:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "task": {
                            "type": "string",
                            "enum": [
                              "ANALYSIS",
                              "DRAFT",
                              "CAST"
                            ]
                          },
                          "analysisId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "direction": {
                            "type": "object",
                            "properties": {
                              "borrow": {
                                "maxItems": 4,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "structure",
                                    "pacing",
                                    "visualMood",
                                    "camera"
                                  ]
                                }
                              },
                              "premise": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 6000
                              },
                              "characters": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "setting": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "ending": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "tone": {
                                "type": "string",
                                "maxLength": 500
                              },
                              "include": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "duration": {
                                "type": "integer",
                                "minimum": 4,
                                "maximum": 1800
                              }
                            },
                            "required": [
                              "borrow",
                              "premise",
                              "duration"
                            ],
                            "additionalProperties": false
                          },
                          "idea": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "task"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_reference_submit/operations": {
      "post": {
        "operationId": "tong_reference_submit",
        "description": "Submit the exact authorized ANALYSIS, DRAFT or CAST quote. params.id is the unchanged Director project id and params.jobId is reference_quote result.id.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "analysis:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "analysis:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "jobId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id",
                          "jobId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_reference_script_edit/operations": {
      "post": {
        "operationId": "tong_reference_script_edit",
        "description": "Save a revision of a generated script draft, preserving the source job.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "analysis:write"
            ]
          }
        ],
        "x-required-scopes": [
          "analysis:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "jobId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id",
                          "jobId"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "editRevision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "script": {
                            "type": "string",
                            "maxLength": 200000
                          }
                        },
                        "required": [
                          "editRevision",
                          "script"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_reference_script_accept/operations": {
      "post": {
        "operationId": "tong_reference_script_accept",
        "description": "Use the selected original script in a film project with no generated scenes; backend checks the source job.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "analysis:write"
            ]
          }
        ],
        "x-required-scopes": [
          "analysis:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "jobId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "script": {
                            "type": "string",
                            "minLength": 10,
                            "maxLength": 200000
                          }
                        },
                        "required": [
                          "jobId",
                          "revision",
                          "script"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_cast_read/operations": {
      "post": {
        "operationId": "tong_cast_read",
        "description": "Read stable cast identities, portraits and selected versions.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "characters:read"
            ]
          }
        ],
        "x-required-scopes": [
          "characters:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_cast_quote/operations": {
      "post": {
        "operationId": "tong_cast_quote",
        "description": "Quote character portrait designs from the saved cast descriptions. Related characters use their existing appearance-source portrait or a source character generated in the same batch.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "characters:write",
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "characters:write",
          "quotes:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "characterIds": {
                            "minItems": 1,
                            "maxItems": 5,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9_-]{1,120}$"
                            }
                          },
                          "guidance": {
                            "type": "string",
                            "maxLength": 2000
                          },
                          "model": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 150
                          }
                        },
                        "required": [
                          "characterIds",
                          "model"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_cast_submit/operations": {
      "post": {
        "operationId": "tong_cast_submit",
        "description": "Generate the authorized portrait batch.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "characters:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "characters:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "quoteId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "quoteId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_cast_select/operations": {
      "post": {
        "operationId": "tong_cast_select",
        "description": "Select a completed portrait version for a character.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "characters:write"
            ]
          }
        ],
        "x-required-scopes": [
          "characters:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "characterId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          },
                          "versionId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          }
                        },
                        "required": [
                          "revision",
                          "characterId",
                          "versionId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_cast_use/operations": {
      "post": {
        "operationId": "tong_cast_use",
        "description": "Attach selected cast portraits as shared named film references, using the project revision, not the cast revision. This is a project-wide reference update; do not use it for a change requested in only one scene.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "characters:write"
            ]
          }
        ],
        "x-required-scopes": [
          "characters:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "revision"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_locations_prepare/operations": {
      "post": {
        "operationId": "tong_locations_prepare",
        "description": "Derive locations from an existing frame-guided plan; current text-mode Director does not support this legacy operation.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "locations:write"
            ]
          }
        ],
        "x-required-scopes": [
          "locations:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "revision"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_locations_quote/operations": {
      "post": {
        "operationId": "tong_locations_quote",
        "description": "Quote location images using the selected location image for revisions, or its source location for a related view. Include shotId for a change to only one scene: a shared location is forked for that scene.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "locations:write",
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "locations:write",
          "quotes:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "requests": {
                            "minItems": 1,
                            "maxItems": 240,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "locationId": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9_-]{1,120}$"
                                },
                                "guidance": {
                                  "type": "string",
                                  "maxLength": 2000
                                },
                                "shotId": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9_-]{1,120}$"
                                }
                              },
                              "required": [
                                "locationId"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "revision",
                          "requests"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_locations_submit/operations": {
      "post": {
        "operationId": "tong_locations_submit",
        "description": "Generate the authorized location image batch.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "locations:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "locations:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "quoteId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "quoteId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_location_select/operations": {
      "post": {
        "operationId": "tong_location_select",
        "description": "Select a completed location version and preserve its asset identity.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "locations:write"
            ]
          }
        ],
        "x-required-scopes": [
          "locations:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "locationId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          }
                        },
                        "required": [
                          "id",
                          "locationId"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "versionId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          },
                          "shotId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          }
                        },
                        "required": [
                          "revision",
                          "versionId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_video_edit_quote/operations": {
      "post": {
        "operationId": "tong_director_video_edit_quote",
        "description": "Quote editing the exact selected scene version. This Director operation accepts WAVESPEED_WAN_3_PRIME_VIDEO_EDIT or SIRAY_SEEDANCE_2_5_SPICY_VIDEO_EDIT only.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "video_edit:write",
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "video_edit:write",
          "quotes:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "shotId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          }
                        },
                        "required": [
                          "id",
                          "shotId"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "input": {
                            "type": "object",
                            "properties": {
                              "sourceVersionId": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9_-]{1,120}$"
                              },
                              "model": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 150
                              },
                              "resolution": {
                                "type": "string",
                                "enum": [
                                  "480p",
                                  "720p",
                                  "1080p"
                                ]
                              },
                              "prompt": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000
                              },
                              "references": {
                                "maxItems": 3,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "assetId": {
                                      "type": "string",
                                      "pattern": "^[a-f\\d]{24}$"
                                    },
                                    "name": {
                                      "type": "string",
                                      "pattern": "^[\\p{L}\\p{N}_-]{1,40}$"
                                    }
                                  },
                                  "required": [
                                    "assetId",
                                    "name"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "sourceVersionId",
                              "model",
                              "resolution",
                              "prompt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "revision",
                          "input"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_video_edit_submit/operations": {
      "post": {
        "operationId": "tong_director_video_edit_submit",
        "description": "Submit a quoted scene edit as a new version, preserving the original.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "video_edit:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "video_edit:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "quoteId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "quoteId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_video_source_prepare/operations": {
      "post": {
        "operationId": "tong_video_source_prepare",
        "description": "Validate and prepare an owned existing video for editing.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "video_edit:write"
            ]
          }
        ],
        "x-required-scopes": [
          "video_edit:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "assetId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "assetId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_video_selection_quote/operations": {
      "post": {
        "operationId": "tong_video_selection_quote",
        "description": "Quote supported subject detection; generation of a selection is a paid operation.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "video_edit:write",
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "video_edit:write",
          "quotes:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "videoId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "start": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 30
                          },
                          "end": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 30
                          },
                          "frame": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 30
                          }
                        },
                        "required": [
                          "videoId",
                          "start",
                          "end",
                          "frame"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_video_edit_quote/operations": {
      "post": {
        "operationId": "tong_video_edit_quote",
        "description": "Quote an edit, removal, addition, swap or restyle of the actual owned source video. Read video_editor_config first, prepare the video with video_source_prepare, and use its exact id/duration.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "video_edit:write",
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "video_edit:write",
          "quotes:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "videoId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "start": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 30
                          },
                          "end": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 30
                          },
                          "frame": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 30
                          },
                          "workspaceProjectId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[a-f\\d]{24}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "intent": {
                            "type": "string",
                            "enum": [
                              "swap",
                              "background",
                              "add",
                              "remove",
                              "edit",
                              "restyle"
                            ]
                          },
                          "outputMode": {
                            "type": "string",
                            "enum": [
                              "full",
                              "clip"
                            ]
                          },
                          "mode": {
                            "type": "string",
                            "enum": [
                              "swap",
                              "add",
                              "remove",
                              "edit",
                              "restyle"
                            ]
                          },
                          "modelSelection": {
                            "type": "string",
                            "enum": [
                              "default",
                              "manual"
                            ]
                          },
                          "editModel": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 150
                          },
                          "swapEngine": {
                            "type": "string",
                            "enum": [
                              "recast",
                              "genjutsu",
                              "swap",
                              "modify"
                            ]
                          },
                          "restyleEngine": {
                            "type": "string",
                            "enum": [
                              "modify",
                              "genjutsu",
                              "grok"
                            ]
                          },
                          "presetId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "resolution": {
                            "type": "string",
                            "enum": [
                              "480p",
                              "default",
                              "768p",
                              "1080p",
                              "360p",
                              "540p",
                              "720p"
                            ]
                          },
                          "keepAudio": {
                            "type": "boolean"
                          },
                          "prompt": {
                            "type": "string",
                            "maxLength": 2500
                          },
                          "detectionId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "subjects": {
                            "maxItems": 4,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "maskId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 150
                                },
                                "reference": {
                                  "type": "object",
                                  "properties": {
                                    "assetId": {
                                      "type": "string",
                                      "pattern": "^[a-f\\d]{24}$"
                                    },
                                    "name": {
                                      "type": "string",
                                      "pattern": "^[\\p{L}\\p{N}_-]{1,40}$"
                                    }
                                  },
                                  "required": [
                                    "assetId",
                                    "name"
                                  ],
                                  "additionalProperties": false
                                },
                                "description": {
                                  "type": "string",
                                  "maxLength": 2000
                                }
                              },
                              "required": [
                                "maskId"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "references": {
                            "maxItems": 3,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "assetId": {
                                  "type": "string",
                                  "pattern": "^[a-f\\d]{24}$"
                                },
                                "name": {
                                  "type": "string",
                                  "pattern": "^[\\p{L}\\p{N}_-]{1,40}$"
                                }
                              },
                              "required": [
                                "assetId",
                                "name"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "videoId",
                          "start",
                          "end",
                          "frame"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_video_edit_route_quote/operations": {
      "post": {
        "operationId": "tong_video_edit_route_quote",
        "description": "Preferred integration native video-edit quote. Defaults to the configured default Wan editor without silently escalating to Seedance for a long clip.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "video_edit:write",
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "video_edit:write",
          "quotes:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "videoId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "start": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 30
                          },
                          "end": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 30
                          },
                          "frame": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 30
                          },
                          "workspaceProjectId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[a-f\\d]{24}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "intent": {
                            "type": "string",
                            "enum": [
                              "swap",
                              "background",
                              "add",
                              "remove",
                              "edit",
                              "restyle"
                            ]
                          },
                          "outputMode": {
                            "type": "string",
                            "enum": [
                              "full",
                              "clip"
                            ]
                          },
                          "mode": {
                            "type": "string",
                            "enum": [
                              "swap",
                              "add",
                              "remove",
                              "edit",
                              "restyle"
                            ]
                          },
                          "modelSelection": {
                            "type": "string",
                            "enum": [
                              "default",
                              "manual"
                            ]
                          },
                          "editModel": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 150
                          },
                          "swapEngine": {
                            "type": "string",
                            "enum": [
                              "recast",
                              "genjutsu",
                              "swap",
                              "modify"
                            ]
                          },
                          "restyleEngine": {
                            "type": "string",
                            "enum": [
                              "modify",
                              "genjutsu",
                              "grok"
                            ]
                          },
                          "presetId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "resolution": {
                            "type": "string",
                            "enum": [
                              "480p",
                              "default",
                              "768p",
                              "1080p",
                              "360p",
                              "540p",
                              "720p"
                            ]
                          },
                          "keepAudio": {
                            "type": "boolean"
                          },
                          "prompt": {
                            "type": "string",
                            "maxLength": 2500
                          },
                          "detectionId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "subjects": {
                            "maxItems": 4,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "maskId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 150
                                },
                                "reference": {
                                  "type": "object",
                                  "properties": {
                                    "assetId": {
                                      "type": "string",
                                      "pattern": "^[a-f\\d]{24}$"
                                    },
                                    "name": {
                                      "type": "string",
                                      "pattern": "^[\\p{L}\\p{N}_-]{1,40}$"
                                    }
                                  },
                                  "required": [
                                    "assetId",
                                    "name"
                                  ],
                                  "additionalProperties": false
                                },
                                "description": {
                                  "type": "string",
                                  "maxLength": 2000
                                }
                              },
                              "required": [
                                "maskId"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "references": {
                            "maxItems": 3,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "assetId": {
                                  "type": "string",
                                  "pattern": "^[a-f\\d]{24}$"
                                },
                                "name": {
                                  "type": "string",
                                  "pattern": "^[\\p{L}\\p{N}_-]{1,40}$"
                                }
                              },
                              "required": [
                                "assetId",
                                "name"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "videoId",
                          "start",
                          "end",
                          "frame"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_video_selection_frame/operations": {
      "post": {
        "operationId": "tong_video_selection_frame",
        "description": "Read an owned completed selection image as an authenticated PNG resource. Inspect its resource through resources/read; never put file bytes in tool arguments or claim visual observations from metadata alone.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "video_edit:read"
            ]
          }
        ],
        "x-required-scopes": [
          "video_edit:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_video_selection_mask/operations": {
      "post": {
        "operationId": "tong_video_selection_mask",
        "description": "Read an owned completed selection image as an authenticated PNG resource. Inspect its resource through resources/read; never put file bytes in tool arguments or claim visual observations from metadata alone.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "video_edit:read"
            ]
          }
        ],
        "x-required-scopes": [
          "video_edit:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "maskId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,150}$"
                          }
                        },
                        "required": [
                          "id",
                          "maskId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_video_edit_submit/operations": {
      "post": {
        "operationId": "tong_video_edit_submit",
        "description": "Submit the exact authorized quote; ownership and availability are checked upstream.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "video_edit:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "video_edit:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "quoteId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "quoteId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_video_edit_job/operations": {
      "post": {
        "operationId": "tong_video_edit_job",
        "description": "Read an owned job and its actual output status.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "video_edit:read"
            ]
          }
        ],
        "x-required-scopes": [
          "video_edit:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_motion_submit/operations": {
      "post": {
        "operationId": "tong_motion_submit",
        "description": "Submit the exact authorized quote; ownership and availability are checked upstream.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "motion:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "motion:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "quoteId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "quoteId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_motion_job/operations": {
      "post": {
        "operationId": "tong_motion_job",
        "description": "Read an owned job and its actual output status.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "motion:read"
            ]
          }
        ],
        "x-required-scopes": [
          "motion:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_lora_submit/operations": {
      "post": {
        "operationId": "tong_lora_submit",
        "description": "Submit the exact authorized quote; ownership and availability are checked upstream.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "lora:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "lora:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "quoteId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "quoteId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_lora_job/operations": {
      "post": {
        "operationId": "tong_lora_job",
        "description": "Read an owned job and its actual output status.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "lora:read"
            ]
          }
        ],
        "x-required-scopes": [
          "lora:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_motion_quote/operations": {
      "post": {
        "operationId": "tong_motion_quote",
        "description": "Quote applying an owned performance video to a character image using supported model constraints.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "motion:write",
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "motion:write",
          "quotes:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "imageId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "videoId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "model": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 150
                          },
                          "orientation": {
                            "type": "string",
                            "enum": [
                              "video",
                              "image"
                            ]
                          },
                          "keepSound": {
                            "type": "boolean"
                          },
                          "autoEnhancePrompt": {
                            "type": "boolean"
                          },
                          "prompt": {
                            "type": "string",
                            "maxLength": 2500
                          },
                          "workspaceProjectId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[a-f\\d]{24}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "promptEnhancementId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "imageId",
                          "videoId",
                          "model",
                          "orientation",
                          "keepSound"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_lora_catalog/operations": {
      "post": {
        "operationId": "tong_lora_catalog",
        "description": "Read available customer LoRA weights and supported model families; filter before paginating.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "lora:read"
            ]
          }
        ],
        "x-required-scopes": [
          "lora:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "query": {
                        "type": "object",
                        "properties": {
                          "before": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "model": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "IMAGE",
                              "VIDEO"
                            ]
                          },
                          "family": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "q": {
                            "type": "string",
                            "maxLength": 160
                          },
                          "saved": {
                            "type": "string",
                            "const": "true"
                          },
                          "tag": {
                            "type": "string",
                            "enum": [
                              "nsfw",
                              "human-motion",
                              "anime-motion",
                              "motion-continuity",
                              "spatial-physics",
                              "action",
                              "camera-motion",
                              "effects",
                              "lighting",
                              "realism",
                              "pixel",
                              "toon",
                              "mecha",
                              "painter"
                            ]
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_lora_quote/operations": {
      "post": {
        "operationId": "tong_lora_quote",
        "description": "Quote custom-weight image/video generation. Options and reference roles must match the discovered model configuration.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "lora:write",
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "lora:write",
          "quotes:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "model": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 150
                          },
                          "prompt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4000
                          },
                          "referenceDirection": {
                            "type": "object",
                            "properties": {
                              "version": {
                                "type": "number",
                                "const": 1
                              },
                              "capabilityRevision": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "keepVideoSound": {
                                "type": "boolean"
                              },
                              "seed": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 2147483647
                              },
                              "automaticShots": {
                                "type": "boolean"
                              },
                              "automaticDuration": {
                                "type": "boolean"
                              },
                              "outputResolution": {
                                "type": "string",
                                "enum": [
                                  "720p-SR",
                                  "1080p-SR",
                                  "1440p-SR"
                                ]
                              },
                              "bitrate": {
                                "type": "string",
                                "enum": [
                                  "standard",
                                  "high"
                                ]
                              },
                              "returnLastFrame": {
                                "type": "boolean"
                              },
                              "documentUrl": {
                                "type": "string",
                                "maxLength": 2048,
                                "format": "uri"
                              },
                              "subjectSequence": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 999
                              },
                              "subjects": {
                                "maxItems": 6,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^Subject[1-9]\\d{0,2}$"
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 80
                                    },
                                    "description": {
                                      "type": "string",
                                      "maxLength": 500
                                    },
                                    "assetIds": {
                                      "minItems": 1,
                                      "maxItems": 4,
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "pattern": "^[a-f\\d]{24}$"
                                      }
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name",
                                    "assetIds"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "shots": {
                                "minItems": 1,
                                "maxItems": 6,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 80
                                    },
                                    "prompt": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1800
                                    },
                                    "durationSeconds": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 15
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "prompt",
                                    "durationSeconds"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "references": {
                                "maxItems": 120,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 80
                                    },
                                    "assetId": {
                                      "type": "string",
                                      "pattern": "^[a-f\\d]{24}$"
                                    },
                                    "field": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 80
                                    },
                                    "label": {
                                      "type": "string",
                                      "pattern": "^(Image|Video|Audio|Document)[1-9]\\d{0,3}$"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "assetId",
                                    "field",
                                    "label"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "version",
                              "capabilityRevision",
                              "references"
                            ],
                            "additionalProperties": false
                          },
                          "aspect": {
                            "type": "string",
                            "enum": [
                              "1:1",
                              "16:9",
                              "9:16",
                              "4:3",
                              "3:4"
                            ]
                          },
                          "duration": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 5
                          },
                          "imageId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "seed": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 2147483647
                          },
                          "negativePrompt": {
                            "type": "string",
                            "maxLength": 2000
                          },
                          "options": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string",
                              "maxLength": 80
                            },
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 2000
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          },
                          "media": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string",
                              "maxLength": 80
                            },
                            "additionalProperties": {
                              "maxItems": 120,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "pattern": "^[a-f\\d]{24}$"
                              }
                            }
                          },
                          "presets": {
                            "maxItems": 3,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 80
                                },
                                "scale": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 4
                                }
                              },
                              "required": [
                                "key",
                                "scale"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "loras": {
                            "maxItems": 9,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "versionId": {
                                  "type": "string",
                                  "pattern": "^[a-f\\d]{24}$"
                                },
                                "scale": {
                                  "type": "number",
                                  "minimum": -1,
                                  "maximum": 4
                                },
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "style",
                                    "high",
                                    "low"
                                  ]
                                }
                              },
                              "required": [
                                "versionId",
                                "scale"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "model",
                          "prompt",
                          "loras"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_audio_quote/operations": {
      "post": {
        "operationId": "tong_audio_quote",
        "description": "Quote speech, reference speech, music or effects using discovered voice/model capabilities.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "audio:write",
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "audio:write",
          "quotes:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "model": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "prompt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096
                          },
                          "voice": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "durationSeconds": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 600
                          },
                          "speed": {
                            "type": "number",
                            "minimum": 0.25,
                            "maximum": 4
                          },
                          "lyrics": {
                            "type": "string",
                            "maxLength": 4096
                          },
                          "language": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 32
                          },
                          "mode": {
                            "type": "string",
                            "const": "speech-reference"
                          },
                          "referenceAssetId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "styleInstruction": {
                            "type": "string",
                            "maxLength": 1000
                          },
                          "referenceText": {
                            "type": "string",
                            "maxLength": 4096
                          },
                          "exaggeration": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "temperature": {
                            "type": "number",
                            "minimum": 0.05,
                            "maximum": 2
                          },
                          "guidance": {
                            "type": "number",
                            "minimum": 0.1,
                            "maximum": 1
                          },
                          "instrumental": {
                            "type": "boolean"
                          },
                          "loop": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "model",
                          "prompt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_audio_submit/operations": {
      "post": {
        "operationId": "tong_audio_submit",
        "description": "Generate the authorized audio and preserve it as an owned asset for timed placement. conversationId is the internal MEDIA conversation result.id from conversation_create or conversation_get, never the integration chat ID.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "audio:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "audio:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "conversationId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "quoteId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "workspaceProjectId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[a-f\\d]{24}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "conversationId",
                          "quoteId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_remix_prepare/operations": {
      "post": {
        "operationId": "tong_remix_prepare",
        "description": "Prepare authoritative metadata for owned images, videos and audio before arranging them. If a generated audio/video asset has missing durationSeconds, use this operation once to inspect its stored media and cache the actual duration; repeating asset_get alone cannot fill missing metadata.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assembly:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assembly:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "assetIds": {
                            "minItems": 1,
                            "maxItems": 30,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[a-f\\d]{24}$"
                            }
                          }
                        },
                        "required": [
                          "assetIds"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_remix_create/operations": {
      "post": {
        "operationId": "tong_remix_create",
        "description": "Create an existing merge draft: contiguous clips and one global soundtrack, at most 600 seconds. Timed audio layers need the new timeline worker.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assembly:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assembly:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "input": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "projectId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^[a-f\\d]{24}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sourceConversationId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^[a-f\\d]{24}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "clips": {
                                "maxItems": 30,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "assetId": {
                                      "type": "string",
                                      "pattern": "^[a-f\\d]{24}$"
                                    },
                                    "start": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 36000
                                    },
                                    "end": {
                                      "type": "number",
                                      "minimum": 0.1,
                                      "maximum": 36000
                                    },
                                    "muted": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "assetId",
                                    "start",
                                    "end",
                                    "muted"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "ratio": {
                                "type": "string",
                                "enum": [
                                  "16:9",
                                  "9:16",
                                  "1:1"
                                ]
                              },
                              "fit": {
                                "type": "string",
                                "enum": [
                                  "contain",
                                  "cover"
                                ]
                              },
                              "audio": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "assetId": {
                                        "type": "string",
                                        "pattern": "^[a-f\\d]{24}$"
                                      },
                                      "volume": {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 1
                                      }
                                    },
                                    "required": [
                                      "assetId",
                                      "volume"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "title",
                              "projectId",
                              "sourceConversationId",
                              "clips",
                              "ratio",
                              "fit",
                              "audio"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "input"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_remix_get/operations": {
      "post": {
        "operationId": "tong_remix_get",
        "description": "Read an owned merge draft and saved output.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assembly:read"
            ]
          }
        ],
        "x-required-scopes": [
          "assembly:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_remix_update/operations": {
      "post": {
        "operationId": "tong_remix_update",
        "description": "Save changes to an existing merge with revision checking.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assembly:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assembly:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "input": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "projectId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^[a-f\\d]{24}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sourceConversationId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^[a-f\\d]{24}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "clips": {
                                "maxItems": 30,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "assetId": {
                                      "type": "string",
                                      "pattern": "^[a-f\\d]{24}$"
                                    },
                                    "start": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 36000
                                    },
                                    "end": {
                                      "type": "number",
                                      "minimum": 0.1,
                                      "maximum": 36000
                                    },
                                    "muted": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "assetId",
                                    "start",
                                    "end",
                                    "muted"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "ratio": {
                                "type": "string",
                                "enum": [
                                  "16:9",
                                  "9:16",
                                  "1:1"
                                ]
                              },
                              "fit": {
                                "type": "string",
                                "enum": [
                                  "contain",
                                  "cover"
                                ]
                              },
                              "audio": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "assetId": {
                                        "type": "string",
                                        "pattern": "^[a-f\\d]{24}$"
                                      },
                                      "volume": {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 1
                                      }
                                    },
                                    "required": [
                                      "assetId",
                                      "volume"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "title",
                              "projectId",
                              "sourceConversationId",
                              "clips",
                              "ratio",
                              "fit",
                              "audio"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "revision",
                          "input"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_remix_export/operations": {
      "post": {
        "operationId": "tong_remix_export",
        "description": "Render an existing merge draft without altering the source assets.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assembly:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assembly:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "retry": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "revision"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_remix_export_status/operations": {
      "post": {
        "operationId": "tong_remix_export_status",
        "description": "Read a saved merge export and output asset.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assembly:read"
            ]
          }
        ],
        "x-required-scopes": [
          "assembly:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_composition_config/operations": {
      "post": {
        "operationId": "tong_composition_config",
        "description": "Check whether timed composition is enabled and read its limits before planning an assembly.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assembly:read"
            ]
          }
        ],
        "x-required-scopes": [
          "assembly:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_composition_render/operations": {
      "post": {
        "operationId": "tong_composition_render",
        "description": "Assemble owned images/videos with precise trims and timed voice, music or sound layers. First read composition_config and asset metadata.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assembly:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assembly:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "input": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "workspaceProjectId": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^[a-f\\d]{24}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "fps": {
                                "type": "string",
                                "enum": [
                                  "24",
                                  "25",
                                  "30"
                                ]
                              },
                              "width": {
                                "type": "integer",
                                "minimum": 160,
                                "maximum": 1920
                              },
                              "height": {
                                "type": "integer",
                                "minimum": 160,
                                "maximum": 1920
                              },
                              "fit": {
                                "default": "contain",
                                "type": "string",
                                "enum": [
                                  "contain",
                                  "cover"
                                ]
                              },
                              "clips": {
                                "minItems": 1,
                                "maxItems": 120,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[a-zA-Z0-9_-]{1,80}$"
                                    },
                                    "assetId": {
                                      "type": "string",
                                      "pattern": "^[a-f\\d]{24}$"
                                    },
                                    "atFrame": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 1080000
                                    },
                                    "sourceInFrame": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 1080000
                                    },
                                    "sourceOutFrame": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 1080000
                                    },
                                    "sourceAudio": {
                                      "type": "string",
                                      "enum": [
                                        "keep",
                                        "mute"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "assetId",
                                    "atFrame",
                                    "sourceInFrame",
                                    "sourceOutFrame",
                                    "sourceAudio"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "audio": {
                                "maxItems": 32,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[a-zA-Z0-9_-]{1,80}$"
                                    },
                                    "assetId": {
                                      "type": "string",
                                      "pattern": "^[a-f\\d]{24}$"
                                    },
                                    "atMs": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 36000000
                                    },
                                    "sourceInMs": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 36000000
                                    },
                                    "sourceOutMs": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 36000000
                                    },
                                    "gain": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 2
                                    },
                                    "fadeInMs": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 36000000
                                    },
                                    "fadeOutMs": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 36000000
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "assetId",
                                    "atMs",
                                    "sourceInMs",
                                    "sourceOutMs",
                                    "gain",
                                    "fadeInMs",
                                    "fadeOutMs"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "title",
                              "fps",
                              "width",
                              "height",
                              "clips",
                              "audio"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "input"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_composition_get/operations": {
      "post": {
        "operationId": "tong_composition_get",
        "description": "Read the exact saved composition job and completed output. Running work survives worker restarts; do not resubmit while waiting.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assembly:read"
            ]
          }
        ],
        "x-required-scopes": [
          "assembly:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_composition_lookup/operations": {
      "post": {
        "operationId": "tong_composition_lookup",
        "description": "Find an already submitted composition by its exact request key without starting another render.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assembly:read"
            ]
          }
        ],
        "x-required-scopes": [
          "assembly:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "query": {
                        "type": "object",
                        "properties": {
                          "requestKey": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "requestKey"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "query"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_composition_cancel/operations": {
      "post": {
        "operationId": "tong_composition_cancel",
        "description": "Stop an exact pending composition when the user asks to stop it. Preserve all source media and already completed outputs.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assembly:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assembly:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_assets_list/operations": {
      "post": {
        "operationId": "tong_assets_list",
        "description": "List owned uploads or generated images/videos with cursor pagination.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:read"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "query": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "IMAGE",
                              "VIDEO"
                            ]
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "UPLOAD",
                              "GENERATED"
                            ]
                          },
                          "limit": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                          },
                          "cursor": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_asset_get/operations": {
      "post": {
        "operationId": "tong_asset_get",
        "description": "Read authoritative owned media metadata, including duration and original filename.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:read"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_asset_delete/operations": {
      "post": {
        "operationId": "tong_asset_delete",
        "description": "Delete one exact owned asset only after explicit deletion authorization. Deletion can affect projects using it.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:delete"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:delete"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_assets_delete/operations": {
      "post": {
        "operationId": "tong_assets_delete",
        "description": "Delete the explicitly authorized set of owned assets. Do not infer permission to delete unused alternatives.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:delete"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:delete"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "assetIds": {
                            "minItems": 1,
                            "maxItems": 100,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[a-f\\d]{24}$"
                            }
                          }
                        },
                        "required": [
                          "assetIds"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_workspace_rename/operations": {
      "post": {
        "operationId": "tong_workspace_rename",
        "description": "Rename an owned workspace project at its current revision.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "projects:write"
            ]
          }
        ],
        "x-required-scopes": [
          "projects:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "name",
                          "revision"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_workspace_delete/operations": {
      "post": {
        "operationId": "tong_workspace_delete",
        "description": "Remove the explicitly authorized project and its library associations; retain source media.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "projects:delete"
            ]
          }
        ],
        "x-required-scopes": [
          "projects:delete"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_workspace_attach/operations": {
      "post": {
        "operationId": "tong_workspace_attach",
        "description": "Attach existing owned media to a project without regenerating it.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "projects:write"
            ]
          }
        ],
        "x-required-scopes": [
          "projects:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "assetIds": {
                            "minItems": 1,
                            "maxItems": 100,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[a-f\\d]{24}$"
                            }
                          }
                        },
                        "required": [
                          "assetIds"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_workspace_detach/operations": {
      "post": {
        "operationId": "tong_workspace_detach",
        "description": "Remove an exact media association from a project, retaining the asset.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "projects:delete"
            ]
          }
        ],
        "x-required-scopes": [
          "projects:delete"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "assetId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id",
                          "assetId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_workspace_films/operations": {
      "post": {
        "operationId": "tong_workspace_films",
        "description": "List owned films with pagination to find existing work across entrypoints.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "projects:read"
            ]
          }
        ],
        "x-required-scopes": [
          "projects:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "query": {
                        "type": "object",
                        "properties": {
                          "cursor": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_characters_list/operations": {
      "post": {
        "operationId": "tong_characters_list",
        "description": "Read reusable owned character identities and their actual reference assets.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "characters:read"
            ]
          }
        ],
        "x-required-scopes": [
          "characters:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_character_create/operations": {
      "post": {
        "operationId": "tong_character_create",
        "description": "Save a reusable identity from supplied owned images. Include face-master and full-body references.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "characters:write"
            ]
          }
        ],
        "x-required-scopes": [
          "characters:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "identityNotes": {
                            "type": "string",
                            "maxLength": 1200
                          },
                          "references": {
                            "minItems": 1,
                            "maxItems": 7,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "assetId": {
                                  "type": "string",
                                  "pattern": "^[a-f\\d]{24}$"
                                },
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "FACE_MASTER",
                                    "FACE_ANGLE",
                                    "BODY",
                                    "CHEST",
                                    "REAR_HIPS",
                                    "GENITAL_ANATOMY",
                                    "STYLE"
                                  ]
                                }
                              },
                              "required": [
                                "assetId",
                                "role"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "name",
                          "references"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_character_update/operations": {
      "post": {
        "operationId": "tong_character_update",
        "description": "Update a reusable identity with the complete intended reference set, preserving requested traits.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "characters:write"
            ]
          }
        ],
        "x-required-scopes": [
          "characters:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "identityNotes": {
                            "type": "string",
                            "maxLength": 1200
                          },
                          "references": {
                            "minItems": 1,
                            "maxItems": 7,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "assetId": {
                                  "type": "string",
                                  "pattern": "^[a-f\\d]{24}$"
                                },
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "FACE_MASTER",
                                    "FACE_ANGLE",
                                    "BODY",
                                    "CHEST",
                                    "REAR_HIPS",
                                    "GENITAL_ANATOMY",
                                    "STYLE"
                                  ]
                                }
                              },
                              "required": [
                                "assetId",
                                "role"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "name",
                          "references"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_character_delete/operations": {
      "post": {
        "operationId": "tong_character_delete",
        "description": "Delete an explicitly authorized character profile; do not silently discard identities.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "characters:delete"
            ]
          }
        ],
        "x-required-scopes": [
          "characters:delete"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_subjects_list/operations": {
      "post": {
        "operationId": "tong_subjects_list",
        "description": "Read reusable video subjects and whether their source references remain available.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "characters:read"
            ]
          }
        ],
        "x-required-scopes": [
          "characters:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_subject_get/operations": {
      "post": {
        "operationId": "tong_subject_get",
        "description": "Read one owned saved video subject by exact ID, including older subjects outside the recent list and source-reference availability.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "characters:read"
            ]
          }
        ],
        "x-required-scopes": [
          "characters:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_subject_create/operations": {
      "post": {
        "operationId": "tong_subject_create",
        "description": "Save a named subject from one owned video or up to four owned images.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "characters:write"
            ]
          }
        ],
        "x-required-scopes": [
          "characters:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "description": {
                            "type": "string",
                            "maxLength": 500
                          },
                          "assetIds": {
                            "minItems": 1,
                            "maxItems": 4,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[a-f\\d]{24}$"
                            }
                          }
                        },
                        "required": [
                          "name",
                          "assetIds"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_subject_delete/operations": {
      "post": {
        "operationId": "tong_subject_delete",
        "description": "Delete the explicitly authorized saved subject without deleting source assets.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "characters:delete"
            ]
          }
        ],
        "x-required-scopes": [
          "characters:delete"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_conversations_list/operations": {
      "post": {
        "operationId": "tong_conversations_list",
        "description": "Find existing owned media/text conversations by title and stable pagination cursor.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "conversations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "conversations:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "query": {
                        "type": "object",
                        "properties": {
                          "beforeUpdatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "beforeId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "search": {
                            "type": "string",
                            "maxLength": 100
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_conversation_update/operations": {
      "post": {
        "operationId": "tong_conversation_update",
        "description": "Rename or archive an existing media/text conversation without losing its outputs.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "conversations:write"
            ]
          }
        ],
        "x-required-scopes": [
          "conversations:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "archived": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_conversation_delete/operations": {
      "post": {
        "operationId": "tong_conversation_delete",
        "description": "Hide an explicitly authorized conversation. Existing job and billing records are retained.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "conversations:delete"
            ]
          }
        ],
        "x-required-scopes": [
          "conversations:delete"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_generation_alternative_quote/operations": {
      "post": {
        "operationId": "tong_generation_alternative_quote",
        "description": "Quote the next compatible model for a completed or failed generation using preserved inputs.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "generation:write",
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "generation:write",
          "quotes:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "messageId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id",
                          "messageId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_generation_alternative_submit/operations": {
      "post": {
        "operationId": "tong_generation_alternative_submit",
        "description": "Generate an authorized alternative using the exact alternative quote. Preserve earlier outputs.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "generation:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "generation:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "messageId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id",
                          "messageId"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "quoteId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "quoteId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_generation_retry/operations": {
      "post": {
        "operationId": "tong_generation_retry",
        "description": "Retry an owned failed generation when requested. The tool reserves its price again; use status reads for polling.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "generation:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "generation:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "messageId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id",
                          "messageId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_create/operations": {
      "post": {
        "operationId": "tong_director_create",
        "description": "Create and plan a film through the legacy planning operation. This invokes a provider; prefer the draft/quoted planning flow for new films.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "promptEnhancementId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "brief": {
                            "type": "string",
                            "minLength": 10,
                            "maxLength": 5000
                          },
                          "count": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 60
                          },
                          "duration": {
                            "type": "integer",
                            "minimum": 4,
                            "maximum": 10
                          },
                          "settings": {
                            "type": "object",
                            "properties": {
                              "generationMode": {
                                "type": "string",
                                "enum": [
                                  "TEXT_TO_VIDEO",
                                  "FRAME_GUIDED"
                                ]
                              },
                              "autoEnhancePrompt": {
                                "type": "boolean"
                              },
                              "storyboardModel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "negativePrompt": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "storyboardNegativePrompt": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "videoStyle": {
                                "type": "string",
                                "enum": [
                                  "NATURAL_PHONE",
                                  "CINEMATIC",
                                  "FOLLOW_PROMPT"
                                ]
                              },
                              "videoModel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "resolution": {
                                "type": "string",
                                "enum": [
                                  "480p",
                                  "720p",
                                  "768p",
                                  "1080p",
                                  "2k",
                                  "4k"
                                ]
                              },
                              "ratio": {
                                "type": "string",
                                "enum": [
                                  "16:9",
                                  "9:16",
                                  "1:1"
                                ]
                              },
                              "generateAudio": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "videoModel"
                            ],
                            "additionalProperties": false
                          },
                          "referenceAssetIds": {
                            "maxItems": 5,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[a-f\\d]{24}$"
                            }
                          }
                        },
                        "required": [
                          "title",
                          "brief",
                          "settings"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_update/operations": {
      "post": {
        "operationId": "tong_director_update",
        "description": "Update film title, brief, rendering settings, references or the stable continuity contract at the current revision. Continuity entities bind reusable CHARACTER/LOCATION identities to their exact source images and canonical prepared image; assetId:null means preparation is pending.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "brief": {
                            "type": "string",
                            "minLength": 10,
                            "maxLength": 5000
                          },
                          "settings": {
                            "type": "object",
                            "properties": {
                              "generationMode": {
                                "type": "string",
                                "enum": [
                                  "TEXT_TO_VIDEO",
                                  "FRAME_GUIDED"
                                ]
                              },
                              "autoEnhancePrompt": {
                                "type": "boolean"
                              },
                              "storyboardModel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "negativePrompt": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "storyboardNegativePrompt": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "videoStyle": {
                                "type": "string",
                                "enum": [
                                  "NATURAL_PHONE",
                                  "CINEMATIC",
                                  "FOLLOW_PROMPT"
                                ]
                              },
                              "videoModel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "resolution": {
                                "type": "string",
                                "enum": [
                                  "480p",
                                  "720p",
                                  "768p",
                                  "1080p",
                                  "2k",
                                  "4k"
                                ]
                              },
                              "ratio": {
                                "type": "string",
                                "enum": [
                                  "16:9",
                                  "9:16",
                                  "1:1"
                                ]
                              },
                              "generateAudio": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "videoModel"
                            ],
                            "additionalProperties": false
                          },
                          "referenceAssetIds": {
                            "maxItems": 5,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[a-f\\d]{24}$"
                            }
                          },
                          "continuity": {
                            "type": "object",
                            "properties": {
                              "version": {
                                "type": "number",
                                "const": 1
                              },
                              "entities": {
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[A-Za-z0-9_-]{1,120}$"
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 100
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "CHARACTER",
                                        "LOCATION"
                                      ]
                                    },
                                    "sourceAssetIds": {
                                      "maxItems": 8,
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "pattern": "^[a-f\\d]{24}$"
                                      }
                                    },
                                    "assetId": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "pattern": "^[a-f\\d]{24}$"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name",
                                    "kind",
                                    "sourceAssetIds",
                                    "assetId"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "scenes": {
                                "maxItems": 60,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "shotId": {
                                      "type": "string",
                                      "pattern": "^[A-Za-z0-9_-]{1,120}$"
                                    },
                                    "entityIds": {
                                      "maxItems": 20,
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "pattern": "^[A-Za-z0-9_-]{1,120}$"
                                      }
                                    }
                                  },
                                  "required": [
                                    "shotId",
                                    "entityIds"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "version",
                              "entities",
                              "scenes"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "revision"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_delete/operations": {
      "post": {
        "operationId": "tong_director_delete",
        "description": "Hide an explicitly authorized film project, retaining generated assets and accounting records.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:delete"
            ]
          }
        ],
        "x-required-scopes": [
          "films:delete"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_note/operations": {
      "post": {
        "operationId": "tong_director_note",
        "description": "Apply a planning note using the legacy provider-assisted planner. This is inference, not a free metadata edit.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "note": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1500
                          },
                          "targetShotId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          }
                        },
                        "required": [
                          "revision",
                          "note"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_method/operations": {
      "post": {
        "operationId": "tong_director_method",
        "description": "Select TEXT_TO_VIDEO only for scenes without required visual references, or when using external reference-conditioned tools and attaching their completed clips. This native VIDEO route sends no images.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "generationMode": {
                            "type": "string",
                            "enum": [
                              "TEXT_TO_VIDEO",
                              "FRAME_GUIDED"
                            ]
                          }
                        },
                        "required": [
                          "revision",
                          "generationMode"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_models/operations": {
      "post": {
        "operationId": "tong_director_models",
        "description": "Change models only at MODELS/REVIEW with a saved scene plan. Not a lookup: read director_config videoResolutions/videoDurations and prices first.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "settings": {
                            "type": "object",
                            "properties": {
                              "generationMode": {
                                "type": "string",
                                "enum": [
                                  "TEXT_TO_VIDEO",
                                  "FRAME_GUIDED"
                                ]
                              },
                              "autoEnhancePrompt": {
                                "type": "boolean"
                              },
                              "storyboardModel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "negativePrompt": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "storyboardNegativePrompt": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "videoStyle": {
                                "type": "string",
                                "enum": [
                                  "NATURAL_PHONE",
                                  "CINEMATIC",
                                  "FOLLOW_PROMPT"
                                ]
                              },
                              "videoModel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "resolution": {
                                "type": "string",
                                "enum": [
                                  "480p",
                                  "720p",
                                  "768p",
                                  "1080p",
                                  "2k",
                                  "4k"
                                ]
                              },
                              "ratio": {
                                "type": "string",
                                "enum": [
                                  "16:9",
                                  "9:16",
                                  "1:1"
                                ]
                              },
                              "generateAudio": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "videoModel"
                            ],
                            "additionalProperties": false
                          },
                          "replan": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "revision",
                          "settings"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_shot_add/operations": {
      "post": {
        "operationId": "tong_director_shot_add",
        "description": "Insert a fully written scene after a chosen scene without generating or replacing earlier outputs. The saved request key supplies its stable scene ID; an explicit requestId must be a new UUID.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "requestId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "afterShotId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9_-]{1,120}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shot": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "action": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1800
                              },
                              "camera": {
                                "type": "string",
                                "maxLength": 400
                              },
                              "startPrompt": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1800
                              },
                              "endPrompt": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1800
                              },
                              "durationSeconds": {
                                "type": "integer",
                                "minimum": 2,
                                "maximum": 30
                              },
                              "referenceAssetIds": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "^[a-f\\d]{24}$"
                                }
                              },
                              "audio": {
                                "type": "string",
                                "maxLength": 1600
                              },
                              "negativePrompt": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 2000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "storyboardNegativePrompt": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 2000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "location": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  },
                                  "description": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1800
                                  },
                                  "continuity": {
                                    "type": "string",
                                    "enum": [
                                      "NEW",
                                      "REUSE",
                                      "RELATED"
                                    ]
                                  },
                                  "sourceScene": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 60
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "name",
                                  "description",
                                  "continuity",
                                  "sourceScene"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "title",
                              "action",
                              "startPrompt",
                              "endPrompt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "revision",
                          "shot"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_shot_update/operations": {
      "post": {
        "operationId": "tong_director_shot_update",
        "description": "Edit a scene, sound direction, reference bindings or clip trims at the current revision. For a changed character, object state, wardrobe, setting or continuity requirement, reconcile every affected title/action/startPrompt/endPrompt plus affected camera/audio/reference detail before quoting; an additive quote direction does not replace those saved facts.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "shotId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          }
                        },
                        "required": [
                          "id",
                          "shotId"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "action": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1800
                          },
                          "camera": {
                            "type": "string",
                            "maxLength": 400
                          },
                          "startPrompt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1800
                          },
                          "endPrompt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1800
                          },
                          "durationSeconds": {
                            "type": "integer",
                            "minimum": 2,
                            "maximum": 30
                          },
                          "referenceAssetIds": {
                            "maxItems": 5,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^[a-f\\d]{24}$"
                            }
                          },
                          "audio": {
                            "type": "string",
                            "maxLength": 1600
                          },
                          "negativePrompt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 2000
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "storyboardNegativePrompt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 2000
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "location": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "description": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1800
                              },
                              "continuity": {
                                "type": "string",
                                "enum": [
                                  "NEW",
                                  "REUSE",
                                  "RELATED"
                                ]
                              },
                              "sourceScene": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 60
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "description",
                              "continuity",
                              "sourceScene"
                            ],
                            "additionalProperties": false
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "locationGuidance": {
                            "type": "string",
                            "maxLength": 2000
                          },
                          "trimStart": {
                            "type": "number",
                            "minimum": 0
                          },
                          "trimEnd": {
                            "type": "number",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "revision"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_frame_attach/operations": {
      "post": {
        "operationId": "tong_director_frame_attach",
        "description": "Attach an existing owned image as a legacy frame-guided scene frame. Do not force this workflow for text/reference-video creation.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "shotId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          }
                        },
                        "required": [
                          "id",
                          "shotId"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "START",
                              "END"
                            ]
                          },
                          "assetId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "revision",
                          "kind",
                          "assetId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_director_shot_release/operations": {
      "post": {
        "operationId": "tong_director_shot_release",
        "description": "Return an unused legacy scene package credit reservation. Does not change storyboard approval or delete media.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "films:write"
            ]
          }
        ],
        "x-required-scopes": [
          "films:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "shotId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          }
                        },
                        "required": [
                          "id",
                          "shotId"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "revision"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_cast_rename/operations": {
      "post": {
        "operationId": "tong_cast_rename",
        "description": "Rename the exact film character while preserving reference identity; both cast and project revisions must match.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "characters:write"
            ]
          }
        ],
        "x-required-scopes": [
          "characters:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "projectRevision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "characterId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          }
                        },
                        "required": [
                          "revision",
                          "projectRevision",
                          "characterId",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_location_assign/operations": {
      "post": {
        "operationId": "tong_location_assign",
        "description": "Reuse, derive or create a setting for an exact scene, preserving explicit spatial continuity.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "locations:write"
            ]
          }
        ],
        "x-required-scopes": [
          "locations:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "shotId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          }
                        },
                        "required": [
                          "id",
                          "shotId"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "mode": {
                            "type": "string",
                            "enum": [
                              "REUSE",
                              "RELATED",
                              "NEW"
                            ]
                          },
                          "sourceLocationId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "description": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1800
                          }
                        },
                        "required": [
                          "revision",
                          "mode",
                          "name",
                          "description"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_location_attach/operations": {
      "post": {
        "operationId": "tong_location_attach",
        "description": "Use an already uploaded owned image as a location reference; does not upload bytes or generate an image.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "locations:write"
            ]
          }
        ],
        "x-required-scopes": [
          "locations:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "locationId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          }
                        },
                        "required": [
                          "id",
                          "locationId"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "assetId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "shotId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,120}$"
                          }
                        },
                        "required": [
                          "revision",
                          "assetId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params",
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_video_edit_jobs/operations": {
      "post": {
        "operationId": "tong_video_edit_jobs",
        "description": "List owned jobs and saved outputs with pagination.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "video_edit:read"
            ]
          }
        ],
        "x-required-scopes": [
          "video_edit:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "query": {
                        "type": "object",
                        "properties": {
                          "before": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_motion_jobs/operations": {
      "post": {
        "operationId": "tong_motion_jobs",
        "description": "List owned jobs and saved outputs with pagination.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "motion:read"
            ]
          }
        ],
        "x-required-scopes": [
          "motion:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "query": {
                        "type": "object",
                        "properties": {
                          "before": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_lora_jobs/operations": {
      "post": {
        "operationId": "tong_lora_jobs",
        "description": "List owned jobs and saved outputs with pagination.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "lora:read"
            ]
          }
        ],
        "x-required-scopes": [
          "lora:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "query": {
                        "type": "object",
                        "properties": {
                          "before": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_video_edit_resume/operations": {
      "post": {
        "operationId": "tong_video_edit_resume",
        "description": "Resume the persisted authorized job dispatch without inventing a new generation. Read its current status first.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "video_edit:write"
            ]
          }
        ],
        "x-required-scopes": [
          "video_edit:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_motion_resume/operations": {
      "post": {
        "operationId": "tong_motion_resume",
        "description": "Resume the persisted authorized job dispatch without inventing a new generation. Read its current status first.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "motion:write"
            ]
          }
        ],
        "x-required-scopes": [
          "motion:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_motion_reuse_image/operations": {
      "post": {
        "operationId": "tong_motion_reuse_image",
        "description": "Prepare an already owned image for motion transfer, preserving its identity.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "motion:write"
            ]
          }
        ],
        "x-required-scopes": [
          "motion:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "imageId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "imageId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_video_draft_get/operations": {
      "post": {
        "operationId": "tong_video_draft_get",
        "description": "Read the existing video edit draft and revision before changing it.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "video_edit:read"
            ]
          }
        ],
        "x-required-scopes": [
          "video_edit:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_video_draft_save/operations": {
      "post": {
        "operationId": "tong_video_draft_save",
        "description": "Save the complete intended edit draft at its current revision without submitting generation.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "video_edit:write"
            ]
          }
        ],
        "x-required-scopes": [
          "video_edit:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "input": {
                            "type": "object",
                            "properties": {
                              "videoId": {
                                "type": "string",
                                "pattern": "^[a-f\\d]{24}$"
                              },
                              "start": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 30
                              },
                              "end": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 30
                              },
                              "frame": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 30
                              },
                              "workspaceProjectId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^[a-f\\d]{24}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "intent": {
                                "type": "string",
                                "enum": [
                                  "swap",
                                  "background",
                                  "add",
                                  "remove",
                                  "edit",
                                  "restyle"
                                ]
                              },
                              "outputMode": {
                                "type": "string",
                                "enum": [
                                  "full",
                                  "clip"
                                ]
                              },
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "swap",
                                  "add",
                                  "remove",
                                  "edit",
                                  "restyle"
                                ]
                              },
                              "modelSelection": {
                                "type": "string",
                                "enum": [
                                  "default",
                                  "manual"
                                ]
                              },
                              "editModel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 150
                              },
                              "swapEngine": {
                                "type": "string",
                                "enum": [
                                  "recast",
                                  "genjutsu",
                                  "swap",
                                  "modify"
                                ]
                              },
                              "restyleEngine": {
                                "type": "string",
                                "enum": [
                                  "modify",
                                  "genjutsu",
                                  "grok"
                                ]
                              },
                              "presetId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "resolution": {
                                "type": "string",
                                "enum": [
                                  "480p",
                                  "default",
                                  "768p",
                                  "1080p",
                                  "360p",
                                  "540p",
                                  "720p"
                                ]
                              },
                              "keepAudio": {
                                "type": "boolean"
                              },
                              "prompt": {
                                "type": "string",
                                "maxLength": 2500
                              },
                              "detectionId": {
                                "type": "string",
                                "pattern": "^[a-f\\d]{24}$"
                              },
                              "subjects": {
                                "maxItems": 4,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "maskId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 150
                                    },
                                    "reference": {
                                      "type": "object",
                                      "properties": {
                                        "assetId": {
                                          "type": "string",
                                          "pattern": "^[a-f\\d]{24}$"
                                        },
                                        "name": {
                                          "type": "string",
                                          "pattern": "^[\\p{L}\\p{N}_-]{1,40}$"
                                        }
                                      },
                                      "required": [
                                        "assetId",
                                        "name"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "description": {
                                      "type": "string",
                                      "maxLength": 2000
                                    }
                                  },
                                  "required": [
                                    "maskId"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "references": {
                                "maxItems": 3,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "assetId": {
                                      "type": "string",
                                      "pattern": "^[a-f\\d]{24}$"
                                    },
                                    "name": {
                                      "type": "string",
                                      "pattern": "^[\\p{L}\\p{N}_-]{1,40}$"
                                    }
                                  },
                                  "required": [
                                    "assetId",
                                    "name"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "revision",
                          "input"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_video_presets/operations": {
      "post": {
        "operationId": "tong_video_presets",
        "description": "Read available motion/restyle presets and their exact IDs.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "video_edit:read"
            ]
          }
        ],
        "x-required-scopes": [
          "video_edit:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_lora_reference_get/operations": {
      "post": {
        "operationId": "tong_lora_reference_get",
        "description": "Read an owned custom-model media reference and its metadata.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "lora:read"
            ]
          }
        ],
        "x-required-scopes": [
          "lora:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_lora_image_get/operations": {
      "post": {
        "operationId": "tong_lora_image_get",
        "description": "Read an owned starting image for custom-model generation.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "lora:read"
            ]
          }
        ],
        "x-required-scopes": [
          "lora:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_lora_reference_delete/operations": {
      "post": {
        "operationId": "tong_lora_reference_delete",
        "description": "Delete an explicitly authorized custom-model reference.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "lora:delete"
            ]
          }
        ],
        "x-required-scopes": [
          "lora:delete"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_lora_save/operations": {
      "post": {
        "operationId": "tong_lora_save",
        "description": "Save an available custom model to the user library.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "lora:write"
            ]
          }
        ],
        "x-required-scopes": [
          "lora:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_lora_unsave/operations": {
      "post": {
        "operationId": "tong_lora_unsave",
        "description": "Remove an explicitly chosen custom model from saved favorites; retain the underlying model.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "lora:write"
            ]
          }
        ],
        "x-required-scopes": [
          "lora:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_lora_import/operations": {
      "post": {
        "operationId": "tong_lora_import",
        "description": "Import a user-supplied supported model link through the backend validated import resolver.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "lora:write"
            ]
          }
        ],
        "x-required-scopes": [
          "lora:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "maxLength": 1500,
                            "format": "uri"
                          }
                        },
                        "required": [
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_lora_job_delete/operations": {
      "post": {
        "operationId": "tong_lora_job_delete",
        "description": "Hide an explicitly authorized generation from history; retain its worker, settlement and saved media.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "lora:delete"
            ]
          }
        ],
        "x-required-scopes": [
          "lora:delete"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_lora_estimate/operations": {
      "post": {
        "operationId": "tong_lora_estimate",
        "description": "Calculate a current custom-model estimate without creating a quote, calling providers or changing a wallet.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "lora:read"
            ]
          }
        ],
        "x-required-scopes": [
          "lora:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "model": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 150
                          },
                          "options": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string",
                              "maxLength": 80
                            },
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 2000
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            }
                          },
                          "media": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string",
                              "maxLength": 80
                            },
                            "additionalProperties": {
                              "maxItems": 120,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "pattern": "^[a-f\\d]{24}$"
                              }
                            }
                          },
                          "presets": {
                            "maxItems": 3,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 80
                                },
                                "scale": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 4
                                }
                              },
                              "required": [
                                "key",
                                "scale"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "loras": {
                            "maxItems": 9,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "versionId": {
                                  "type": "string",
                                  "pattern": "^[a-f\\d]{24}$"
                                },
                                "scale": {
                                  "type": "number",
                                  "minimum": -1,
                                  "maximum": 4
                                },
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "style",
                                    "high",
                                    "low"
                                  ]
                                }
                              },
                              "required": [
                                "versionId",
                                "scale"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "model"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_audio_preview/operations": {
      "post": {
        "operationId": "tong_audio_preview",
        "description": "Prepare or read a finite preset voice sample. May invoke a provider; never pass user prose as preview text.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "audio:write"
            ]
          }
        ],
        "x-required-scopes": [
          "audio:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "model": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "voice": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "required": [
                          "model",
                          "voice"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_remix_list/operations": {
      "post": {
        "operationId": "tong_remix_list",
        "description": "Find owned existing merge drafts and their saved outputs.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assembly:read"
            ]
          }
        ],
        "x-required-scopes": [
          "assembly:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "query": {
                        "type": "object",
                        "properties": {
                          "cursor": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "projectId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_enhancement_config/operations": {
      "post": {
        "operationId": "tong_enhancement_config",
        "description": "Read availability and the current fixed charge for prompt enhancement.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "catalog:read"
            ]
          }
        ],
        "x-required-scopes": [
          "catalog:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_enhancement_get/operations": {
      "post": {
        "operationId": "tong_enhancement_get",
        "description": "Read an owned enhancement job and its actual rewritten prompt.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "generation:read"
            ]
          }
        ],
        "x-required-scopes": [
          "generation:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_enhancement_submit/operations": {
      "post": {
        "operationId": "tong_enhancement_submit",
        "description": "Submit a paid prompt enhancement bound to the exact request and current fixed-price authorization.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "generation:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "generation:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "prompt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 5000
                          },
                          "context": {
                            "type": "object",
                            "properties": {
                              "referenceDirection": {
                                "type": "object",
                                "properties": {
                                  "version": {
                                    "type": "number",
                                    "const": 1
                                  },
                                  "capabilityRevision": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  },
                                  "keepVideoSound": {
                                    "type": "boolean"
                                  },
                                  "seed": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 2147483647
                                  },
                                  "automaticShots": {
                                    "type": "boolean"
                                  },
                                  "automaticDuration": {
                                    "type": "boolean"
                                  },
                                  "outputResolution": {
                                    "type": "string",
                                    "enum": [
                                      "720p-SR",
                                      "1080p-SR",
                                      "1440p-SR"
                                    ]
                                  },
                                  "bitrate": {
                                    "type": "string",
                                    "enum": [
                                      "standard",
                                      "high"
                                    ]
                                  },
                                  "returnLastFrame": {
                                    "type": "boolean"
                                  },
                                  "documentUrl": {
                                    "type": "string",
                                    "maxLength": 2048,
                                    "format": "uri"
                                  },
                                  "subjectSequence": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 999
                                  },
                                  "subjects": {
                                    "maxItems": 6,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "pattern": "^Subject[1-9]\\d{0,2}$"
                                        },
                                        "name": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 80
                                        },
                                        "description": {
                                          "type": "string",
                                          "maxLength": 500
                                        },
                                        "assetIds": {
                                          "minItems": 1,
                                          "maxItems": 4,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^[a-f\\d]{24}$"
                                          }
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "name",
                                        "assetIds"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "shots": {
                                    "minItems": 1,
                                    "maxItems": 6,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 80
                                        },
                                        "prompt": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 1800
                                        },
                                        "durationSeconds": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 15
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "prompt",
                                        "durationSeconds"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "references": {
                                    "maxItems": 120,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 80
                                        },
                                        "assetId": {
                                          "type": "string",
                                          "pattern": "^[a-f\\d]{24}$"
                                        },
                                        "field": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 80
                                        },
                                        "label": {
                                          "type": "string",
                                          "pattern": "^(Image|Video|Audio|Document)[1-9]\\d{0,3}$"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "assetId",
                                        "field",
                                        "label"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "version",
                                  "capabilityRevision",
                                  "references"
                                ],
                                "additionalProperties": false
                              },
                              "workflow": {
                                "type": "string",
                                "enum": [
                                  "TEXT_TO_IMAGE",
                                  "IMAGE_EDIT",
                                  "CHARACTER_RECREATE",
                                  "CHARACTER_RECREATE_SPICY",
                                  "TEXT_TO_VIDEO",
                                  "IMAGE_TO_VIDEO",
                                  "CHARACTER_TO_VIDEO",
                                  "CHARACTER_TO_VIDEO_SPICY",
                                  "FIRST_LAST_TO_VIDEO",
                                  "DIRECTOR_BRIEF",
                                  "MOTION_CONTROL"
                                ]
                              },
                              "durationSeconds": {
                                "type": "number",
                                "minimum": 0.1,
                                "maximum": 600
                              },
                              "ratio": {
                                "type": "string",
                                "enum": [
                                  "21:9",
                                  "16:9",
                                  "4:3",
                                  "1:1",
                                  "3:4",
                                  "9:16",
                                  "adaptive"
                                ]
                              },
                              "videoStyle": {
                                "type": "string",
                                "enum": [
                                  "NATURAL_PHONE",
                                  "CINEMATIC",
                                  "FOLLOW_PROMPT"
                                ]
                              },
                              "model": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "referenceAssetIds": {
                                "maxItems": 30,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "^[a-f\\d]{24}$"
                                }
                              },
                              "shotCount": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 20
                              },
                              "generateAudio": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "workflow",
                              "model"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "prompt",
                          "context"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_saved_job_follow/operations": {
      "post": {
        "operationId": "tong_saved_job_follow",
        "description": "Follow an already submitted job from an owned saved text chat or Director project. Use its exact source and original job ID.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "catalog:read"
            ]
          }
        ],
        "x-required-scopes": [
          "catalog:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "saved-job"
                          },
                          "sourceKind": {
                            "type": "string",
                            "enum": [
                              "text",
                              "director"
                            ]
                          },
                          "sourceId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          },
                          "family": {
                            "type": "string",
                            "enum": [
                              "text",
                              "generation",
                              "planning",
                              "reference",
                              "director-export"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "kind",
                          "sourceKind",
                          "sourceId",
                          "family",
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_text_models/operations": {
      "post": {
        "operationId": "tong_text_models",
        "description": "Discover legacy text model capabilities and prices for existing text conversations.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "catalog:read"
            ]
          }
        ],
        "x-required-scopes": [
          "catalog:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {},
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_text_history/operations": {
      "post": {
        "operationId": "tong_text_history",
        "description": "Read existing owned text-chat history, preserving its authored content during migration.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "text:read"
            ]
          }
        ],
        "x-required-scopes": [
          "text:read"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "params": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false
                      },
                      "query": {
                        "type": "object",
                        "properties": {
                          "before": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "params"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_text_quote/operations": {
      "post": {
        "operationId": "tong_text_quote",
        "description": "Quote a legacy text-model reply for an existing conversation. Do not use this to recursively invoke integration.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "text:write",
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "text:write",
          "quotes:write"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "conversationId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[a-f\\d]{24}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "prompt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 16000
                          },
                          "model": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "maxOutputTokens": {
                            "type": "integer",
                            "minimum": 256,
                            "maximum": 4096
                          }
                        },
                        "required": [
                          "prompt",
                          "model",
                          "maxOutputTokens"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_text_submit/operations": {
      "post": {
        "operationId": "tong_text_submit",
        "description": "Submit an authorized legacy text quote and preserve its persisted reply.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "text:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "text:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "object",
                        "properties": {
                          "quoteId": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "quoteId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_assistant_start/operations": {
      "post": {
        "operationId": "tong_assistant_start",
        "description": "Start or continue an integration conversation using Tong creative tools. Calls consume the account’s credits as work proceeds.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assistant:run",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "assistant:run",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 32000
                      },
                      "attachments": {
                        "default": [],
                        "maxItems": 30,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[a-f\\d]{24}$"
                        }
                      },
                      "reference_bindings": {
                        "maxItems": 30,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "pattern": "^(?:Image|Video|Audio|Document)[1-9]\\d?$"
                            },
                            "assetId": {
                              "type": "string",
                              "pattern": "^[a-f\\d]{24}$"
                            }
                          },
                          "required": [
                            "label",
                            "assetId"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "mode": {
                        "default": "guided",
                        "type": "string",
                        "enum": [
                          "guided",
                          "automatic"
                        ]
                      },
                      "conversation_id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "model_preferences": {
                        "type": "object",
                        "properties": {
                          "image": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:/-]{0,149}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "video": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:/-]{0,149}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "image",
                          "video"
                        ],
                        "additionalProperties": false
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "director",
                              "text"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "kind",
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "message"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/tong_filmmaker_start/operations": {
      "post": {
        "operationId": "tong_filmmaker_start",
        "description": "Start or continue Film maker. Guided mode waits for creative review; automatic mode continues without creative review gates.",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "filmmaker:run",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "filmmaker:run",
          "credits:spend"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
                    "type": "object",
                    "properties": {
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 32000
                      },
                      "attachments": {
                        "default": [],
                        "maxItems": 30,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[a-f\\d]{24}$"
                        }
                      },
                      "reference_bindings": {
                        "maxItems": 30,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "pattern": "^(?:Image|Video|Audio|Document)[1-9]\\d?$"
                            },
                            "assetId": {
                              "type": "string",
                              "pattern": "^[a-f\\d]{24}$"
                            }
                          },
                          "required": [
                            "label",
                            "assetId"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "mode": {
                        "default": "guided",
                        "type": "string",
                        "enum": [
                          "guided",
                          "automatic"
                        ]
                      },
                      "conversation_id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "model_preferences": {
                        "type": "object",
                        "properties": {
                          "image": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:/-]{0,149}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "video": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:/-]{0,149}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "image",
                          "video"
                        ],
                        "additionalProperties": false
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "director",
                              "text"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "pattern": "^[a-f\\d]{24}$"
                          }
                        },
                        "required": [
                          "kind",
                          "id"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "message"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably admitted operation. Poll for the native outcome.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/models": {
      "get": {
        "operationId": "listModels",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "catalog:read"
            ]
          }
        ],
        "x-required-scopes": [
          "catalog:read"
        ],
        "parameters": [
          {
            "name": "model",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "operation",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelCatalog"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/models/{id}": {
      "get": {
        "operationId": "getModel",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "catalog:read"
            ]
          }
        ],
        "x-required-scopes": [
          "catalog:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 150
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Model"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools": {
      "get": {
        "operationId": "listTools",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "catalog:read"
            ]
          }
        ],
        "x-required-scopes": [
          "catalog:read"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/{name}": {
      "get": {
        "operationId": "getTool",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "catalog:read"
            ]
          }
        ],
        "x-required-scopes": [
          "catalog:read"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "tong_image_upload",
                "tong_reference_upload",
                "tong_video_upload",
                "tong_audio_reference_upload",
                "tong_director_document_upload",
                "tong_director_reference_upload",
                "tong_lora_media_upload",
                "tong_motion_video_upload",
                "tong_motion_image_upload",
                "tong_video_edit_upload",
                "tong_workflows",
                "tong_director_config",
                "tong_audio_config",
                "tong_video_editor_config",
                "tong_motion_config",
                "tong_lora_config",
                "tong_library_search",
                "tong_asset_download",
                "tong_workspace_list",
                "tong_workspace_get",
                "tong_workspace_create",
                "tong_conversation_create",
                "tong_conversation_get",
                "tong_conversation_messages",
                "tong_generation_reuse",
                "tong_generation_quote",
                "tong_generation_submit",
                "tong_director_continuity_read",
                "tong_director_projects",
                "tong_director_get",
                "tong_director_video_attach",
                "tong_director_draft_create",
                "tong_director_script_save",
                "tong_director_planning_quote",
                "tong_director_planning_submit",
                "tong_director_planning_status",
                "tong_director_estimate",
                "tong_director_shots_reorder",
                "tong_director_shot_select",
                "tong_director_frame_approve",
                "tong_director_shot_delete",
                "tong_director_shots_quote",
                "tong_director_shots_submit",
                "tong_director_resume",
                "tong_director_export",
                "tong_reference_read",
                "tong_reference_import",
                "tong_reference_direction",
                "tong_reference_quote",
                "tong_reference_submit",
                "tong_reference_script_edit",
                "tong_reference_script_accept",
                "tong_cast_read",
                "tong_cast_quote",
                "tong_cast_submit",
                "tong_cast_select",
                "tong_cast_use",
                "tong_locations_prepare",
                "tong_locations_quote",
                "tong_locations_submit",
                "tong_location_select",
                "tong_director_video_edit_quote",
                "tong_director_video_edit_submit",
                "tong_video_source_prepare",
                "tong_video_selection_quote",
                "tong_video_edit_quote",
                "tong_video_edit_route_quote",
                "tong_video_selection_frame",
                "tong_video_selection_mask",
                "tong_video_edit_submit",
                "tong_video_edit_job",
                "tong_motion_submit",
                "tong_motion_job",
                "tong_lora_submit",
                "tong_lora_job",
                "tong_motion_quote",
                "tong_lora_catalog",
                "tong_lora_quote",
                "tong_audio_quote",
                "tong_audio_submit",
                "tong_remix_prepare",
                "tong_remix_create",
                "tong_remix_get",
                "tong_remix_update",
                "tong_remix_export",
                "tong_remix_export_status",
                "tong_composition_config",
                "tong_composition_render",
                "tong_composition_get",
                "tong_composition_lookup",
                "tong_composition_cancel",
                "tong_assets_list",
                "tong_asset_get",
                "tong_asset_delete",
                "tong_assets_delete",
                "tong_workspace_rename",
                "tong_workspace_delete",
                "tong_workspace_attach",
                "tong_workspace_detach",
                "tong_workspace_films",
                "tong_characters_list",
                "tong_character_create",
                "tong_character_update",
                "tong_character_delete",
                "tong_subjects_list",
                "tong_subject_get",
                "tong_subject_create",
                "tong_subject_delete",
                "tong_conversations_list",
                "tong_conversation_update",
                "tong_conversation_delete",
                "tong_generation_alternative_quote",
                "tong_generation_alternative_submit",
                "tong_generation_retry",
                "tong_director_create",
                "tong_director_update",
                "tong_director_delete",
                "tong_director_note",
                "tong_director_method",
                "tong_director_models",
                "tong_director_shot_add",
                "tong_director_shot_update",
                "tong_director_frame_attach",
                "tong_director_shot_release",
                "tong_cast_rename",
                "tong_location_assign",
                "tong_location_attach",
                "tong_video_edit_jobs",
                "tong_motion_jobs",
                "tong_lora_jobs",
                "tong_video_edit_resume",
                "tong_motion_resume",
                "tong_motion_reuse_image",
                "tong_video_draft_get",
                "tong_video_draft_save",
                "tong_video_presets",
                "tong_lora_reference_get",
                "tong_lora_image_get",
                "tong_lora_reference_delete",
                "tong_lora_save",
                "tong_lora_unsave",
                "tong_lora_import",
                "tong_lora_job_delete",
                "tong_lora_estimate",
                "tong_audio_preview",
                "tong_remix_list",
                "tong_enhancement_config",
                "tong_enhancement_get",
                "tong_enhancement_submit",
                "tong_saved_job_follow",
                "tong_text_models",
                "tong_text_history",
                "tong_text_quote",
                "tong_text_submit",
                "tong_assistant_start",
                "tong_filmmaker_start"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/operations": {
      "get": {
        "operationId": "listOperations",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "operations:read"
        ],
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/operations/{id}": {
      "get": {
        "operationId": "getOperation",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "operations:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/operations/by-intent/{intent}": {
      "get": {
        "operationId": "getOperationByIntent",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "operations:read"
        ],
        "parameters": [
          {
            "name": "intent",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/operations/{id}/events": {
      "get": {
        "operationId": "listOperationEvents",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "operations:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/quotes": {
      "post": {
        "operationId": "createQuote",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "quotes:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tool",
                  "input"
                ],
                "additionalProperties": false,
                "properties": {
                  "tool": {
                    "type": "string",
                    "enum": [
                      "tong_generation_quote",
                      "tong_director_planning_quote",
                      "tong_director_shots_quote",
                      "tong_reference_quote",
                      "tong_cast_quote",
                      "tong_locations_quote",
                      "tong_director_video_edit_quote",
                      "tong_video_selection_quote",
                      "tong_video_edit_quote",
                      "tong_video_edit_route_quote",
                      "tong_motion_quote",
                      "tong_lora_quote",
                      "tong_audio_quote",
                      "tong_generation_alternative_quote",
                      "tong_text_quote"
                    ]
                  },
                  "input": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably accepted. Poll the original resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/quotes/{id}": {
      "get": {
        "operationId": "getQuote",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "quotes:write"
            ]
          }
        ],
        "x-required-scopes": [
          "quotes:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/images/generations": {
      "post": {
        "operationId": "imagesGeneration",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "generation:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "generation:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "quote_id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9-]{1,120}$"
                  },
                  "media_conversation_id": {
                    "type": "string",
                    "pattern": "^[a-f\\d]{24}$"
                  },
                  "prompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32000
                  },
                  "input_asset_ids": {
                    "default": [],
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-f\\d]{24}$"
                    }
                  },
                  "parameters": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "workspace_project_id": {
                    "type": "string",
                    "pattern": "^[a-f\\d]{24}$"
                  }
                },
                "required": [
                  "quote_id",
                  "media_conversation_id",
                  "prompt",
                  "parameters"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably accepted. Poll the original resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/videos/generations": {
      "post": {
        "operationId": "videosGeneration",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "generation:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "generation:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "quote_id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9-]{1,120}$"
                  },
                  "media_conversation_id": {
                    "type": "string",
                    "pattern": "^[a-f\\d]{24}$"
                  },
                  "prompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32000
                  },
                  "input_asset_ids": {
                    "default": [],
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-f\\d]{24}$"
                    }
                  },
                  "parameters": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "workspace_project_id": {
                    "type": "string",
                    "pattern": "^[a-f\\d]{24}$"
                  }
                },
                "required": [
                  "quote_id",
                  "media_conversation_id",
                  "prompt",
                  "parameters"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably accepted. Poll the original resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/audio/generations": {
      "post": {
        "operationId": "audioGeneration",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "audio:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "audio:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "quote_id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9-]{1,120}$"
                  },
                  "media_conversation_id": {
                    "type": "string",
                    "pattern": "^[a-f\\d]{24}$"
                  },
                  "workspace_project_id": {
                    "type": "string",
                    "pattern": "^[a-f\\d]{24}$"
                  }
                },
                "required": [
                  "quote_id",
                  "media_conversation_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably accepted. Poll the original resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/text/responses": {
      "post": {
        "operationId": "textGeneration",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "text:write",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "text:write",
          "credits:spend"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "quote_id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9-]{1,120}$"
                  }
                },
                "required": [
                  "quote_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably accepted. Poll the original resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assets": {
      "post": {
        "operationId": "uploadAsset",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:write"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:write"
        ],
        "parameters": [
          {
            "name": "purpose",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "image",
                "reference",
                "video",
                "audio_reference",
                "director_document",
                "director_reference",
                "lora_media",
                "motion_video",
                "motion_image",
                "video_edit"
              ]
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-f\\d]{24}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Durably accepted. Poll the original resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "additionalProperties": false,
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/assets/{id}": {
      "get": {
        "operationId": "getAsset",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:read"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{24}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assets/{id}/download": {
      "get": {
        "operationId": "getAssetDownload",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:read"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{24}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/resources": {
      "get": {
        "operationId": "readResource",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:read",
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:read",
          "operations:read"
        ],
        "parameters": [
          {
            "name": "uri",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 800
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/conversations": {
      "post": {
        "operationId": "createConversation",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assistant:run",
              "credits:spend"
            ]
          },
          {
            "developerOAuth": [
              "filmmaker:run",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "assistant:run",
          "credits:spend"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "entrypoint": {
                    "type": "string",
                    "enum": [
                      "assistant",
                      "filmmaker"
                    ]
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "guided",
                      "automatic"
                    ]
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "project_id": {
                    "type": "string",
                    "pattern": "^[a-f\\d]{24}$"
                  },
                  "model_preferences": {
                    "type": "object",
                    "properties": {
                      "image": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:/-]{0,149}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "video": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:/-]{0,149}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "image",
                      "video"
                    ],
                    "additionalProperties": false
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "director",
                          "text"
                        ]
                      },
                      "id": {
                        "type": "string",
                        "pattern": "^[a-f\\d]{24}$"
                      }
                    },
                    "required": [
                      "kind",
                      "id"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "entrypoint",
                  "mode"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-scope-selection": "entrypoint determines assistant:run or filmmaker:run; credits:spend is required"
      }
    },
    "/v1/conversations/{id}": {
      "get": {
        "operationId": "getConversation",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "runs:read",
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "runs:read",
          "operations:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/conversations/{id}/messages": {
      "post": {
        "operationId": "createMessage",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "runs:read",
              "operations:read",
              "credits:spend",
              "assistant:run"
            ]
          },
          {
            "developerOAuth": [
              "runs:read",
              "operations:read",
              "credits:spend",
              "filmmaker:run"
            ]
          }
        ],
        "x-required-scopes": [
          "runs:read",
          "operations:read",
          "credits:spend"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32000
                  },
                  "attachment_asset_ids": {
                    "default": [],
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-f\\d]{24}$"
                    }
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "director",
                          "text"
                        ]
                      },
                      "id": {
                        "type": "string",
                        "pattern": "^[a-f\\d]{24}$"
                      }
                    },
                    "required": [
                      "kind",
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  "reference_bindings": {
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "pattern": "^(?:Image|Video|Audio|Document)[1-9]\\d?$"
                        },
                        "assetId": {
                          "type": "string",
                          "pattern": "^[a-f\\d]{24}$"
                        }
                      },
                      "required": [
                        "label",
                        "assetId"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "text"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably accepted. Poll the original resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assistant/runs": {
      "post": {
        "operationId": "assistantStart",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assistant:run",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "assistant:run",
          "credits:spend"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32000
                  },
                  "attachments": {
                    "default": [],
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-f\\d]{24}$"
                    }
                  },
                  "reference_bindings": {
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "pattern": "^(?:Image|Video|Audio|Document)[1-9]\\d?$"
                        },
                        "assetId": {
                          "type": "string",
                          "pattern": "^[a-f\\d]{24}$"
                        }
                      },
                      "required": [
                        "label",
                        "assetId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "mode": {
                    "default": "guided",
                    "type": "string",
                    "enum": [
                      "guided",
                      "automatic"
                    ]
                  },
                  "conversation_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "model_preferences": {
                    "type": "object",
                    "properties": {
                      "image": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:/-]{0,149}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "video": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:/-]{0,149}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "image",
                      "video"
                    ],
                    "additionalProperties": false
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "director",
                          "text"
                        ]
                      },
                      "id": {
                        "type": "string",
                        "pattern": "^[a-f\\d]{24}$"
                      }
                    },
                    "required": [
                      "kind",
                      "id"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "message"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably accepted. Poll the original resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/filmmaker/runs": {
      "post": {
        "operationId": "filmmakerStart",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "filmmaker:run",
              "credits:spend"
            ]
          }
        ],
        "x-required-scopes": [
          "filmmaker:run",
          "credits:spend"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32000
                  },
                  "attachments": {
                    "default": [],
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-f\\d]{24}$"
                    }
                  },
                  "reference_bindings": {
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "pattern": "^(?:Image|Video|Audio|Document)[1-9]\\d?$"
                        },
                        "assetId": {
                          "type": "string",
                          "pattern": "^[a-f\\d]{24}$"
                        }
                      },
                      "required": [
                        "label",
                        "assetId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "mode": {
                    "default": "guided",
                    "type": "string",
                    "enum": [
                      "guided",
                      "automatic"
                    ]
                  },
                  "conversation_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "model_preferences": {
                    "type": "object",
                    "properties": {
                      "image": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:/-]{0,149}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "video": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:/-]{0,149}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "image",
                      "video"
                    ],
                    "additionalProperties": false
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "director",
                          "text"
                        ]
                      },
                      "id": {
                        "type": "string",
                        "pattern": "^[a-f\\d]{24}$"
                      }
                    },
                    "required": [
                      "kind",
                      "id"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "message"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably accepted. Poll the original resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/runs/{id}": {
      "get": {
        "operationId": "getRun",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "runs:read",
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "runs:read",
          "operations:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/runs/{id}/events": {
      "get": {
        "operationId": "listRunEvents",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "runs:read",
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "runs:read",
          "operations:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/runs/{id}/pause": {
      "post": {
        "operationId": "pauseRun",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "runs:control",
              "runs:read",
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "runs:control",
          "runs:read",
          "operations:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/runs/{id}/resume": {
      "post": {
        "operationId": "resumeRun",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "runs:control",
              "runs:read",
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "runs:control",
          "runs:read",
          "operations:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/balance": {
      "get": {
        "operationId": "getbalance",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "balance:read"
            ]
          }
        ],
        "x-required-scopes": [
          "balance:read"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account": {
      "get": {
        "operationId": "getaccount",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "balance:read"
            ]
          }
        ],
        "x-required-scopes": [
          "balance:read"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "getUsage",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "usage:read"
            ]
          }
        ],
        "x-required-scopes": [
          "usage:read"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "api",
                "mcp"
              ]
            }
          },
          {
            "name": "credential_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-f\\d]{24}$"
            }
          },
          {
            "name": "tool",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "model",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 150
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "accepted",
                "running",
                "needs_review",
                "paused",
                "reconciling",
                "succeeded",
                "failed",
                "cancelled"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 150
            }
          },
          {
            "name": "activity",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "creative",
                "all"
              ]
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "success",
                "error",
                "pending",
                "cancelled"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "default": 40,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/requests": {
      "get": {
        "operationId": "listRequests",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "logs:read"
            ]
          }
        ],
        "x-required-scopes": [
          "logs:read"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "api",
                "mcp"
              ]
            }
          },
          {
            "name": "credential_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-f\\d]{24}$"
            }
          },
          {
            "name": "tool",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "model",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 150
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "accepted",
                "running",
                "needs_review",
                "paused",
                "reconciling",
                "succeeded",
                "failed",
                "cancelled"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 150
            }
          },
          {
            "name": "activity",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "creative",
                "all"
              ]
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "success",
                "error",
                "pending",
                "cancelled"
              ]
            }
          },
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "default": 40,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/requests/{id}": {
      "get": {
        "operationId": "getRequest",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "logs:read"
            ]
          }
        ],
        "x-required-scopes": [
          "logs:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/requests/export": {
      "get": {
        "operationId": "exportRequests",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "logs:read"
            ]
          }
        ],
        "x-required-scopes": [
          "logs:read"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "api",
                "mcp"
              ]
            }
          },
          {
            "name": "credential_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-f\\d]{24}$"
            }
          },
          {
            "name": "tool",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "model",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 150
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "accepted",
                "running",
                "needs_review",
                "paused",
                "reconciling",
                "succeeded",
                "failed",
                "cancelled"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 150
            }
          },
          {
            "name": "activity",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "creative",
                "all"
              ]
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "success",
                "error",
                "pending",
                "cancelled"
              ]
            }
          },
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "default": 40,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/requests/exports": {
      "post": {
        "operationId": "createRequestExport",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "logs:read"
            ]
          }
        ],
        "x-required-scopes": [
          "logs:read"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  "to": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  "channel": {
                    "type": "string",
                    "enum": [
                      "api",
                      "mcp"
                    ]
                  },
                  "credential_id": {
                    "type": "string",
                    "pattern": "^[a-f\\d]{24}$"
                  },
                  "tool": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "model": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 150
                  },
                  "category": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "running",
                      "needs_review",
                      "paused",
                      "reconciling",
                      "succeeded",
                      "failed",
                      "cancelled"
                    ]
                  },
                  "search": {
                    "type": "string",
                    "maxLength": 150
                  },
                  "activity": {
                    "type": "string",
                    "enum": [
                      "creative",
                      "all"
                    ]
                  },
                  "outcome": {
                    "type": "string",
                    "enum": [
                      "success",
                      "error",
                      "pending",
                      "cancelled"
                    ]
                  },
                  "before": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "limit": {
                    "default": 40,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Durably accepted. Poll the original resource.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "enum": [
                        "queued",
                        "running",
                        "ready",
                        "failed"
                      ]
                    },
                    "rows": {
                      "type": "integer"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/requests/exports/{id}": {
      "get": {
        "operationId": "getRequestExport",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "logs:read"
            ]
          }
        ],
        "x-required-scopes": [
          "logs:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/requests/exports/{id}/download": {
      "get": {
        "operationId": "downloadRequestExport",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "logs:read"
            ]
          }
        ],
        "x-required-scopes": [
          "logs:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-endpoints": {
      "get": {
        "operationId": "listWebhookEndpoints",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "webhooks:manage",
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "webhooks:manage",
          "operations:read"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createWebhookEndpoint",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "webhooks:manage",
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "webhooks:manage",
          "operations:read"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2000,
                    "format": "uri"
                  },
                  "events": {
                    "minItems": 1,
                    "maxItems": 14,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "operation.accepted",
                        "operation.started",
                        "operation.running",
                        "operation.reconciling",
                        "operation.review_required",
                        "operation.paused",
                        "operation.succeeded",
                        "operation.failed",
                        "operation.cancelled",
                        "job.updated",
                        "asset.ready",
                        "usage.settled",
                        "usage.updated",
                        "run.updated"
                      ]
                    }
                  }
                },
                "required": [
                  "url",
                  "events"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-endpoints/{id}": {
      "patch": {
        "operationId": "updateWebhookEndpoint",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "webhooks:manage",
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "webhooks:manage",
          "operations:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{24}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2000,
                    "format": "uri"
                  },
                  "events": {
                    "minItems": 1,
                    "maxItems": 14,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "operation.accepted",
                        "operation.started",
                        "operation.running",
                        "operation.reconciling",
                        "operation.review_required",
                        "operation.paused",
                        "operation.succeeded",
                        "operation.failed",
                        "operation.cancelled",
                        "job.updated",
                        "asset.ready",
                        "usage.settled",
                        "usage.updated",
                        "run.updated"
                      ]
                    }
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-endpoints/{id}/rotate-secret": {
      "post": {
        "operationId": "rotateWebhookSecret",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "webhooks:manage",
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "webhooks:manage",
          "operations:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{24}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-endpoints/{id}/deliveries": {
      "get": {
        "operationId": "listWebhookDeliveries",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "webhooks:manage",
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "webhooks:manage",
          "operations:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{24}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-endpoints/{id}/deliveries/{delivery_id}/retry": {
      "post": {
        "operationId": "retryWebhookDelivery",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "webhooks:manage",
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "webhooks:manage",
          "operations:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{24}$"
            }
          },
          {
            "name": "delivery_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/oauth-protected-resource": {
      "get": {
        "security": [],
        "responses": {
          "200": {
            "description": "OAuth discovery metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/oauth-protected-resource/mcp": {
      "get": {
        "security": [],
        "responses": {
          "200": {
            "description": "OAuth discovery metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/oauth-authorization-server": {
      "get": {
        "security": [],
        "responses": {
          "200": {
            "description": "OAuth discovery metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/authorize": {
      "get": {
        "security": [],
        "description": "Authorization code with S256 PKCE and one exact resource. Redirects to Tong human consent.",
        "parameters": [
          {
            "name": "client_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "redirect_uri",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resource",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code_challenge",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code_challenge_method",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "response_type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to Tong consent"
          },
          "400": {
            "description": "OAuth error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/oauth/token": {
      "post": {
        "security": [],
        "description": "OAuth public-client token",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OAuth protocol response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "OAuth error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/oauth/revoke": {
      "post": {
        "security": [],
        "description": "OAuth public-client revoke",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OAuth protocol response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "OAuth error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/oauth/register": {
      "post": {
        "security": [],
        "description": "Optional public-client registration; available only when explicitly enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "client_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "redirect_uris": {
                    "minItems": 1,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "scope": {
                    "type": "string",
                    "maxLength": 3000
                  },
                  "token_endpoint_auth_method": {
                    "default": "none",
                    "type": "string",
                    "const": "none"
                  },
                  "grant_types": {
                    "default": [
                      "authorization_code",
                      "refresh_token"
                    ],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "authorization_code",
                        "refresh_token"
                      ]
                    }
                  },
                  "response_types": {
                    "default": [
                      "code"
                    ],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "const": "code"
                    }
                  }
                },
                "required": [
                  "client_name",
                  "redirect_uris",
                  "scope"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OAuth protocol response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "OAuth error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": []
          }
        ],
        "description": "Stateless Streamable HTTP, SDK 1.32.1, tested profile 2025-11-25. Calls require stable UUID intent metadata. Human review uses the Tong dashboard.",
        "parameters": [
          {
            "name": "MCP-Protocol-Version",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jsonrpc",
                  "method"
                ],
                "properties": {
                  "jsonrpc": {
                    "const": "2.0"
                  },
                  "id": {
                    "type": [
                      "string",
                      "integer"
                    ]
                  },
                  "method": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result including logical isError failures"
          },
          "202": {
            "description": "Notification accepted"
          },
          "401": {
            "description": "Bearer challenge with resource metadata"
          },
          "405": {
            "description": "POST only"
          }
        }
      }
    },
    "/v1/catalog": {
      "get": {
        "security": [],
        "responses": {
          "200": {
            "description": "Dated anonymous customer model, policy and pricing snapshot; authenticated discovery determines current account availability",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/jobs/{id}": {
      "get": {
        "operationId": "getAcceptedJob",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "jobs:read",
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "jobs:read",
          "operations:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{24}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/resources/{id}": {
      "get": {
        "operationId": "readResourceById",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "assets:read",
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "assets:read",
          "operations:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/runs/{id}/reviews/{review_id}": {
      "get": {
        "operationId": "getRunReview",
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": [
              "runs:read",
              "operations:read"
            ]
          }
        ],
        "x-required-scopes": [
          "runs:read",
          "operations:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "review_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned current result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or ownership denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable owned resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Intent conflict or changed target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable dependency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/runs/{id}/reviews/{review_id}/decision": {
      "post": {
        "description": "Bearer clients cannot approve a human review. Use the returned trusted Tong dashboard URL.",
        "responses": {
          "403": {
            "description": "HUMAN_REVIEW_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "developerBearer": []
          },
          {
            "developerOAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "developerBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Personal key or resource-bound OAuth access token."
      },
      "developerOAuth": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://platform.tongai.io/oauth/authorize",
            "tokenUrl": "https://platform.tongai.io/oauth/token",
            "refreshUrl": "https://platform.tongai.io/oauth/token",
            "scopes": {
              "assets:write": "assets:write",
              "catalog:read": "catalog:read",
              "assets:read": "assets:read",
              "projects:read": "projects:read",
              "projects:write": "projects:write",
              "conversations:write": "conversations:write",
              "conversations:read": "conversations:read",
              "generation:read": "generation:read",
              "generation:write": "generation:write",
              "quotes:write": "quotes:write",
              "credits:spend": "credits:spend",
              "films:read": "films:read",
              "films:write": "films:write",
              "films:delete": "films:delete",
              "assembly:write": "assembly:write",
              "analysis:read": "analysis:read",
              "analysis:write": "analysis:write",
              "characters:read": "characters:read",
              "characters:write": "characters:write",
              "locations:write": "locations:write",
              "video_edit:write": "video_edit:write",
              "video_edit:read": "video_edit:read",
              "motion:write": "motion:write",
              "motion:read": "motion:read",
              "lora:write": "lora:write",
              "lora:read": "lora:read",
              "audio:write": "audio:write",
              "assembly:read": "assembly:read",
              "assets:delete": "assets:delete",
              "projects:delete": "projects:delete",
              "characters:delete": "characters:delete",
              "conversations:delete": "conversations:delete",
              "lora:delete": "lora:delete",
              "text:read": "text:read",
              "text:write": "text:write",
              "assistant:run": "assistant:run",
              "filmmaker:run": "filmmaker:run",
              "balance:read": "balance:read",
              "usage:read": "usage:read",
              "logs:read": "logs:read",
              "operations:read": "operations:read",
              "jobs:read": "jobs:read",
              "runs:read": "runs:read",
              "runs:control": "runs:control",
              "webhooks:manage": "webhooks:manage"
            }
          }
        }
      }
    },
    "schemas": {
      "Operation": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "tool": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "channel": {
            "type": "string",
            "enum": [
              "api",
              "mcp"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "waiting",
              "needs_review",
              "paused",
              "reconciling",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "running",
              "needs_review",
              "paused",
              "reconciling",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "stage": {
            "type": "string",
            "enum": [
              "admission",
              "dispatch",
              "review",
              "generation",
              "reconciliation",
              "complete"
            ]
          },
          "dispatch_status": {
            "type": "string",
            "enum": [
              "pending",
              "unknown",
              "acknowledged"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "detail_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "detail_expired": {
            "type": "boolean"
          },
          "timing": {
            "type": "object",
            "properties": {
              "dispatch_started_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "acknowledged_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "completed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dispatch_acknowledgement_ms": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "end_to_end_ms": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "dispatch_started_at",
              "acknowledged_at",
              "completed_at",
              "dispatch_acknowledgement_ms",
              "end_to_end_ms"
            ],
            "additionalProperties": false
          },
          "review": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Operation/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ]
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Operation/$defs/__schema1"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  }
                },
                "required": [
                  "code"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "billing": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "none",
                  "pending",
                  "settled",
                  "released",
                  "reconciling"
                ]
              },
              "usage_credits": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{6}$"
              },
              "wallet_debited_credits": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{6}$"
              },
              "released_credits": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{6}$"
              },
              "refunded_credits": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{6}$"
              },
              "unfunded_credits": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{6}$"
              },
              "pending_credits": {
                "type": "string",
                "pattern": "^\\d+\\.\\d{6}$"
              },
              "tokens": {
                "type": "object",
                "properties": {
                  "input": {
                    "type": "number",
                    "minimum": 0
                  },
                  "output": {
                    "type": "number",
                    "minimum": 0
                  },
                  "cached": {
                    "type": "number",
                    "minimum": 0
                  },
                  "cache_write": {
                    "type": "number",
                    "minimum": 0
                  }
                }
              },
              "components": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "source_id": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "model": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "channel": {
                      "type": "string",
                      "enum": [
                        "api",
                        "mcp"
                      ]
                    },
                    "credential_id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "text_pool",
                        "reasoning",
                        "generation"
                      ]
                    },
                    "usage_credits": {
                      "type": "string",
                      "pattern": "^\\d+\\.\\d{6}$"
                    },
                    "wallet_debited_credits": {
                      "type": "string",
                      "pattern": "^\\d+\\.\\d{6}$"
                    }
                  },
                  "required": [
                    "source_id",
                    "tool",
                    "model",
                    "channel",
                    "credential_id",
                    "kind",
                    "usage_credits",
                    "wallet_debited_credits"
                  ],
                  "additionalProperties": false
                }
              },
              "evidence_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              }
            },
            "required": [
              "status",
              "usage_credits",
              "wallet_debited_credits"
            ],
            "additionalProperties": false
          },
          "quote": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "operation_id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "tool": {
                "type": "string"
              },
              "operation": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "model": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "configuration": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "$ref": "#/components/schemas/Operation/$defs/__schema2"
                }
              },
              "submit_value": {
                "type": "string"
              },
              "submit_field": {
                "type": "string"
              },
              "quoted_credits": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^\\d+\\.\\d{6}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "operation_id",
              "tool",
              "operation",
              "model",
              "configuration",
              "submit_value",
              "submit_field",
              "quoted_credits",
              "expires_at"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "tool",
          "category",
          "channel",
          "state",
          "status",
          "stage",
          "dispatch_status",
          "created_at",
          "updated_at",
          "detail_expires_at",
          "detail_expired",
          "timing",
          "review",
          "result",
          "error",
          "billing"
        ],
        "additionalProperties": false,
        "$defs": {
          "__schema0": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Operation/$defs/__schema0"
                }
              },
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "$ref": "#/components/schemas/Operation/$defs/__schema0"
                }
              }
            ]
          },
          "__schema1": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Operation/$defs/__schema1"
                }
              },
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "$ref": "#/components/schemas/Operation/$defs/__schema1"
                }
              }
            ]
          },
          "__schema2": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Operation/$defs/__schema2"
                }
              },
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "$ref": "#/components/schemas/Operation/$defs/__schema2"
                }
              }
            ]
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error",
          "request_id"
        ],
        "properties": {
          "request_id": {
            "type": "string"
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "request_id",
              "retryable"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "details": {
                "type": "object",
                "properties": {
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ModelCatalog": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "text_models": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "context_tokens": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "max_output_tokens": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "unit": {
                  "type": "string",
                  "const": "THOUSAND_TOKENS"
                },
                "input_credits": {
                  "type": "string",
                  "pattern": "^\\d+\\.\\d{6}$"
                },
                "output_credits": {
                  "type": "string",
                  "pattern": "^\\d+\\.\\d{6}$"
                },
                "cached_input_credits": {
                  "type": "string",
                  "pattern": "^\\d+\\.\\d{6}$"
                },
                "cache_write_credits": {
                  "type": "string",
                  "pattern": "^\\d+\\.\\d{6}$"
                },
                "pricing": {
                  "type": "string",
                  "const": "display_maximum"
                },
                "requires_exact_quote": {
                  "type": "boolean",
                  "const": true
                }
              },
              "required": [
                "id",
                "name",
                "context_tokens",
                "max_output_tokens",
                "unit",
                "input_credits",
                "output_credits",
                "cached_input_credits",
                "cache_write_credits",
                "pricing",
                "requires_exact_quote"
              ],
              "additionalProperties": false
            }
          },
          "workflows": {
            "maxItems": 10000,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "operation": {
                  "type": "string"
                },
                "model": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "model_name": {
                  "type": "string"
                },
                "resolution": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "unit": {
                  "type": "string"
                },
                "credits": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^\\d+\\.\\d{6}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "base_credits": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^\\d+\\.\\d{6}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "requires_exact_quote": {
                  "default": false,
                  "type": "boolean"
                },
                "pricing": {
                  "default": "display_rate",
                  "type": "string",
                  "enum": [
                    "configuration_quote",
                    "display_rate"
                  ]
                },
                "discount_percent": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                }
              },
              "required": [
                "operation",
                "model",
                "name",
                "model_name",
                "resolution",
                "unit",
                "credits",
                "base_credits",
                "discount_percent"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "workflows"
        ],
        "additionalProperties": false
      },
      "Model": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "text_models": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "context_tokens": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "max_output_tokens": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "unit": {
                  "type": "string",
                  "const": "THOUSAND_TOKENS"
                },
                "input_credits": {
                  "type": "string",
                  "pattern": "^\\d+\\.\\d{6}$"
                },
                "output_credits": {
                  "type": "string",
                  "pattern": "^\\d+\\.\\d{6}$"
                },
                "cached_input_credits": {
                  "type": "string",
                  "pattern": "^\\d+\\.\\d{6}$"
                },
                "cache_write_credits": {
                  "type": "string",
                  "pattern": "^\\d+\\.\\d{6}$"
                },
                "pricing": {
                  "type": "string",
                  "const": "display_maximum"
                },
                "requires_exact_quote": {
                  "type": "boolean",
                  "const": true
                }
              },
              "required": [
                "id",
                "name",
                "context_tokens",
                "max_output_tokens",
                "unit",
                "input_credits",
                "output_credits",
                "cached_input_credits",
                "cache_write_credits",
                "pricing",
                "requires_exact_quote"
              ],
              "additionalProperties": false
            }
          },
          "workflows": {
            "maxItems": 10000,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "operation": {
                  "type": "string"
                },
                "model": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "model_name": {
                  "type": "string"
                },
                "resolution": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "unit": {
                  "type": "string"
                },
                "credits": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^\\d+\\.\\d{6}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "base_credits": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^\\d+\\.\\d{6}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "requires_exact_quote": {
                  "default": false,
                  "type": "boolean"
                },
                "pricing": {
                  "default": "display_rate",
                  "type": "string",
                  "enum": [
                    "configuration_quote",
                    "display_rate"
                  ]
                },
                "discount_percent": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                }
              },
              "required": [
                "operation",
                "model",
                "name",
                "model_name",
                "resolution",
                "unit",
                "credits",
                "base_credits",
                "discount_percent"
              ],
              "additionalProperties": false
            }
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "workflows",
          "id"
        ],
        "additionalProperties": false
      }
    }
  }
}
