{
  "description": "Converts the voice in input audio to another voice, keeping the words and delivery. Both audio inputs carry base64 data, at most 5.5 MiB decoded each so that two of them fit the 16 MiB request body, and inputAudio at most 60 seconds; url inputs are rejected (a URL input would need host rules for caller-supplied addresses and is a follow-up).",
  "type": "object",
  "required": [
    "model",
    "inputAudio"
  ],
  "properties": {
    "model": {
      "type": "string",
      "description": "Model identifier from the model catalog (query-models). An unknown model is rejected."
    },
    "inputAudio": {
      "type": "object",
      "description": "One binary media result (audio or image). Exactly one of `data` (base64, inline) or `url` (a short-lived Port OS URL with its `expiresAt`) is present; the host rejects a result that carries both or neither. A plugin may return the vendor's fetchable `url` without `expiresAt`; the host always fetches it, republishes or inlines the bytes as the caller's `responseFormat` asks, and fills `byteLength`, so callers never see a vendor URL.",
      "properties": {
        "mimeType": {
          "type": "string",
          "description": "The media type of the bytes.",
          "enum": [
            "audio/mpeg",
            "audio/wav",
            "audio/ogg",
            "audio/flac",
            "image/png",
            "image/jpeg",
            "image/webp"
          ],
          "example": "audio/mpeg"
        },
        "byteLength": {
          "type": "integer",
          "minimum": 1,
          "maximum": 26214400,
          "description": "Size of the decoded bytes. Always present on host responses."
        },
        "durationMs": {
          "type": "integer",
          "minimum": 0,
          "description": "Duration of audio in milliseconds, when known."
        },
        "width": {
          "type": "integer",
          "minimum": 1,
          "description": "Image width in pixels, when known."
        },
        "height": {
          "type": "integer",
          "minimum": 1,
          "description": "Image height in pixels, when known."
        },
        "url": {
          "type": "string",
          "description": "Short-lived URL of the media (valid until `expiresAt`, at most 10 minutes)."
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time",
          "description": "When `url` stops working. Present with `url` on host responses."
        },
        "data": {
          "type": "string",
          "format": "byte",
          "maxLength": 13981016,
          "description": "Base64 encoded bytes, at most 10 MiB decoded."
        }
      },
      "required": [
        "mimeType"
      ],
      "additionalProperties": false,
      "title": "MediaContent"
    },
    "speakerReference": {
      "$ref": "#/properties/inputAudio"
    },
    "voice": {
      "type": "string",
      "description": "A preset target voice from the model catalog entry, used when no speakerReference is given"
    },
    "responseFormat": {
      "type": "string",
      "description": "How a request wants binary media (audio or image) returned. URL returns a short-lived signed URL hosted by Port OS (at most 10 minutes), never the vendor's own link. BASE64 returns the bytes inline as base64 and fails with a typed error above 10 MiB, in which case use URL.",
      "enum": [
        "URL",
        "BASE64"
      ],
      "default": "URL"
    }
  },
  "additionalProperties": false
}
