{
  "openapi": "3.1.0",
  "info": {
    "title": "NiceVois Agent API",
    "version": "0.4.0",
    "description": "A focused REST and MCP API for agents. Four free audio tools need no account: split a song into vocals and instrumental, split lead from backing vocals, remove background noise, and remove reverb. With an account, agents train private portable RVC v2 voices or convert vocals with a private NiceVois-trained or uploaded model; conversion returns normal RVC and NiceVois cleaned audio.",
    "termsOfService": "https://nicevois.com/terms",
    "contact": {
      "name": "NiceVois",
      "url": "https://nicevois.com/contact"
    }
  },
  "x-nicevois-mcp": {
    "url": "https://nicevois.com/api/mcp",
    "conversionTools": [
      "get_conversion_requirements",
      "list_voice_models",
      "create_voice_model_import",
      "create_voice_conversion",
      "get_voice_conversion",
      "download_voice_conversion_output"
    ],
    "conversionOutputs": [
      "Normal RVC",
      "NiceVois cleaned"
    ],
    "wholeSongCover": {
      "status": "private_preview",
      "agentSupport": "discovery_only",
      "guideUrl": "https://nicevois.com/suno-voice-changer"
    },
    "freeAudioTools": [
      "list_free_audio_tools",
      "create_free_audio_job",
      "get_free_audio_job"
    ]
  },
  "servers": [
    {
      "url": "https://nicevois.com"
    }
  ],
  "tags": [
    {
      "name": "Discovery",
      "description": "Public service requirements and workflow."
    },
    {
      "name": "Free audio tools",
      "description": "Stem separation, lead and backing vocal splitting, noise removal and reverb removal. Each tool includes its own 10 free minutes per rolling 24 hours; no account or key needed."
    },
    {
      "name": "Account",
      "description": "Authenticated free-run, balance, and quote state."
    },
    {
      "name": "Training",
      "description": "Authenticated private training jobs."
    },
    {
      "name": "Conversion",
      "description": "Authenticated private voice models and vocal conversion jobs."
    }
  ],
  "paths": {
    "/api/agent/v1/capabilities": {
      "get": {
        "operationId": "getTrainingRequirements",
        "summary": "Get RVC training requirements",
        "description": "Call before creating a job. Returns supported inputs, limits, outputs, retention, and the exact workflow.",
        "tags": [
          "Discovery"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Current NiceVois training capabilities.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Capabilities"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/audio-tools": {
      "get": {
        "operationId": "listFreeAudioTools",
        "summary": "List the free audio tools",
        "description": "Free, no account. Returns each tool, the accepted formats, the workflow, and the website page to give a user when the agent cannot upload their file.",
        "tags": [
          "Free audio tools"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "The free audio tools.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AudioToolCapabilities"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/audio-jobs": {
      "post": {
        "operationId": "createFreeAudioJob",
        "summary": "Split or clean up audio for free",
        "description": "Use when the user wants stems (vocals and instrumental), an acapella or karaoke instrumental, the lead vocal apart from the backing vocals, or noise or reverb removed. Each tool includes its own 10 free minutes per rolling 24 hours; no account needed. Returns a one-time upload URL: PUT the file bytes to it, then poll links.status.",
        "tags": [
          "Free audio tools"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tool",
                  "fileName",
                  "sizeBytes"
                ],
                "properties": {
                  "tool": {
                    "type": "string",
                    "enum": [
                      "split_stems",
                      "split_lead_backing",
                      "remove_noise",
                      "remove_reverb"
                    ],
                    "description": "split_stems: vocals and instrumental. split_lead_backing: lead vocal, backing vocals, instrumental, and instrumental with backing vocals. remove_noise: background noise out of a voice recording. remove_reverb: room echo and reverb out of a voice recording."
                  },
                  "fileName": {
                    "type": "string",
                    "maxLength": 180,
                    "description": "The file name with its extension: WAV, MP3, FLAC, M4A or OGG."
                  },
                  "sizeBytes": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "The exact file size in bytes."
                  },
                  "durationSeconds": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 86400,
                    "description": "Optional. NiceVois measures the file itself after upload."
                  },
                  "outputFormat": {
                    "type": "string",
                    "enum": [
                      "wav",
                      "flac",
                      "mp3",
                      "ogg"
                    ],
                    "default": "wav"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The job, waiting for its upload.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AudioJob"
                }
              }
            }
          },
          "400": {
            "description": "The request was not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AudioToolError"
                }
              }
            }
          },
          "413": {
            "description": "The file is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AudioToolError"
                }
              }
            }
          },
          "429": {
            "description": "Too many jobs from one network in an hour.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AudioToolError"
                }
              }
            }
          },
          "503": {
            "description": "The tools are briefly unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AudioToolError"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/audio-jobs/{jobId}": {
      "get": {
        "operationId": "getFreeAudioJob",
        "summary": "Check a free audio job",
        "description": "Poll no more than every 10 seconds. When status is completed, outputs lists every file with a download link.",
        "tags": [
          "Free audio tools"
        ],
        "security": [],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "description": "The id returned when the job was created. It is the only key to the job and its files.",
            "schema": {
              "type": "string",
              "pattern": "^sep_[slnr]_[a-f0-9]{32}_[a-f0-9]{24}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The job.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AudioJob"
                }
              }
            }
          },
          "404": {
            "description": "No job has that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AudioToolError"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/audio-jobs/{jobId}/stems/{stem}": {
      "get": {
        "operationId": "downloadFreeAudioOutput",
        "summary": "Download one output",
        "description": "Redirects to a short-lived link to the audio file. Free; fetching it again is allowed.",
        "tags": [
          "Free audio tools"
        ],
        "security": [],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "description": "The id returned when the job was created. It is the only key to the job and its files.",
            "schema": {
              "type": "string",
              "pattern": "^sep_[slnr]_[a-f0-9]{32}_[a-f0-9]{24}$"
            }
          },
          {
            "name": "stem",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "vocal",
                "backing_vocals",
                "instrumental",
                "backing_instrumental",
                "clean",
                "removed"
              ]
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to the audio file."
          },
          "400": {
            "description": "That output does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AudioToolError"
                }
              }
            }
          },
          "404": {
            "description": "No job has that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AudioToolError"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/account": {
      "get": {
        "operationId": "getTrainingAccount",
        "summary": "Get welcome credit and training balance",
        "description": "Call before quoting or creating a job. Returns the connected account's welcome-credit status, balance, available packs, and a private browser handoff that keeps checkout on this same agent identity.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Current connected NiceVois account state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrainingAccount"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/api/agent/v1/quote": {
      "post": {
        "operationId": "quoteTraining",
        "summary": "Quote one RVC training job",
        "description": "Call after inspecting the audio and before creating a job. Returns the exact price, welcome-credit effect, balance, shortfall, feasibility, and a private balance-page link when needed.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "durationSeconds",
                  "epochs"
                ],
                "properties": {
                  "durationSeconds": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "epochs": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Exact quote for the connected account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrainingQuote"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/api/agent/v1/jobs": {
      "get": {
        "operationId": "listTrainingJobs",
        "summary": "List the authenticated user's recent jobs",
        "tags": [
          "Training"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Private jobs for this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "jobs"
                  ],
                  "properties": {
                    "jobs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TrainingJob"
                      }
                    },
                    "retentionDays": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "operationId": "createTrainingJob",
        "summary": "Create a private RVC training upload",
        "description": "Creates a job and a one-time HTTP PUT upload URL. This does not start GPU work. NiceVois remembers a versioned standing account agreement; include acceptsStandingAgreement only after an explicit first acceptance or a material agreement update.",
        "tags": [
          "Training"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTrainingJob"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Job created; upload the exact audio bytes to upload.url, then start the job.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrainingJob"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          }
        }
      }
    },
    "/api/agent/v1/jobs/{jobId}": {
      "get": {
        "operationId": "getTrainingJob",
        "summary": "Check one training job",
        "description": "Returns truthful status, epoch progress, ETA, and completed artifacts. Poll no more than once every 15 seconds.",
        "tags": [
          "Training"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "responses": {
          "200": {
            "description": "Current private job state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrainingJob"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/agent/v1/jobs/{jobId}/start": {
      "post": {
        "operationId": "startTraining",
        "summary": "Start uploaded RVC training",
        "description": "Call only after the audio PUT completed successfully. This starts cloud compute.",
        "tags": [
          "Training"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "responses": {
          "202": {
            "description": "Training accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrainingJob"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/agent/v1/conversion/capabilities": {
      "get": {
        "operationId": "getConversionRequirements",
        "summary": "Get RVC voice conversion requirements",
        "description": "Call before converting a vocal. Returns supported source audio and model inputs, pitch-shift limits, current pricing state, outputs, and the exact workflow.",
        "tags": [
          "Discovery",
          "Conversion"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Current NiceVois conversion capabilities.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversionCapabilities"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/v1/voices": {
      "get": {
        "operationId": "listVoiceModels",
        "summary": "List private RVC voice models",
        "description": "Call before asking the user for a model ID. Returns private voices trained in NiceVois and private RVC models uploaded by this connected account.",
        "tags": [
          "Conversion"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Private voice models for this credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceModelList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/api/agent/v1/model-imports": {
      "post": {
        "operationId": "createVoiceModelImport",
        "summary": "Prepare a private RVC model upload",
        "description": "Creates a private model import and returns a one-time HTTP PUT upload instruction for a .pth or complete model ZIP. After uploading, list voices again to select the imported model.",
        "tags": [
          "Conversion"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateModelImport"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Private model upload prepared.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingUpload"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/api/agent/v1/conversions": {
      "post": {
        "operationId": "createVoiceConversion",
        "summary": "Create an RVC vocal conversion",
        "description": "Creates one private conversion and returns a one-time HTTP PUT source-vocal upload instruction. Upload the vocal, then check the returned conversion ID no more than every 10 seconds.",
        "tags": [
          "Conversion"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConversion"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Conversion created; upload the exact source vocal to upload.url.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversionJob"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/api/agent/v1/conversions/{conversionId}": {
      "get": {
        "operationId": "getVoiceConversion",
        "summary": "Check an RVC vocal conversion",
        "description": "Returns truthful conversion status and stage. When complete, outputs contains separate normal RVC and NiceVois cleaned listening URLs. Authorize a selected download with the downloads operation.",
        "tags": [
          "Conversion"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ConversionId"
          }
        ],
        "responses": {
          "200": {
            "description": "Current private conversion state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversionJob"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/agent/v1/conversions/{conversionId}/downloads": {
      "post": {
        "operationId": "downloadVoiceConversionOutput",
        "summary": "Authorize one voice-conversion download",
        "description": "Returns a short-lived download URL and deducts the source audio duration from conversion-download minutes. Normal and cleaned files both count. Set confirmRepeat only after the user confirms downloading the exact same artifact again.",
        "tags": [
          "Conversion"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ConversionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConversionDownload"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Download authorized and metered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversionDownload"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The exact artifact was already downloaded and needs explicit repeat confirmation."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "OAuth 2.1 access token",
        "description": "OAuth-connected NiceVois access token. A manually issued developer-preview credential may use the same header. Never place either credential in prompts, logs, URLs, or tool output."
      }
    },
    "parameters": {
      "JobId": {
        "name": "jobId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "maxLength": 120
        }
      },
      "ConversionId": {
        "name": "conversionId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "maxLength": 120
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid input or missing consent.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "PaymentRequired": {
        "description": "The connected account needs more training balance. The error includes the exact shortfall and a short-lived same-account browser link.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing or invalid NiceVois agent credential.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "The private job was not found for this credential.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Capabilities": {
        "type": "object",
        "required": [
          "service",
          "workflow",
          "supportedFormats",
          "minEpochs",
          "maxEpochs",
          "maxDurationSeconds",
          "maxAudioBytes",
          "outputs",
          "retentionDays",
          "freeAllowance",
          "paidTraining",
          "consentModel",
          "consentVersion",
          "agreementUrl"
        ],
        "properties": {
          "service": {
            "type": "string"
          },
          "workflow": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "supportedFormats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "minEpochs": {
            "type": "integer"
          },
          "maxEpochs": {
            "type": "integer"
          },
          "maxDurationSeconds": {
            "type": "integer"
          },
          "maxAudioBytes": {
            "type": "integer"
          },
          "outputs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "retentionDays": {
            "type": "integer"
          },
          "authentication": {
            "type": "string"
          },
          "freeAllowance": {
            "$ref": "#/components/schemas/FreeAllowance"
          },
          "paidTraining": {
            "$ref": "#/components/schemas/PaidTraining"
          },
          "consentModel": {
            "type": "string"
          },
          "consentVersion": {
            "type": "string"
          },
          "agreementUrl": {
            "type": "string",
            "format": "uri"
          },
          "mcpEndpoint": {
            "type": "string",
            "format": "uri"
          },
          "openApiUrl": {
            "type": "string",
            "format": "uri"
          },
          "documentationUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "FreeAllowance": {
        "type": "object",
        "required": [
          "anonymousWebsiteRuns",
          "connectedAccountRuns",
          "maxEpochs",
          "maxDurationSeconds",
          "codingAgentOAuthCountsAsConnectedAccount"
        ],
        "properties": {
          "anonymousWebsiteRuns": {
            "type": "integer"
          },
          "connectedAccountRuns": {
            "type": "integer"
          },
          "maxEpochs": {
            "type": "integer"
          },
          "maxDurationSeconds": {
            "type": "integer"
          },
          "codingAgentOAuthCountsAsConnectedAccount": {
            "type": "boolean"
          }
        }
      },
      "PaidTraining": {
        "type": "object",
        "required": [
          "enabled",
          "currency",
          "balanceType",
          "quoteBeforeUpload",
          "maxEpochs",
          "maxDurationSeconds",
          "accountStatusTool",
          "quoteTool"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "currency": {
            "type": "string"
          },
          "balanceType": {
            "type": "string"
          },
          "quoteBeforeUpload": {
            "type": "boolean"
          },
          "maxEpochs": {
            "type": "integer"
          },
          "maxDurationSeconds": {
            "type": "integer"
          },
          "accountStatusTool": {
            "type": "string"
          },
          "quoteTool": {
            "type": "string"
          }
        }
      },
      "BalanceProduct": {
        "type": "object",
        "required": [
          "id",
          "name",
          "balanceCents",
          "priceUsd"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "balanceCents": {
            "type": "integer"
          },
          "priceUsd": {
            "type": "number"
          }
        }
      },
      "TrainingAccount": {
        "type": "object",
        "required": [
          "freeRuns",
          "checkoutEnabled",
          "accountUrl"
        ],
        "properties": {
          "freeRuns": {
            "type": "object",
            "required": [
              "total",
              "used",
              "remaining"
            ],
            "properties": {
              "total": {
                "type": "integer"
              },
              "used": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "remaining": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          },
          "freeRunMaxEpochs": {
            "type": "integer"
          },
          "freeRunMaxDurationSeconds": {
            "type": "integer"
          },
          "signedIn": {
            "type": "boolean"
          },
          "balance": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "purchasedCents",
                  "spentCents",
                  "reservedCents",
                  "availableCents"
                ],
                "properties": {
                  "purchasedCents": {
                    "type": "integer"
                  },
                  "spentCents": {
                    "type": "integer"
                  },
                  "reservedCents": {
                    "type": "integer"
                  },
                  "availableCents": {
                    "type": "integer"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "checkoutEnabled": {
            "type": "boolean"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BalanceProduct"
            }
          },
          "accountUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Short-lived private browser handoff for this same agent identity. Show it only to the authenticated user."
          }
        }
      },
      "TrainingQuote": {
        "type": "object",
        "required": [
          "currency",
          "durationSeconds",
          "epochs",
          "payableCents",
          "freeRunApplied",
          "shortfallCents",
          "canStart"
        ],
        "properties": {
          "currency": {
            "type": "string"
          },
          "durationSeconds": {
            "type": "number"
          },
          "epochs": {
            "type": "integer"
          },
          "quotedPriceCents": {
            "type": "integer"
          },
          "payableCents": {
            "type": "integer"
          },
          "freeRunApplied": {
            "type": "boolean"
          },
          "subscriptionCreditAppliedCents": {
            "type": "integer"
          },
          "subscriptionCreditRemainingCents": {
            "type": "integer"
          },
          "balanceBeforeCents": {
            "type": "integer"
          },
          "balanceAfterCents": {
            "type": "integer"
          },
          "shortfallCents": {
            "type": "integer"
          },
          "canStart": {
            "type": "boolean"
          },
          "accountUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "recommendedProduct": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BalanceProduct"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "CreateTrainingJob": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "fileName",
          "contentType",
          "sizeBytes",
          "durationSeconds",
          "epochs",
          "modelName",
          "submissionId"
        ],
        "properties": {
          "fileName": {
            "type": "string",
            "maxLength": 255,
            "description": "Original WAV, MP3, FLAC, M4A, or OGG filename."
          },
          "contentType": {
            "type": "string",
            "maxLength": 120
          },
          "sizeBytes": {
            "type": "integer",
            "minimum": 1
          },
          "durationSeconds": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "epochs": {
            "type": "integer",
            "description": "Use the current limits returned by getTrainingRequirements."
          },
          "modelName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "submissionId": {
            "type": "string",
            "minLength": 8,
            "maxLength": 80,
            "description": "A client-generated idempotency identifier."
          },
          "acceptsStandingAgreement": {
            "const": true,
            "description": "Set only after the user explicitly accepts the linked standing voice-training agreement. Omit when the current agreement is already recorded for the account."
          }
        }
      },
      "TrainingJob": {
        "type": "object",
        "required": [
          "id",
          "status",
          "currentEpoch",
          "links"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "modelName": {
            "type": [
              "string",
              "null"
            ]
          },
          "epochs": {
            "type": [
              "integer",
              "null"
            ]
          },
          "currentEpoch": {
            "type": [
              "integer",
              "null"
            ]
          },
          "durationSeconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "startedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "estimatedCompletionAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "estimatedRemainingSeconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "etaText": {
            "type": [
              "string",
              "null"
            ]
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "subscriptionCreditCents": {
            "type": "integer"
          },
          "balanceDueCents": {
            "type": "integer"
          },
          "upload": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/UploadInstruction"
              },
              {
                "type": "null"
              }
            ]
          },
          "artifacts": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Artifacts"
              },
              {
                "type": "null"
              }
            ]
          },
          "links": {
            "type": "object",
            "required": [
              "status",
              "start"
            ],
            "properties": {
              "status": {
                "type": "string",
                "format": "uri"
              },
              "start": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      },
      "ConversionCapabilities": {
        "type": "object",
        "required": [
          "service",
          "workflow",
          "sourceAudioFormats",
          "modelInputs",
          "transposeSemitones",
          "outputs",
          "pricing",
          "wholeSongCover",
          "authentication"
        ],
        "properties": {
          "service": {
            "type": "string"
          },
          "workflow": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sourceAudioFormats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "modelInputs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxSourceAudioBytes": {
            "type": "integer"
          },
          "maxImportedModelBytes": {
            "type": "integer"
          },
          "transposeSemitones": {
            "type": "object",
            "required": [
              "min",
              "max",
              "default"
            ],
            "properties": {
              "min": {
                "type": "integer"
              },
              "max": {
                "type": "integer"
              },
              "default": {
                "type": "integer"
              }
            }
          },
          "outputs": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "name",
                "description"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              }
            }
          },
          "pricing": {
            "type": "object",
            "required": [
              "mode",
              "wallet",
              "message"
            ],
            "properties": {
              "mode": {
                "type": "string"
              },
              "wallet": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          },
          "wholeSongCover": {
            "type": "object",
            "required": [
              "status",
              "agentSupport",
              "availability",
              "plannedInputs",
              "pipeline",
              "diyGuideUrl"
            ],
            "properties": {
              "status": {
                "const": "private_preview"
              },
              "agentSupport": {
                "const": "discovery_only"
              },
              "availability": {
                "type": "string"
              },
              "plannedInputs": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "pipeline": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "diyGuideUrl": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "authentication": {
            "type": "string"
          },
          "mcpEndpoint": {
            "type": "string",
            "format": "uri"
          },
          "openApiUrl": {
            "type": "string",
            "format": "uri"
          },
          "documentationUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "VoiceModel": {
        "type": "object",
        "required": [
          "id",
          "name",
          "source",
          "hasIndex"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "source": {
            "enum": [
              "trained",
              "uploaded"
            ]
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "hasIndex": {
            "type": "boolean"
          },
          "epochs": {
            "type": [
              "integer",
              "null"
            ]
          },
          "durationSeconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "sourceType": {
            "type": [
              "string",
              "null"
            ]
          },
          "sizeBytes": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      },
      "VoiceModelList": {
        "type": "object",
        "required": [
          "models",
          "usedToday"
        ],
        "properties": {
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VoiceModel"
            }
          },
          "dailyLimit": {
            "type": [
              "integer",
              "null"
            ]
          },
          "usedToday": {
            "type": "integer"
          },
          "billing": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "allowance": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          }
        }
      },
      "CreateModelImport": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "fileName",
          "sizeBytes"
        ],
        "properties": {
          "fileName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Original .pth or .zip filename."
          },
          "sizeBytes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 524288000
          }
        }
      },
      "CreateConversion": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "modelId",
          "fileName",
          "durationSeconds"
        ],
        "properties": {
          "modelId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "A private id returned by listVoiceModels."
          },
          "fileName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Original WAV, MP3, FLAC, M4A, or OGG source-vocal filename."
          },
          "sizeBytes": {
            "type": "integer",
            "minimum": 1,
            "description": "Exact source-audio byte size used to verify and resume private uploads."
          },
          "durationSeconds": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 86400,
            "description": "Measured duration used to verify that the account can retrieve the result before cloud work."
          },
          "transpose": {
            "type": "integer",
            "minimum": -24,
            "maximum": 24,
            "default": 0
          }
        }
      },
      "PendingUpload": {
        "type": "object",
        "required": [
          "id",
          "status",
          "upload"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "upload": {
            "$ref": "#/components/schemas/UploadInstruction"
          }
        }
      },
      "ConversionOutput": {
        "type": "object",
        "required": [
          "listenUrl"
        ],
        "properties": {
          "listenUrl": {
            "type": "string",
            "format": "uri"
          },
          "downloadUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          }
        }
      },
      "CreateConversionDownload": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind"
        ],
        "properties": {
          "kind": {
            "enum": [
              "cleaned",
              "normal"
            ]
          },
          "confirmRepeat": {
            "type": "boolean",
            "default": false
          },
          "eventId": {
            "type": "string",
            "minLength": 8,
            "maxLength": 80,
            "pattern": "^[A-Za-z0-9_-]+$"
          }
        }
      },
      "ConversionDownload": {
        "type": "object",
        "required": [
          "accepted",
          "downloadUrl",
          "downloadCount",
          "secondsCharged"
        ],
        "properties": {
          "accepted": {
            "type": "boolean"
          },
          "downloadUrl": {
            "type": "string",
            "format": "uri"
          },
          "downloadCount": {
            "type": "integer"
          },
          "secondsCharged": {
            "type": "integer"
          }
        }
      },
      "ConversionJob": {
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "modelName": {
            "type": [
              "string",
              "null"
            ]
          },
          "fileName": {
            "type": [
              "string",
              "null"
            ]
          },
          "transpose": {
            "type": [
              "integer",
              "null"
            ]
          },
          "stage": {
            "type": [
              "string",
              "null"
            ]
          },
          "stageMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "providerState": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "upload": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/UploadInstruction"
              },
              {
                "type": "null"
              }
            ]
          },
          "outputs": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "normal",
                  "cleaned"
                ],
                "properties": {
                  "normal": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ConversionOutput"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "cleaned": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ConversionOutput"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "timings": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "restoration": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          }
        }
      },
      "UploadInstruction": {
        "type": "object",
        "required": [
          "method",
          "url",
          "headers"
        ],
        "properties": {
          "method": {
            "const": "PUT"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "Artifact": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "sizeBytes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "downloadUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Artifacts": {
        "type": "object",
        "properties": {
          "pth": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Artifact"
              },
              {
                "type": "null"
              }
            ]
          },
          "index": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Artifact"
              },
              {
                "type": "null"
              }
            ]
          },
          "package": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Artifact"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "requiredCents": {
            "type": "integer"
          },
          "availableCents": {
            "type": "integer"
          },
          "shortfallCents": {
            "type": "integer"
          },
          "accountUrl": {
            "type": "string",
            "format": "uri"
          },
          "recommendedProduct": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BalanceProduct"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "AudioToolError": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "AudioToolCapabilities": {
        "type": "object",
        "properties": {
          "service": {
            "type": "string"
          },
          "price": {
            "const": "free"
          },
          "accountRequired": {
            "const": false
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "websiteUrl": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "inputFormats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "outputFormats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxAudioBytes": {
            "type": "integer"
          },
          "workflow": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "noFileAccess": {
            "type": "string"
          }
        }
      },
      "AudioJob": {
        "type": "object",
        "required": [
          "id",
          "tool",
          "status",
          "price",
          "outputs",
          "websiteUrl",
          "links"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "tool": {
            "type": "string"
          },
          "toolName": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "awaiting_upload",
              "running",
              "completed",
              "failed",
              "cancelled"
            ]
          },
          "stage": {
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "fileName": {
            "type": [
              "string",
              "null"
            ]
          },
          "durationSeconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "price": {
            "const": "free"
          },
          "upload": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "required": [
                  "method",
                  "url",
                  "headers"
                ],
                "properties": {
                  "method": {
                    "const": "PUT"
                  },
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "headers": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "receivedBytes": {
                    "type": "integer"
                  }
                }
              }
            ]
          },
          "outputs": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "stem",
                "name",
                "downloadUrl"
              ],
              "properties": {
                "stem": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "downloadUrl": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "pollAfterSeconds": {
            "type": [
              "integer",
              "null"
            ]
          },
          "websiteUrl": {
            "type": "string",
            "format": "uri"
          },
          "links": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}
