{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/narrador-io/json-schema/narrador-io-files-generate-json-schema.json",
  "title": "FilesGenerateJson",
  "description": "Provide exactly one of `url` or `text`. Optional `voiceId`/`accent` (both or neither). When omitted, narrador detects document language when possible (else `en-us`) and picks the first premium public voice for that language (deterministic catalog order), or the first economy voice in the same language if none. Unsupported detected languages or missing catalog voices finish with `failed_file_processing`; pass `voiceId` and `accent` explicitly. JSON bodies on `/v1/files` allow up to 2 MB (enough for 500,000 UTF-8 characters in `text`); larger payloads receive HTTP 413. Every job always generates audio as part of processing. There is no public request field to skip audio (unlike the narrador web upload flow, which can set internal `skipAudioGeneration` to skip audio generation). Omitting optional body fields does not disable audio generation.",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/narrador-io-openapi.json#/components/schemas/FilesGenerateJson",
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "format": "uri",
      "description": "Public http(s) URL to fetch server-side (max 50 MB)."
    },
    "text": {
      "type": "string",
      "maxLength": 500000
    },
    "fileName": {
      "type": "string",
      "maxLength": 200
    },
    "voiceId": {
      "type": "string",
      "format": "uuid"
    },
    "accent": {
      "type": "string",
      "enum": [
        "af-za",
        "am-et",
        "ar-ae",
        "ar-eg",
        "ar-iq",
        "ar-kw",
        "ar-ma",
        "ar-qa",
        "ar-sa",
        "az-az",
        "bn-bd",
        "bn-in",
        "cmn-cn",
        "ja-jp",
        "jv-id",
        "kk-kz",
        "km-kh",
        "ko-kr",
        "mn-mn",
        "my-mm",
        "ne-np",
        "ps-af",
        "si-lk",
        "so-so",
        "th-th",
        "vi-vn",
        "zh-cn",
        "zh-hk",
        "zh-tw",
        "yue-cn",
        "bg-bg",
        "bs-ba",
        "ca-es",
        "cs-cz",
        "da-dk",
        "de-de",
        "el-gr",
        "et-ee",
        "eu-es",
        "fi-fi",
        "fr-be",
        "fr-ca",
        "fr-ch",
        "fr-fr",
        "ga-ie",
        "hr-hr",
        "hu-hu",
        "hy-am",
        "is-is",
        "it-it",
        "lt-lt",
        "lv-lv",
        "nb-no",
        "nl-be",
        "nl-nl",
        "pl-pl",
        "pt-br",
        "pt-pt",
        "ro-ro",
        "ru-ru",
        "sk-sk",
        "sl-si",
        "sq-al",
        "sr-rs",
        "sv-se",
        "tr-tr",
        "uk-ua",
        "en-au",
        "en-ca",
        "en-gb",
        "en-hk",
        "en-ie",
        "en-in",
        "en-ke",
        "en-nz",
        "en-sg",
        "en-us",
        "en-za",
        "es-ar",
        "es-cl",
        "es-co",
        "es-cr",
        "es-cu",
        "es-do",
        "es-ec",
        "es-es",
        "es-mx",
        "es-pe",
        "es-pr",
        "es-py",
        "es-us",
        "es-ve",
        "gu-in",
        "hi-in",
        "kn-in",
        "ml-in",
        "mr-in",
        "pa-in",
        "ta-in",
        "ta-lk",
        "ta-my",
        "te-in",
        "fa-ir",
        "fil-ph",
        "he-il",
        "id-id",
        "ms-my",
        "mt-mt",
        "sw-ke",
        "ur-pk",
        "zu-za"
      ]
    },
    "callbackUrl": {
      "type": "string",
      "format": "uri",
      "description": "Optional https URL on a public host for a single terminal job webhook (see Files job webhooks)."
    }
  }
}