{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ibm-translate/json-schema/ibm-translate-translation-result-schema.json",
  "title": "TranslationResult",
  "description": "TranslationResult is the result returned from a call to the translate a list of strings.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ibm-translate-translation-api-openapi.yml#/components/schemas/TranslationResult",
  "type": "object",
  "properties": {
    "word_count": {
      "type": "integer",
      "description": "Number of words in the input text."
    },
    "character_count": {
      "type": "integer",
      "description": "Number of characters in the input text."
    },
    "detected_language": {
      "type": "string",
      "description": "The language code of the source text if the source language was automatically detected. If the source language was passed as a parameter, this field is omitted."
    },
    "detected_language_confidence": {
      "type": "number",
      "format": "double",
      "description": "A score between 0 and 1 indicating the confidence of source language detection. A higher value indicates greater confidence. This is returned only when the service detects the source language automatically.",
      "minimum": 0,
      "maximum": 1
    },
    "translations": {
      "type": "array",
      "description": "List of translation output in UTF-8, corresponding to the input text entries.",
      "items": {
        "$ref": "#/$defs/Translation"
      }
    }
  },
  "$defs": {
    "Translation": {
      "type": "object",
      "description": "Translation represents the translation result.",
      "properties": {
        "translation": {
          "type": "string",
          "description": "Translation output in UTF-8 encoding."
        }
      }
    }
  }
}