{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nopaque-co-uk/json-schema/nopaque-co-uk-language-catalogue-schema.json",
  "title": "LanguageCatalogue",
  "description": "Both language sets, side by side — what `GET /languages` returns.\n\nServed as two fields on purpose. The sets are DISTINCT and not interchangeable: a\nclient that flattens them into one list has misread this response and will send\ncodes that 400. Pick the set by what the value configures, not by how the code looks.\n",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nopaque-co-uk-languages-api-openapi.yml#/components/schemas/LanguageCatalogue",
  "type": "object",
  "required": [
    "transcription",
    "call"
  ],
  "properties": {
    "transcription": {
      "$ref": "#/$defs/TranscriptionLanguageSet"
    },
    "call": {
      "$ref": "#/$defs/CallLanguageSet"
    }
  },
  "$defs": {
    "CallLanguage": {
      "type": "string",
      "enum": [
        "en",
        "multi",
        "es",
        "fr",
        "de",
        "it",
        "pt",
        "nl",
        "hi",
        "ru",
        "ja"
      ],
      "description": "The language a mission test call is held in. These are the languages\nTelnyx `deepgram/flux` accepts on the AI Assistant: one language, or\n`multi` (Flux-multi), which code-switches across the other ten. Absent\nmeans English. Mirrors `api/packages/schemas/entities/callLanguage.ts`\n(Zod). Distinct from the transcription languages standard tests and\nmapping use (`en-GB` etc.).\n"
    },
    "CallLanguageEntry": {
      "type": "object",
      "description": "One call language — its code, its label, and the live model it runs on.",
      "required": [
        "code",
        "label",
        "model",
        "codeSwitching"
      ],
      "properties": {
        "code": {
          "allOf": [
            {
              "$ref": "#/$defs/CallLanguage"
            }
          ],
          "description": "The value to send as `language` on a mission test."
        },
        "label": {
          "type": "string",
          "description": "The customer-facing name, safe to show as-is. Unique within the set."
        },
        "model": {
          "type": "string",
          "enum": [
            "flux",
            "flux-multi"
          ],
          "description": "The live model this language runs on. Informational, as with `models` above:\nnopaque selects it, and no request or response carries a model field.\n"
        },
        "codeSwitching": {
          "type": "boolean",
          "description": "True only for `multi`, which switches language within one call."
        }
      }
    },
    "CallLanguageSet": {
      "type": "object",
      "description": "The call languages, with the code used when a request gives none.",
      "required": [
        "default",
        "languages"
      ],
      "properties": {
        "default": {
          "allOf": [
            {
              "$ref": "#/$defs/CallLanguage"
            }
          ],
          "description": "The language a mission test is spoken in when the field is absent. Absent means\nEnglish, so this is the explicit form of the same thing rather than a separate\n\"unset\" value.\n"
        },
        "languages": {
          "type": "array",
          "description": "Every call language, in the order a picker should show them.",
          "items": {
            "$ref": "#/$defs/CallLanguageEntry"
          }
        }
      }
    },
    "TranscriptionLanguage": {
      "type": "string",
      "description": "The transcription language of a STANDARD test or a MAPPING run — the\nlanguage the callee is expected to speak, used to transcribe the call.\nAbsent means `en-GB`: every omit path is unchanged, so an existing\nconfig without the field transcribes as British English exactly as\nbefore. Anything outside this set is rejected with 400.\n\nThe English variants lead, then `multi` (code-switching), then the\nremaining languages alphabetically by display label. Mirrors\n`api/packages/core/transcription/languages.ts` (Zod) — the single\nsource of truth; a drift test keeps this enum equal to it.\n\nDISTINCT from `CallLanguage`, which is the language a MISSION test\ncall is held in. The two lists do not overlap cleanly and are not\ninterchangeable: bare `en` is a valid `CallLanguage` and is INVALID\nhere (use `en-GB` or `en-US`), and most codes here are not call\nlanguages at all.\n",
      "enum": [
        "en-GB",
        "en-US",
        "en-AU",
        "en-IN",
        "en-NZ",
        "multi",
        "ar",
        "be",
        "bn",
        "bs",
        "bg",
        "ca",
        "zh-HK",
        "zh",
        "hr",
        "cs",
        "da",
        "nl",
        "et",
        "fi",
        "nl-BE",
        "fr",
        "de",
        "el",
        "gu",
        "he",
        "hi",
        "hu",
        "id",
        "it",
        "ja",
        "kn",
        "ko",
        "lv",
        "lt",
        "mk",
        "ms",
        "mr",
        "no",
        "fa",
        "pl",
        "pt",
        "ro",
        "ru",
        "sr",
        "sk",
        "sl",
        "es",
        "sv",
        "tl",
        "ta",
        "te",
        "th",
        "tr",
        "uk",
        "ur",
        "vi"
      ]
    },
    "TranscriptionLanguageEntry": {
      "type": "object",
      "description": "One transcription language — its code, its label, and the Deepgram models that accept it.",
      "required": [
        "code",
        "label",
        "models",
        "codeSwitching"
      ],
      "properties": {
        "code": {
          "allOf": [
            {
              "$ref": "#/$defs/TranscriptionLanguage"
            }
          ],
          "description": "The value to send as `language`."
        },
        "label": {
          "type": "string",
          "description": "The customer-facing name, safe to show as-is. Unique within the set."
        },
        "models": {
          "type": "array",
          "description": "The Deepgram models that accept this code. Informational: nopaque chooses the model\nserver-side from the language, and no request or response carries a model field.\n",
          "items": {
            "type": "string",
            "enum": [
              "nova-2",
              "nova-3"
            ]
          }
        },
        "codeSwitching": {
          "type": "boolean",
          "description": "True only for `multi`, which switches language within one call."
        }
      }
    },
    "TranscriptionLanguageSet": {
      "type": "object",
      "description": "The transcription languages, with the code used when a request gives none.",
      "required": [
        "default",
        "languages"
      ],
      "properties": {
        "default": {
          "allOf": [
            {
              "$ref": "#/$defs/TranscriptionLanguage"
            }
          ],
          "description": "The language a standard test or mapping run is transcribed in when the field is absent."
        },
        "languages": {
          "type": "array",
          "description": "Every transcription language, in the order a picker should show them.",
          "items": {
            "$ref": "#/$defs/TranscriptionLanguageEntry"
          }
        }
      }
    }
  }
}