{
  "description": "The models matching query-models",
  "type": "object",
  "required": [
    "models"
  ],
  "properties": {
    "models": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "One model offered for one capability interface, with the configuration it supports and how to prompt it. Exactly the section that matches the capability interface is present (`speech`, `speechToSpeech`, `image` or `music`).",
        "required": [
          "capabilityInterface",
          "model",
          "displayName",
          "promptingInstructions",
          "provenance"
        ],
        "properties": {
          "capabilityInterface": {
            "type": "string",
            "description": "Canonical name of the capability interface the model serves, for example port1/systems/zero/capability-interfaces/speech-audio-generation."
          },
          "model": {
            "type": "string",
            "description": "The model identifier to pass as `model` in the interface generation message."
          },
          "displayName": {
            "type": "string",
            "description": "Human readable model name."
          },
          "promptingInstructions": {
            "type": "string",
            "description": "Free text on how to prompt the model, for example whether lyrics go in the prompt or in a separate field and which emotion or sound tags the model understands."
          },
          "maxPromptCharacters": {
            "type": "integer",
            "minimum": 1,
            "description": "Longest accepted text or prompt in characters, when the vendor documents one."
          },
          "provenance": {
            "type": "object",
            "description": "Where the catalog entry came from.",
            "required": [
              "sourceUrl",
              "checkedOn"
            ],
            "properties": {
              "sourceUrl": {
                "type": "string",
                "description": "The vendor model page the entry was checked against."
              },
              "checkedOn": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                "description": "The date (YYYY-MM-DD) the entry was last checked."
              }
            },
            "additionalProperties": false,
            "title": "ModelProvenance"
          },
          "speech": {
            "type": "object",
            "description": "Text to speech configuration.",
            "properties": {
              "voices": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Voices the model offers."
              },
              "defaultVoice": {
                "type": "string",
                "description": "The voice the vendor uses when `voice` is omitted, when the vendor documents one."
              },
              "customVoicesAccepted": {
                "type": "boolean",
                "description": "True when `voice` also accepts a voice name that is not in `voices`."
              },
              "soundTags": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Emotion or sound tags the model documents, written exactly as they appear inline in the text, for example [whispering] or <laugh>. The list is documented examples, not a filter; the model may understand more."
              },
              "supportsStyleInstructions": {
                "type": "boolean",
                "description": "True when `styleInstructions` steers the delivery."
              }
            },
            "additionalProperties": false,
            "title": "ModelSpeechConfiguration"
          },
          "speechToSpeech": {
            "type": "object",
            "description": "Speech to speech (voice conversion) configuration.",
            "required": [
              "inputAudio",
              "speakerReference"
            ],
            "properties": {
              "inputAudio": {
                "type": "object",
                "description": "What an audio input accepts.",
                "required": [
                  "formats"
                ],
                "properties": {
                  "formats": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Accepted media types of the input."
                  },
                  "minSeconds": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Shortest accepted duration, when the model has one."
                  },
                  "maxSeconds": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Longest accepted duration, when the model has one."
                  },
                  "maxBytes": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "Largest accepted input in decoded bytes."
                  }
                },
                "additionalProperties": false,
                "title": "AudioInputLimits"
              },
              "speakerReference": {
                "type": "object",
                "description": "Reference audio of the voice to convert to.",
                "required": [
                  "supported"
                ],
                "properties": {
                  "supported": {
                    "type": "boolean",
                    "description": "True when `speakerReference` is accepted."
                  },
                  "limits": {
                    "$ref": "#/properties/models/items/properties/speechToSpeech/properties/inputAudio"
                  }
                },
                "additionalProperties": false,
                "title": "ModelSpeakerReference"
              },
              "voices": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Preset target voices; `voice` selects one when no speaker reference is given."
              }
            },
            "additionalProperties": false,
            "title": "ModelSpeechToSpeechConfiguration"
          },
          "image": {
            "type": "object",
            "description": "Image generation configuration.",
            "properties": {
              "aspectRatios": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Accepted values of `aspectRatio`, written as width:height."
              },
              "arbitraryAspectRatio": {
                "type": "boolean",
                "description": "True when any width:height ratio is accepted, not only `aspectRatios`."
              },
              "resolutions": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "Output resolution tier of a generated image. STANDARD is about 1 megapixel (a 1K tier), HIGH is about 2K and ULTRA is about 4K. A model lists the tiers it supports in the model catalog.",
                  "enum": [
                    "STANDARD",
                    "HIGH",
                    "ULTRA"
                  ]
                },
                "description": "Accepted values of `resolution`."
              },
              "defaultAspectRatio": {
                "type": "string",
                "description": "The ratio the vendor uses when `aspectRatio` is omitted, when it documents one."
              }
            },
            "additionalProperties": false,
            "title": "ModelImageConfiguration"
          },
          "music": {
            "type": "object",
            "description": "Music generation configuration.",
            "required": [
              "supportsLyrics",
              "supportsGenres",
              "supportsVocalGender",
              "supportsDuration"
            ],
            "properties": {
              "supportsLyrics": {
                "type": "boolean",
                "description": "True when `lyrics` is accepted as a separate field. When false, put the lyrics in the prompt."
              },
              "supportsGenres": {
                "type": "boolean",
                "description": "True when `genres` is accepted. When false, name the genre in the prompt."
              },
              "genres": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Accepted values of `genres`. Empty when `genres` is unsupported."
              },
              "supportsVocalGender": {
                "type": "boolean",
                "description": "True when `vocalGender` is accepted."
              },
              "supportsDuration": {
                "type": "boolean",
                "description": "True when `durationSeconds` is accepted."
              },
              "maxDurationSeconds": {
                "type": "integer",
                "minimum": 1,
                "description": "Longest accepted `durationSeconds`, when the model takes a duration."
              },
              "maxLyricsCharacters": {
                "type": "integer",
                "minimum": 1,
                "description": "Longest accepted `lyrics`, when the vendor documents one."
              }
            },
            "additionalProperties": false,
            "title": "ModelMusicConfiguration"
          }
        },
        "additionalProperties": false,
        "title": "ModelDescriptor"
      }
    }
  },
  "additionalProperties": false
}
