{
  "openapi": "3.1.0",
  "info": {
    "title": "Voicefinder API",
    "version": "2026-11-29",
    "summary": "Text to speech with Voyager 1: realistic voices, emotion tags, sound effects and C2PA-marked audio.",
    "description": "Generated from the same source as the documentation (https://voicefinder.io/en/developers/docs). Developer portal: https://voicefinder.io/en/developers/portal.",
    "termsOfService": "https://voicefinder.io/legal/terms",
    "contact": {
      "name": "Voicefinder",
      "url": "https://voicefinder.io/en/developers/portal"
    }
  },
  "externalDocs": {
    "description": "Voicefinder API documentation",
    "url": "https://voicefinder.io/en/developers/docs"
  },
  "servers": [
    {
      "url": "https://api.voicefinder.io/v1"
    }
  ],
  "security": [
    {
      "apiKey": []
    },
    {
      "bearer": []
    },
    {
      "xiApiKey": []
    }
  ],
  "tags": [
    {
      "name": "Text to speech",
      "description": "Create speech: whole, streamed or as an async job."
    },
    {
      "name": "Voices",
      "description": "The voice catalog and your custom voices."
    },
    {
      "name": "Models",
      "description": "The available models."
    },
    {
      "name": "Sound effects",
      "description": "The sound effects catalog."
    },
    {
      "name": "History",
      "description": "Past generations and their audio."
    },
    {
      "name": "User",
      "description": "Your account and subscription."
    },
    {
      "name": "Usage",
      "description": "Characters used over time."
    },
    {
      "name": "Health",
      "description": "Public service status."
    }
  ],
  "paths": {
    "/text-to-speech/{voice_id}": {
      "post": {
        "operationId": "tts",
        "summary": "Create speech",
        "description": "Converts text into audio with a catalog voice.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-tts",
        "tags": [
          "Text to speech"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-tts"
        },
        "parameters": [
          {
            "name": "voice_id",
            "in": "path",
            "required": true,
            "description": "Voice identifier, as returned by GET /voices.",
            "schema": {
              "type": "string",
              "examples": [
                "9d3f8a2e-1c47-4b6a-9e5f-2d8c7b1a4f30"
              ]
            }
          },
          {
            "name": "output_format",
            "in": "query",
            "required": false,
            "description": "Format with sample rate and bitrate (mp3_44100_128, wav_22050…). mp3_* → MP3 and wav_* → WAV, at the sample rate and bitrate we generate (not the requested ones): the x-output-format header reports what was delivered. pcm_*, ulaw_8000, alaw_8000 and opus_* return 422, because they cannot carry the C2PA credential and we never deliver unmarked audio. Also accepts wav and mp3. When present, it wins over output_format in the body.",
            "schema": {
              "type": "string",
              "examples": [
                "mp3_44100_128"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "examples": [
                      "Hola, bienvenido a Voicefinder."
                    ],
                    "description": "Text to synthesize; it cannot be empty. Maximum 10,000 characters per request, counting everything (tags and spaces included); above that, 422. Long texts are generated in parts, split at paragraph boundaries (or at sentence boundaries when a paragraph is very long), and returned as a single audio file, no stitching needed on your side. A line break is read as a space and a blank line as a full stop. Cost: see \"Credits & cost\"; bracketed tags ([upbeat], [pause:0.5]…) are not charged as text, but each one counts as at least 5 characters when that exceeds what the text costs. Sound effects ([doorbell], [applause:under]…) play mixed into the audio and are free: see \"Sound effects\"."
                  },
                  "language": {
                    "type": "string",
                    "enum": [
                      "es",
                      "en",
                      "ca",
                      "eu",
                      "gl",
                      "af",
                      "ar",
                      "as",
                      "az",
                      "bn",
                      "bg",
                      "my",
                      "yue",
                      "zh",
                      "hr",
                      "cs",
                      "da",
                      "nl",
                      "et",
                      "fil",
                      "fi",
                      "fr",
                      "ka",
                      "de",
                      "el",
                      "gu",
                      "ha",
                      "he",
                      "hi",
                      "hu",
                      "ig",
                      "id",
                      "it",
                      "ja",
                      "jv",
                      "kn",
                      "kk",
                      "km",
                      "ko",
                      "lv",
                      "lt",
                      "ms",
                      "ml",
                      "mt",
                      "mr",
                      "ne",
                      "no",
                      "or",
                      "fa",
                      "pl",
                      "pt",
                      "pa",
                      "ro",
                      "ru",
                      "sk",
                      "sl",
                      "sw",
                      "sv",
                      "ta",
                      "te",
                      "th",
                      "tr",
                      "tw",
                      "uk",
                      "ur",
                      "uz",
                      "vi",
                      "yo"
                    ],
                    "description": "Language of the text: the ISO 639-1 code (\"de\"), a tag with a region (\"pt-BR\", \"es-419\"; the language counts, the accent comes from the voice), the ISO 639-3 code (\"deu\") or the English name (\"German\"). Also accepted as language_code (alias); if both arrive, language wins. Available: es (Spanish), en (English), ca (Catalan), eu (Basque), gl (Galician), af (Afrikaans), ar (Arabic), as (Assamese), az (Azerbaijani), bn (Bengali), bg (Bulgarian), my (Burmese), yue (Cantonese), zh (Chinese), hr (Croatian), cs (Czech), da (Danish), nl (Dutch), et (Estonian), fil (Filipino), fi (Finnish), fr (French), ka (Georgian), de (German), el (Greek), gu (Gujarati), ha (Hausa), he (Hebrew), hi (Hindi), hu (Hungarian), ig (Igbo), id (Indonesian), it (Italian), ja (Japanese), jv (Javanese), kn (Kannada), kk (Kazakh), km (Khmer), ko (Korean), lv (Latvian), lt (Lithuanian), ms (Malay), ml (Malayalam), mt (Maltese), mr (Marathi), ne (Nepali), no (Norwegian), or (Odia), fa (Persian), pl (Polish), pt (Portuguese), pa (Punjabi), ro (Romanian), ru (Russian), sk (Slovak), sl (Slovenian), sw (Swahili), sv (Swedish), ta (Tamil), te (Telugu), th (Thai), tr (Turkish), tw (Twi), uk (Ukrainian), ur (Urdu), uz (Uzbek), vi (Vietnamese), yo (Yoruba); any other value returns 422 unsupported_language. It works with any voice: if the voice has a recording in that language it sounds native; if not, it speaks with the recording of its main language (its accent may carry over) and the x-language-warning header says so. If omitted and the text is in a non-Latin script (Devanagari, Hangul, Cyrillic, Arabic…), the language of that script is used; if it is Latin, the language is detected from the text (very short or ambiguous texts fall back to Spanish) and neither the voice's recording in that language nor the pronunciation dictionary is applied: send it whenever you know it."
                  },
                  "output_format": {
                    "type": "string",
                    "enum": [
                      "wav",
                      "mp3"
                    ],
                    "default": "wav",
                    "description": "Format of the returned audio. Both carry the embedded AI-content marking. Formats with sample rate and bitrate are also accepted (mp3_44100_128, wav_22050…; see output_format in the query, which wins if both arrive). Default wav; if the request authenticates with xi-api-key, mp3. Any other value returns 422. If the MP3 conversion fails, the WAV is delivered instead: check the Content-Type header."
                  },
                  "model_id": {
                    "type": "string",
                    "examples": [
                      "voyager-1"
                    ],
                    "description": "Model. There is only one, voyager-1 (the previous id, omni-v1, still works). For compatibility, any value is accepted and never errors (see [Migrating from another provider](https://voicefinder.io/en/developers/docs#migrate)): it is treated as voyager-1 or ignored, and the x-model-id-warning header says so."
                  },
                  "voice_settings": {
                    "type": [
                      "object",
                      "array"
                    ],
                    "description": "Voice settings. Only speed has an effect: a speed between 0.85 and 1.25 (outside that range it is clamped and x-speed-warning says so; for the cleanest diction, stay at or below 1.15). stability, similarity_boost, style and use_speaker_boost are accepted with no effect and listed in x-ignored-parameters."
                  },
                  "cfg_scale": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 4,
                    "description": "Fidelity to the voice's timbre versus freedom of read. Higher values stick closer to the timbre; lower values allow freer reads. Must be a JSON number (not a string); out of range returns 422."
                  },
                  "inference_steps": {
                    "type": "integer",
                    "minimum": 24,
                    "maximum": 32,
                    "description": "Generation quality: 24 (default) or 32 (maximum quality, a little slower). If omitted, 24 is used. Must be a JSON integer; any other value returns 422."
                  },
                  "seed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647,
                    "examples": [
                      "12345"
                    ],
                    "description": "Generation seed: an integer between 0 and 2147483647; any other value (decimals, negatives, strings) returns 422 with code invalid_seed. Send it only to repeat a take: with the same text, voice, style and parameters, the same seed gives the same take as long as the model version does not change (best effort for long texts). A request with a seed may take a little longer at peak demand and takes two concurrent-generation slots (see \"Rate limits\"). If you omit it, one is chosen for you and stored in params.seed of GET /history/{generation_id}: send it back to repeat that take."
                  },
                  "style_id": {
                    "type": "string",
                    "examples": [
                      "d4c2b1a0-…"
                    ],
                    "description": "Voice style (a style_id from the styles list of GET /voices/{voice_id}). If it does not belong to this voice, 404 \"Style not found for this voice.\". If omitted, the voice's base recording is used."
                  },
                  "instruct": {
                    "type": "string",
                    "examples": [
                      "corporativo"
                    ],
                    "description": "Global read-style hint (e.g. \"corporativo\", \"confiable\"). Applied to the whole read. To direct the performance in detail (attitude, changes mid-text, characters), use direction. At most 100 characters (otherwise 422); surrounding spaces are trimmed and an empty string is ignored."
                  },
                  "direction": {
                    "type": "string",
                    "examples": [
                      "Atención al cliente, cálido y pausado"
                    ],
                    "description": "Natural-language direction for the whole text (e.g. \"customer service, warm and unhurried; softer on the refund sentence\"). It is turned into expressive tags placed where they belong; it is neither read aloud nor charged. It also enables bracketed notes inside text (see [Natural-language direction](https://voicefinder.io/en/developers/docs#natural-direction)). At most 500 characters and no square brackets (otherwise 422 invalid_direction)."
                  },
                  "natural_direction": {
                    "type": "boolean",
                    "default": false,
                    "description": "With true, anything in square brackets in text that is not a supported tag is treated as a direction note (\"[then, quietly, breaking]\") instead of returning 422 invalid_tag. The same happens if you send direction. An identifier in brackets (`[name_with_underscores]`, digits) still returns 422. A non-boolean value returns 422 invalid_direction."
                  },
                  "emotion_intensity": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 6,
                    "examples": [
                      "3"
                    ],
                    "description": "Emotion intensity: how strongly the emotion tags in the text ([excited], [sad], [angry]…) come through. 1 is the usual (natural); 3, marked; 4.5, very marked; 6, maximum. It only changes the stretches with an emotion tag, takes a little longer on them and barely changes [whispers]. It works in every language. With it, the audio is checked before delivery: if any text was dropped, it is regenerated once at intensity 1 at no extra cost, and the x-emotion-intensity (the one applied) and x-emotion-intensity-fallback headers say so. Must be a JSON number between 1 and 6; otherwise 422. To fine-tune emotion by emotion, write the level in the tag itself: [mad:4.5], [excited:6] (1 to 6, comma or dot; out of range is clamped). It overrides emotion_intensity in its stretch; without a number emotion_intensity (or 1) applies. On sounds ([laughs]) and [whispers] the number is dropped. With any tag above 1 the audio is also checked before delivery and, if text was dropped, regenerated once without the levels."
                  },
                  "tail_pad_s": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 3,
                    "default": 0.4,
                    "description": "Extra trailing silence, in seconds. Out of range returns 422."
                  },
                  "auto_duration": {
                    "type": "boolean",
                    "default": true,
                    "description": "Prevents clipped endings. A non-boolean value is ignored."
                  },
                  "collapse_paragraph": {
                    "type": "boolean",
                    "default": true,
                    "description": "Normalizes line breaks and repeated spaces before generating. Note: line breaks and repeated spaces are always normalized before generating (see text), so in practice false changes very little. A non-boolean value is ignored."
                  }
                },
                "required": [
                  "text"
                ]
              },
              "example": {
                "text": "Hola, bienvenido a Voicefinder.",
                "language": "es",
                "output_format": "mp3"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The audio file, with its AI-content marking embedded (watermark and C2PA Content Credentials).",
            "content": {
              "audio/wav": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "audio/mpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/text-to-speech/{voice_id}/stream": {
      "post": {
        "operationId": "ttsStream",
        "summary": "Stream speech",
        "description": "The same as Create speech, delivered in chunks; for the SDKs' stream method.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-tts-stream",
        "tags": [
          "Text to speech"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-tts-stream"
        },
        "parameters": [
          {
            "name": "voice_id",
            "in": "path",
            "required": true,
            "description": "Voice identifier, as returned by GET /voices.",
            "schema": {
              "type": "string",
              "examples": [
                "9d3f8a2e-1c47-4b6a-9e5f-2d8c7b1a4f30"
              ]
            }
          },
          {
            "name": "output_format",
            "in": "query",
            "required": false,
            "description": "Format with sample rate and bitrate (mp3_44100_128, wav_22050…). mp3_* → MP3 and wav_* → WAV, at the sample rate and bitrate we generate (not the requested ones): the x-output-format header reports what was delivered. pcm_*, ulaw_8000, alaw_8000 and opus_* return 422, because they cannot carry the C2PA credential and we never deliver unmarked audio. Also accepts wav and mp3. When present, it wins over output_format in the body.",
            "schema": {
              "type": "string",
              "examples": [
                "mp3_44100_128"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "examples": [
                      "Hola, bienvenido a Voicefinder."
                    ],
                    "description": "Text to synthesize; it cannot be empty. Maximum 10,000 characters per request, counting everything (tags and spaces included); above that, 422. Long texts are generated in parts, split at paragraph boundaries (or at sentence boundaries when a paragraph is very long), and returned as a single audio file, no stitching needed on your side. A line break is read as a space and a blank line as a full stop. Cost: see \"Credits & cost\"; bracketed tags ([upbeat], [pause:0.5]…) are not charged as text, but each one counts as at least 5 characters when that exceeds what the text costs. Sound effects ([doorbell], [applause:under]…) play mixed into the audio and are free: see \"Sound effects\"."
                  },
                  "language": {
                    "type": "string",
                    "enum": [
                      "es",
                      "en",
                      "ca",
                      "eu",
                      "gl",
                      "af",
                      "ar",
                      "as",
                      "az",
                      "bn",
                      "bg",
                      "my",
                      "yue",
                      "zh",
                      "hr",
                      "cs",
                      "da",
                      "nl",
                      "et",
                      "fil",
                      "fi",
                      "fr",
                      "ka",
                      "de",
                      "el",
                      "gu",
                      "ha",
                      "he",
                      "hi",
                      "hu",
                      "ig",
                      "id",
                      "it",
                      "ja",
                      "jv",
                      "kn",
                      "kk",
                      "km",
                      "ko",
                      "lv",
                      "lt",
                      "ms",
                      "ml",
                      "mt",
                      "mr",
                      "ne",
                      "no",
                      "or",
                      "fa",
                      "pl",
                      "pt",
                      "pa",
                      "ro",
                      "ru",
                      "sk",
                      "sl",
                      "sw",
                      "sv",
                      "ta",
                      "te",
                      "th",
                      "tr",
                      "tw",
                      "uk",
                      "ur",
                      "uz",
                      "vi",
                      "yo"
                    ],
                    "description": "Language of the text: the ISO 639-1 code (\"de\"), a tag with a region (\"pt-BR\", \"es-419\"; the language counts, the accent comes from the voice), the ISO 639-3 code (\"deu\") or the English name (\"German\"). Also accepted as language_code (alias); if both arrive, language wins. Available: es (Spanish), en (English), ca (Catalan), eu (Basque), gl (Galician), af (Afrikaans), ar (Arabic), as (Assamese), az (Azerbaijani), bn (Bengali), bg (Bulgarian), my (Burmese), yue (Cantonese), zh (Chinese), hr (Croatian), cs (Czech), da (Danish), nl (Dutch), et (Estonian), fil (Filipino), fi (Finnish), fr (French), ka (Georgian), de (German), el (Greek), gu (Gujarati), ha (Hausa), he (Hebrew), hi (Hindi), hu (Hungarian), ig (Igbo), id (Indonesian), it (Italian), ja (Japanese), jv (Javanese), kn (Kannada), kk (Kazakh), km (Khmer), ko (Korean), lv (Latvian), lt (Lithuanian), ms (Malay), ml (Malayalam), mt (Maltese), mr (Marathi), ne (Nepali), no (Norwegian), or (Odia), fa (Persian), pl (Polish), pt (Portuguese), pa (Punjabi), ro (Romanian), ru (Russian), sk (Slovak), sl (Slovenian), sw (Swahili), sv (Swedish), ta (Tamil), te (Telugu), th (Thai), tr (Turkish), tw (Twi), uk (Ukrainian), ur (Urdu), uz (Uzbek), vi (Vietnamese), yo (Yoruba); any other value returns 422 unsupported_language. It works with any voice: if the voice has a recording in that language it sounds native; if not, it speaks with the recording of its main language (its accent may carry over) and the x-language-warning header says so. If omitted and the text is in a non-Latin script (Devanagari, Hangul, Cyrillic, Arabic…), the language of that script is used; if it is Latin, the language is detected from the text (very short or ambiguous texts fall back to Spanish) and neither the voice's recording in that language nor the pronunciation dictionary is applied: send it whenever you know it."
                  },
                  "output_format": {
                    "type": "string",
                    "enum": [
                      "wav",
                      "mp3"
                    ],
                    "default": "wav",
                    "description": "Format of the returned audio. Both carry the embedded AI-content marking. Formats with sample rate and bitrate are also accepted (mp3_44100_128, wav_22050…; see output_format in the query, which wins if both arrive). Default wav; if the request authenticates with xi-api-key, mp3. Any other value returns 422. If the MP3 conversion fails, the WAV is delivered instead: check the Content-Type header."
                  },
                  "model_id": {
                    "type": "string",
                    "examples": [
                      "voyager-1"
                    ],
                    "description": "Model. There is only one, voyager-1 (the previous id, omni-v1, still works). For compatibility, any value is accepted and never errors (see [Migrating from another provider](https://voicefinder.io/en/developers/docs#migrate)): it is treated as voyager-1 or ignored, and the x-model-id-warning header says so."
                  },
                  "voice_settings": {
                    "type": [
                      "object",
                      "array"
                    ],
                    "description": "Voice settings. Only speed has an effect: a speed between 0.85 and 1.25 (outside that range it is clamped and x-speed-warning says so; for the cleanest diction, stay at or below 1.15). stability, similarity_boost, style and use_speaker_boost are accepted with no effect and listed in x-ignored-parameters."
                  },
                  "cfg_scale": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 4,
                    "description": "Fidelity to the voice's timbre versus freedom of read. Higher values stick closer to the timbre; lower values allow freer reads. Must be a JSON number (not a string); out of range returns 422."
                  },
                  "inference_steps": {
                    "type": "integer",
                    "minimum": 24,
                    "maximum": 32,
                    "description": "Generation quality: 24 (default) or 32 (maximum quality, a little slower). If omitted, 24 is used. Must be a JSON integer; any other value returns 422."
                  },
                  "seed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647,
                    "examples": [
                      "12345"
                    ],
                    "description": "Generation seed: an integer between 0 and 2147483647; any other value (decimals, negatives, strings) returns 422 with code invalid_seed. Send it only to repeat a take: with the same text, voice, style and parameters, the same seed gives the same take as long as the model version does not change (best effort for long texts). A request with a seed may take a little longer at peak demand and takes two concurrent-generation slots (see \"Rate limits\"). If you omit it, one is chosen for you and stored in params.seed of GET /history/{generation_id}: send it back to repeat that take."
                  },
                  "style_id": {
                    "type": "string",
                    "examples": [
                      "d4c2b1a0-…"
                    ],
                    "description": "Voice style (a style_id from the styles list of GET /voices/{voice_id}). If it does not belong to this voice, 404 \"Style not found for this voice.\". If omitted, the voice's base recording is used."
                  },
                  "instruct": {
                    "type": "string",
                    "examples": [
                      "corporativo"
                    ],
                    "description": "Global read-style hint (e.g. \"corporativo\", \"confiable\"). Applied to the whole read. To direct the performance in detail (attitude, changes mid-text, characters), use direction. At most 100 characters (otherwise 422); surrounding spaces are trimmed and an empty string is ignored."
                  },
                  "direction": {
                    "type": "string",
                    "examples": [
                      "Atención al cliente, cálido y pausado"
                    ],
                    "description": "Natural-language direction for the whole text (e.g. \"customer service, warm and unhurried; softer on the refund sentence\"). It is turned into expressive tags placed where they belong; it is neither read aloud nor charged. It also enables bracketed notes inside text (see [Natural-language direction](https://voicefinder.io/en/developers/docs#natural-direction)). At most 500 characters and no square brackets (otherwise 422 invalid_direction)."
                  },
                  "natural_direction": {
                    "type": "boolean",
                    "default": false,
                    "description": "With true, anything in square brackets in text that is not a supported tag is treated as a direction note (\"[then, quietly, breaking]\") instead of returning 422 invalid_tag. The same happens if you send direction. An identifier in brackets (`[name_with_underscores]`, digits) still returns 422. A non-boolean value returns 422 invalid_direction."
                  },
                  "emotion_intensity": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 6,
                    "examples": [
                      "3"
                    ],
                    "description": "Emotion intensity: how strongly the emotion tags in the text ([excited], [sad], [angry]…) come through. 1 is the usual (natural); 3, marked; 4.5, very marked; 6, maximum. It only changes the stretches with an emotion tag, takes a little longer on them and barely changes [whispers]. It works in every language. With it, the audio is checked before delivery: if any text was dropped, it is regenerated once at intensity 1 at no extra cost, and the x-emotion-intensity (the one applied) and x-emotion-intensity-fallback headers say so. Must be a JSON number between 1 and 6; otherwise 422. To fine-tune emotion by emotion, write the level in the tag itself: [mad:4.5], [excited:6] (1 to 6, comma or dot; out of range is clamped). It overrides emotion_intensity in its stretch; without a number emotion_intensity (or 1) applies. On sounds ([laughs]) and [whispers] the number is dropped. With any tag above 1 the audio is also checked before delivery and, if text was dropped, regenerated once without the levels."
                  },
                  "tail_pad_s": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 3,
                    "default": 0.4,
                    "description": "Extra trailing silence, in seconds. Out of range returns 422."
                  },
                  "auto_duration": {
                    "type": "boolean",
                    "default": true,
                    "description": "Prevents clipped endings. A non-boolean value is ignored."
                  },
                  "collapse_paragraph": {
                    "type": "boolean",
                    "default": true,
                    "description": "Normalizes line breaks and repeated spaces before generating. Note: line breaks and repeated spaces are always normalized before generating (see text), so in practice false changes very little. A non-boolean value is ignored."
                  }
                },
                "required": [
                  "text"
                ]
              },
              "example": {
                "text": "Hola, bienvenido a Voicefinder.",
                "language_code": "es"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The audio file, with its AI-content marking embedded (watermark and C2PA Content Credentials).",
            "content": {
              "audio/wav": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "audio/mpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/text-to-speech/{voice_id}/async": {
      "post": {
        "operationId": "ttsAsync",
        "summary": "Create speech (async)",
        "description": "Queues the generation and answers right away with a job_id; collect the audio later.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-tts-async",
        "tags": [
          "Text to speech"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-tts-async"
        },
        "parameters": [
          {
            "name": "voice_id",
            "in": "path",
            "required": true,
            "description": "Voice identifier, as returned by GET /voices.",
            "schema": {
              "type": "string",
              "examples": [
                "9d3f8a2e-1c47-4b6a-9e5f-2d8c7b1a4f30"
              ]
            }
          },
          {
            "name": "output_format",
            "in": "query",
            "required": false,
            "description": "Format with sample rate and bitrate (mp3_44100_128, wav_22050…). mp3_* → MP3 and wav_* → WAV, at the sample rate and bitrate we generate (not the requested ones): the x-output-format header reports what was delivered. pcm_*, ulaw_8000, alaw_8000 and opus_* return 422, because they cannot carry the C2PA credential and we never deliver unmarked audio. Also accepts wav and mp3. When present, it wins over output_format in the body.",
            "schema": {
              "type": "string",
              "examples": [
                "mp3_44100_128"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "examples": [
                      "Hola, bienvenido a Voicefinder."
                    ],
                    "description": "Text to synthesize; it cannot be empty. Maximum 10,000 characters per request, counting everything (tags and spaces included); above that, 422. Long texts are generated in parts, split at paragraph boundaries (or at sentence boundaries when a paragraph is very long), and returned as a single audio file, no stitching needed on your side. A line break is read as a space and a blank line as a full stop. Cost: see \"Credits & cost\"; bracketed tags ([upbeat], [pause:0.5]…) are not charged as text, but each one counts as at least 5 characters when that exceeds what the text costs. Sound effects ([doorbell], [applause:under]…) play mixed into the audio and are free: see \"Sound effects\"."
                  },
                  "language": {
                    "type": "string",
                    "enum": [
                      "es",
                      "en",
                      "ca",
                      "eu",
                      "gl",
                      "af",
                      "ar",
                      "as",
                      "az",
                      "bn",
                      "bg",
                      "my",
                      "yue",
                      "zh",
                      "hr",
                      "cs",
                      "da",
                      "nl",
                      "et",
                      "fil",
                      "fi",
                      "fr",
                      "ka",
                      "de",
                      "el",
                      "gu",
                      "ha",
                      "he",
                      "hi",
                      "hu",
                      "ig",
                      "id",
                      "it",
                      "ja",
                      "jv",
                      "kn",
                      "kk",
                      "km",
                      "ko",
                      "lv",
                      "lt",
                      "ms",
                      "ml",
                      "mt",
                      "mr",
                      "ne",
                      "no",
                      "or",
                      "fa",
                      "pl",
                      "pt",
                      "pa",
                      "ro",
                      "ru",
                      "sk",
                      "sl",
                      "sw",
                      "sv",
                      "ta",
                      "te",
                      "th",
                      "tr",
                      "tw",
                      "uk",
                      "ur",
                      "uz",
                      "vi",
                      "yo"
                    ],
                    "description": "Language of the text: the ISO 639-1 code (\"de\"), a tag with a region (\"pt-BR\", \"es-419\"; the language counts, the accent comes from the voice), the ISO 639-3 code (\"deu\") or the English name (\"German\"). Also accepted as language_code (alias); if both arrive, language wins. Available: es (Spanish), en (English), ca (Catalan), eu (Basque), gl (Galician), af (Afrikaans), ar (Arabic), as (Assamese), az (Azerbaijani), bn (Bengali), bg (Bulgarian), my (Burmese), yue (Cantonese), zh (Chinese), hr (Croatian), cs (Czech), da (Danish), nl (Dutch), et (Estonian), fil (Filipino), fi (Finnish), fr (French), ka (Georgian), de (German), el (Greek), gu (Gujarati), ha (Hausa), he (Hebrew), hi (Hindi), hu (Hungarian), ig (Igbo), id (Indonesian), it (Italian), ja (Japanese), jv (Javanese), kn (Kannada), kk (Kazakh), km (Khmer), ko (Korean), lv (Latvian), lt (Lithuanian), ms (Malay), ml (Malayalam), mt (Maltese), mr (Marathi), ne (Nepali), no (Norwegian), or (Odia), fa (Persian), pl (Polish), pt (Portuguese), pa (Punjabi), ro (Romanian), ru (Russian), sk (Slovak), sl (Slovenian), sw (Swahili), sv (Swedish), ta (Tamil), te (Telugu), th (Thai), tr (Turkish), tw (Twi), uk (Ukrainian), ur (Urdu), uz (Uzbek), vi (Vietnamese), yo (Yoruba); any other value returns 422 unsupported_language. It works with any voice: if the voice has a recording in that language it sounds native; if not, it speaks with the recording of its main language (its accent may carry over) and the x-language-warning header says so. If omitted and the text is in a non-Latin script (Devanagari, Hangul, Cyrillic, Arabic…), the language of that script is used; if it is Latin, the language is detected from the text (very short or ambiguous texts fall back to Spanish) and neither the voice's recording in that language nor the pronunciation dictionary is applied: send it whenever you know it."
                  },
                  "output_format": {
                    "type": "string",
                    "enum": [
                      "wav",
                      "mp3"
                    ],
                    "default": "wav",
                    "description": "Format of the returned audio. Both carry the embedded AI-content marking. Formats with sample rate and bitrate are also accepted (mp3_44100_128, wav_22050…; see output_format in the query, which wins if both arrive). Default wav; if the request authenticates with xi-api-key, mp3. Any other value returns 422. If the MP3 conversion fails, the WAV is delivered instead: check the Content-Type header."
                  },
                  "model_id": {
                    "type": "string",
                    "examples": [
                      "voyager-1"
                    ],
                    "description": "Model. There is only one, voyager-1 (the previous id, omni-v1, still works). For compatibility, any value is accepted and never errors (see [Migrating from another provider](https://voicefinder.io/en/developers/docs#migrate)): it is treated as voyager-1 or ignored, and the x-model-id-warning header says so."
                  },
                  "voice_settings": {
                    "type": [
                      "object",
                      "array"
                    ],
                    "description": "Voice settings. Only speed has an effect: a speed between 0.85 and 1.25 (outside that range it is clamped and x-speed-warning says so; for the cleanest diction, stay at or below 1.15). stability, similarity_boost, style and use_speaker_boost are accepted with no effect and listed in x-ignored-parameters."
                  },
                  "cfg_scale": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 4,
                    "description": "Fidelity to the voice's timbre versus freedom of read. Higher values stick closer to the timbre; lower values allow freer reads. Must be a JSON number (not a string); out of range returns 422."
                  },
                  "inference_steps": {
                    "type": "integer",
                    "minimum": 24,
                    "maximum": 32,
                    "description": "Generation quality: 24 (default) or 32 (maximum quality, a little slower). If omitted, 24 is used. Must be a JSON integer; any other value returns 422."
                  },
                  "seed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647,
                    "examples": [
                      "12345"
                    ],
                    "description": "Generation seed: an integer between 0 and 2147483647; any other value (decimals, negatives, strings) returns 422 with code invalid_seed. Send it only to repeat a take: with the same text, voice, style and parameters, the same seed gives the same take as long as the model version does not change (best effort for long texts). A request with a seed may take a little longer at peak demand and takes two concurrent-generation slots (see \"Rate limits\"). If you omit it, one is chosen for you and stored in params.seed of GET /history/{generation_id}: send it back to repeat that take."
                  },
                  "style_id": {
                    "type": "string",
                    "examples": [
                      "d4c2b1a0-…"
                    ],
                    "description": "Voice style (a style_id from the styles list of GET /voices/{voice_id}). If it does not belong to this voice, 404 \"Style not found for this voice.\". If omitted, the voice's base recording is used."
                  },
                  "instruct": {
                    "type": "string",
                    "examples": [
                      "corporativo"
                    ],
                    "description": "Global read-style hint (e.g. \"corporativo\", \"confiable\"). Applied to the whole read. To direct the performance in detail (attitude, changes mid-text, characters), use direction. At most 100 characters (otherwise 422); surrounding spaces are trimmed and an empty string is ignored."
                  },
                  "direction": {
                    "type": "string",
                    "examples": [
                      "Atención al cliente, cálido y pausado"
                    ],
                    "description": "Natural-language direction for the whole text (e.g. \"customer service, warm and unhurried; softer on the refund sentence\"). It is turned into expressive tags placed where they belong; it is neither read aloud nor charged. It also enables bracketed notes inside text (see [Natural-language direction](https://voicefinder.io/en/developers/docs#natural-direction)). At most 500 characters and no square brackets (otherwise 422 invalid_direction)."
                  },
                  "natural_direction": {
                    "type": "boolean",
                    "default": false,
                    "description": "With true, anything in square brackets in text that is not a supported tag is treated as a direction note (\"[then, quietly, breaking]\") instead of returning 422 invalid_tag. The same happens if you send direction. An identifier in brackets (`[name_with_underscores]`, digits) still returns 422. A non-boolean value returns 422 invalid_direction."
                  },
                  "emotion_intensity": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 6,
                    "examples": [
                      "3"
                    ],
                    "description": "Emotion intensity: how strongly the emotion tags in the text ([excited], [sad], [angry]…) come through. 1 is the usual (natural); 3, marked; 4.5, very marked; 6, maximum. It only changes the stretches with an emotion tag, takes a little longer on them and barely changes [whispers]. It works in every language. With it, the audio is checked before delivery: if any text was dropped, it is regenerated once at intensity 1 at no extra cost, and the x-emotion-intensity (the one applied) and x-emotion-intensity-fallback headers say so. Must be a JSON number between 1 and 6; otherwise 422. To fine-tune emotion by emotion, write the level in the tag itself: [mad:4.5], [excited:6] (1 to 6, comma or dot; out of range is clamped). It overrides emotion_intensity in its stretch; without a number emotion_intensity (or 1) applies. On sounds ([laughs]) and [whispers] the number is dropped. With any tag above 1 the audio is also checked before delivery and, if text was dropped, regenerated once without the levels."
                  },
                  "tail_pad_s": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 3,
                    "default": 0.4,
                    "description": "Extra trailing silence, in seconds. Out of range returns 422."
                  },
                  "auto_duration": {
                    "type": "boolean",
                    "default": true,
                    "description": "Prevents clipped endings. A non-boolean value is ignored."
                  },
                  "collapse_paragraph": {
                    "type": "boolean",
                    "default": true,
                    "description": "Normalizes line breaks and repeated spaces before generating. Note: line breaks and repeated spaces are always normalized before generating (see text), so in practice false changes very little. A non-boolean value is ignored."
                  }
                },
                "required": [
                  "text"
                ]
              },
              "example": {
                "text": "Hola, bienvenido a Voicefinder.",
                "language": "es",
                "output_format": "mp3"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "job_id": "5b0e2c7a-9d41-4f3e-8a26-c1d7e94b3f08",
                  "status": "queued",
                  "poll_url": "https://api.voicefinder.io/v1/text-to-speech/jobs/5b0e2c7a-9d41-4f3e-8a26-c1d7e94b3f08",
                  "created_at": "2026-10-19T10:00:00Z",
                  "character_count": 31
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/text-to-speech/jobs/{job_id}": {
      "get": {
        "operationId": "ttsJob",
        "summary": "Get a job",
        "description": "Status of an asynchronous generation and, once finished, its audio.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-tts-job",
        "tags": [
          "Text to speech"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-tts-job"
        },
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "description": "Job identifier, as returned by POST /text-to-speech/{voice_id}/async.",
            "schema": {
              "type": "string",
              "examples": [
                "5b0e2c7a-9d41-4f3e-8a26-c1d7e94b3f08"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "job_id": "5b0e2c7a-9d41-4f3e-8a26-c1d7e94b3f08",
                  "status": "done",
                  "voice_id": "9d3f8a2e-…",
                  "character_count": 31,
                  "created_at": "2026-10-19T10:00:00Z",
                  "started_at": "2026-10-19T10:00:01Z",
                  "finished_at": "2026-10-19T10:00:06Z",
                  "result": {
                    "history_item_id": "5b0e2c7a-9d41-4f3e-8a26-c1d7e94b3f08",
                    "output_format": "mp3",
                    "content_type": "audio/mpeg",
                    "character_count": 31,
                    "audio_url": "https://…/5b0e2c7a….48k.mp3?token=…",
                    "audio_url_expires_at": "2026-10-19T11:00:09Z",
                    "download_url": "https://api.voicefinder.io/v1/history/5b0e2c7a-9d41-4f3e-8a26-c1d7e94b3f08/audio?output_format=mp3",
                    "headers": {
                      "x-output-format": "mp3_48000_192",
                      "x-watermarked": "true",
                      "x-c2pa-signed": "true",
                      "x-model-id": "voyager-1",
                      "x-language": "es"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "ttsJobCancel",
        "summary": "Cancel a job",
        "description": "Cancels a job that has not started yet and refunds its characters.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-tts-job-cancel",
        "tags": [
          "Text to speech"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-tts-job-cancel"
        },
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "description": "Job identifier, as returned by POST /text-to-speech/{voice_id}/async.",
            "schema": {
              "type": "string",
              "examples": [
                "5b0e2c7a-9d41-4f3e-8a26-c1d7e94b3f08"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "job_id": "5b0e2c7a-9d41-4f3e-8a26-c1d7e94b3f08",
                  "status": "canceled",
                  "voice_id": "9d3f8a2e-…",
                  "character_count": 31,
                  "created_at": "2026-10-19T10:00:00Z",
                  "started_at": null,
                  "finished_at": "2026-10-19T10:00:02Z",
                  "error": {
                    "code": "canceled",
                    "message": "Canceled by the client."
                  },
                  "refunded_characters": 31
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/voices": {
      "get": {
        "operationId": "voices",
        "summary": "List voices",
        "description": "Returns the catalog of available voices.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-voices",
        "tags": [
          "Voices"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-voices"
        },
        "parameters": [
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Number of voices per page. It must be an integer (otherwise 422); out-of-range values are clamped to 1 or 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "next_page_token",
            "in": "query",
            "required": false,
            "description": "Pagination cursor: the next_page_token of the previous page (it is the name of its last voice; the catalog is sorted by name).",
            "schema": {
              "type": "string",
              "examples": [
                "Carmen"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Filters by voice name (partial, case-insensitive match).",
            "schema": {
              "type": "string",
              "examples": [
                "carmen"
              ]
            }
          },
          {
            "name": "language",
            "in": "query",
            "required": false,
            "description": "Filters by the voice's main language. Accepts a two-letter code (\"es\" returns every variant: \"Spanish (Spain)\", \"Spanish (Latin America)\"…), any other form that language accepts in generation (\"de-DE\", \"deu\", \"German\"), or the exact value of the language field (e.g. \"Spanish (Spain)\", \"English (British)\"). A code that is not an accepted language returns 422 unsupported_language.",
            "schema": {
              "type": "string",
              "examples": [
                "es"
              ]
            }
          },
          {
            "name": "gender",
            "in": "query",
            "required": false,
            "description": "Filters by gender: female, male or neutral (the same values as the gender field). For backward compatibility it also accepts the former Spanish values (Femenino, Masculino, Neutro). Any other value returns 422.",
            "schema": {
              "type": "string",
              "enum": [
                "female",
                "male",
                "neutral"
              ]
            }
          },
          {
            "name": "age",
            "in": "query",
            "required": false,
            "description": "Filters by age: young, middle_aged, old or child (the same values as the age_range field). Also accepts adult (= middle_aged), senior (= old) and the former Spanish values (Joven, Joven/Adulto, Adulto, Senior, Niño). Any other value returns 422.",
            "schema": {
              "type": "string",
              "enum": [
                "young",
                "middle_aged",
                "old",
                "child"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "voices": [
                    {
                      "voice_id": "9d3f8a2e-1c47-4b6a-9e5f-2d8c7b1a4f30",
                      "name": "Carmen",
                      "language": "Spanish (Spain)",
                      "gender": "female",
                      "age_range": "middle_aged",
                      "avatar_url": "https://…",
                      "cost_multiplier": 1,
                      "languages": [
                        "es",
                        "ca"
                      ],
                      "preview_url": "https://…",
                      "styles": [
                        {
                          "style_id": "d4c2b1a0-…",
                          "name": "Corporate",
                          "is_default": true
                        }
                      ],
                      "labels": {
                        "gender": "female",
                        "age": "middle_aged",
                        "accent": "standard peninsular",
                        "language": "es",
                        "use_case": "radio_ad",
                        "descriptive": "warm"
                      },
                      "category": "premade",
                      "verified_languages": [
                        {
                          "language": "es",
                          "model_id": "voyager-1",
                          "accent": "standard peninsular",
                          "preview_url": "https://…"
                        },
                        {
                          "language": "ca",
                          "model_id": "voyager-1",
                          "preview_url": null
                        }
                      ],
                      "available_for_tiers": [],
                      "high_quality_base_model_ids": [],
                      "settings": {
                        "stability": 0.5,
                        "similarity_boost": 0.75,
                        "style": 0,
                        "use_speaker_boost": true,
                        "speed": 1
                      }
                    }
                  ],
                  "has_more": true,
                  "total_count": 20,
                  "next_page_token": "Carmen"
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/voices/{voice_id}": {
      "get": {
        "operationId": "voice",
        "summary": "Get voice",
        "description": "Returns a voice with its samples and styles.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-voice",
        "tags": [
          "Voices"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-voice"
        },
        "parameters": [
          {
            "name": "voice_id",
            "in": "path",
            "required": true,
            "description": "Voice identifier, as returned by GET /voices.",
            "schema": {
              "type": "string",
              "examples": [
                "9d3f8a2e-1c47-4b6a-9e5f-2d8c7b1a4f30"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "voice_id": "9d3f8a2e-1c47-4b6a-9e5f-2d8c7b1a4f30",
                  "name": "Carmen",
                  "language": "Spanish (Spain)",
                  "gender": "female",
                  "age_range": "middle_aged",
                  "avatar_url": "https://…",
                  "cost_multiplier": 1,
                  "languages": [
                    "es",
                    "ca"
                  ],
                  "samples": [
                    {
                      "url": "https://…",
                      "title": "Corporate demo"
                    }
                  ],
                  "styles": [
                    {
                      "style_id": "d4c2b1a0-…",
                      "name": "Corporate",
                      "is_default": true
                    }
                  ],
                  "preview_url": "https://…",
                  "labels": {
                    "gender": "female",
                    "age": "middle_aged",
                    "accent": "standard peninsular",
                    "language": "es",
                    "use_case": "radio_ad",
                    "descriptive": "warm"
                  },
                  "category": "premade",
                  "verified_languages": [
                    {
                      "language": "es",
                      "model_id": "voyager-1",
                      "accent": "standard peninsular",
                      "preview_url": "https://…"
                    }
                  ],
                  "available_for_tiers": [],
                  "high_quality_base_model_ids": [],
                  "settings": {
                    "stability": 0.5,
                    "similarity_boost": 0.75,
                    "style": 0,
                    "use_speaker_boost": true,
                    "speed": 1
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "voiceDelete",
        "summary": "Delete a voice",
        "description": "Removes one of your voices: it stops being listed and generating.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-voice-delete",
        "tags": [
          "Voices"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-voice-delete"
        },
        "parameters": [
          {
            "name": "voice_id",
            "in": "path",
            "required": true,
            "description": "Voice identifier, as returned by GET /voices.",
            "schema": {
              "type": "string",
              "examples": [
                "9d3f8a2e-1c47-4b6a-9e5f-2d8c7b1a4f30"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "status": "ok"
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/voices/{voice_id}/settings": {
      "get": {
        "operationId": "voiceSettings",
        "summary": "Get voice settings",
        "description": "Voice settings (only speed has an effect).\n\nDocs: https://voicefinder.io/en/developers/docs#ep-voice-settings",
        "tags": [
          "Voices"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-voice-settings"
        },
        "parameters": [
          {
            "name": "voice_id",
            "in": "path",
            "required": true,
            "description": "Voice identifier, as returned by GET /voices.",
            "schema": {
              "type": "string",
              "examples": [
                "9d3f8a2e-1c47-4b6a-9e5f-2d8c7b1a4f30"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "stability": 0.5,
                  "similarity_boost": 0.75,
                  "style": 0,
                  "use_speaker_boost": true,
                  "speed": 1
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/voices/settings/default": {
      "get": {
        "operationId": "voiceSettingsDefault",
        "summary": "Get default voice settings",
        "description": "Default voice settings.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-voice-settings-default",
        "tags": [
          "Voices"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-voice-settings-default"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/voices/add": {
      "post": {
        "operationId": "voiceAdd",
        "summary": "Create a voice",
        "description": "Clones a custom voice from a recording.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-voice-add",
        "tags": [
          "Voices"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-voice-add"
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "examples": [
                      "Mi voz"
                    ],
                    "description": "Voice name (2-40 characters)."
                  },
                  "files": {
                    "type": "string",
                    "format": "binary",
                    "description": "The recording: a single WAV (PCM) or MP3 file up to 4 MB, one person speaking, no music. Up to 14 s it is used whole; longer, we pick a ~12 s clip that starts and ends on a pause."
                  },
                  "rights_accepted": {
                    "type": "boolean",
                    "description": "`true`: you accept the voice rights declaration (see below). It is accepted on every new voice; without it nothing is created."
                  },
                  "rights_version": {
                    "type": "string",
                    "examples": [
                      "cv-rights-2026-10-20"
                    ],
                    "description": "The version of the declaration you accept. Currently `cv-rights-2026-10-20`. If it changes, the call returns 422 with the new version and text."
                  },
                  "language": {
                    "type": "string",
                    "examples": [
                      "es"
                    ],
                    "description": "Language of the recording (es, en…). If omitted, it is detected."
                  },
                  "transcript": {
                    "type": "string",
                    "description": "What is said in the recording. If omitted, it is transcribed. It is only used when the recording is up to 14 s long (then it is used whole); for a longer one the chosen clip is transcribed and this field is ignored."
                  },
                  "gender": {
                    "type": "string",
                    "enum": [
                      "female",
                      "male",
                      "neutral"
                    ],
                    "description": "Voice gender."
                  },
                  "age": {
                    "type": "string",
                    "enum": [
                      "child",
                      "young",
                      "middle_aged",
                      "old"
                    ],
                    "description": "Voice age."
                  },
                  "labels": {
                    "type": [
                      "object",
                      "array"
                    ],
                    "description": "As in ElevenLabs: a JSON object from which `gender` and `age` are read (the separate fields win)."
                  },
                  "rights_locale": {
                    "type": "string",
                    "enum": [
                      "en",
                      "es"
                    ],
                    "default": "en",
                    "description": "Language in which you accept the declaration; it is the text we keep as evidence."
                  }
                },
                "required": [
                  "name",
                  "files",
                  "rights_accepted",
                  "rights_version"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "voice_id": "c4e2a7b1-8f3d-4b6e-9a21-5d7c0e9f4b38",
                  "requires_verification": false,
                  "name": "Mi voz",
                  "category": "cloned",
                  "language": "es",
                  "transcript": "Hola, soy Marta y esta es mi voz para los anuncios de la radio.",
                  "clip": {
                    "start_s": 3.42,
                    "end_s": 15.18,
                    "whole_recording": false
                  },
                  "warnings": []
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/voices/{voice_id}/edit": {
      "post": {
        "operationId": "voiceEdit",
        "summary": "Edit a voice",
        "description": "Changes the name, gender or age of one of your voices.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-voice-edit",
        "tags": [
          "Voices"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-voice-edit"
        },
        "parameters": [
          {
            "name": "voice_id",
            "in": "path",
            "required": true,
            "description": "Voice identifier, as returned by GET /voices.",
            "schema": {
              "type": "string",
              "examples": [
                "9d3f8a2e-1c47-4b6a-9e5f-2d8c7b1a4f30"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "examples": [
                      "Mi voz"
                    ],
                    "description": "New name (2-40 characters)."
                  },
                  "gender": {
                    "type": "string",
                    "enum": [
                      "female",
                      "male",
                      "neutral"
                    ],
                    "description": "Gender. Empty clears it."
                  },
                  "age": {
                    "type": "string",
                    "enum": [
                      "child",
                      "young",
                      "middle_aged",
                      "old"
                    ],
                    "description": "Age. Empty clears it."
                  },
                  "labels": {
                    "type": [
                      "object",
                      "array"
                    ],
                    "description": "As in ElevenLabs: `gender` and `age` are read."
                  }
                }
              },
              "example": {
                "name": "Mi voz (radio)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "status": "ok",
                  "voice_id": "c4e2a7b1-8f3d-4b6e-9a21-5d7c0e9f4b38",
                  "name": "Mi voz (radio)"
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/models": {
      "get": {
        "operationId": "models",
        "summary": "List models",
        "description": "Returns the available TTS models.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-models",
        "tags": [
          "Models"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-models"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "models": [
                    {
                      "model_id": "voyager-1",
                      "name": "Voyager 1",
                      "description": "Voicefinder's flagship text-to-speech model…",
                      "can_do_text_to_speech": true,
                      "can_do_voice_conversion": false,
                      "max_characters_per_request": 10000,
                      "maximum_text_length_per_request": 10000,
                      "supported_formats": [
                        "wav",
                        "mp3"
                      ],
                      "sample_rate": 24000,
                      "content_marking": {
                        "watermark": true,
                        "c2pa": true
                      },
                      "languages": [
                        {
                          "code": "es",
                          "language_id": "es",
                          "name": "Spanish"
                        },
                        {
                          "code": "en",
                          "language_id": "en",
                          "name": "English"
                        },
                        {
                          "code": "ca",
                          "language_id": "ca",
                          "name": "Catalan"
                        },
                        {
                          "code": "eu",
                          "language_id": "eu",
                          "name": "Basque"
                        },
                        {
                          "code": "gl",
                          "language_id": "gl",
                          "name": "Galician"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sound-effects": {
      "get": {
        "operationId": "soundEffects",
        "summary": "List sound effects",
        "description": "The sound effects that play in generation, and how to write them in each language.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-sound-effects",
        "tags": [
          "Sound effects"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-sound-effects"
        },
        "parameters": [
          {
            "name": "language",
            "in": "query",
            "required": false,
            "description": "Language of localized_name and localized_tag: any form that language accepts in generation (\"es\", \"pt-BR\", \"German\"). Defaults to English. A language that is not accepted returns 422 unsupported_language.",
            "schema": {
              "type": "string",
              "examples": [
                "es"
              ]
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Only the effects in that category. Any other value returns 422.",
            "schema": {
              "type": "string",
              "enum": [
                "audience",
                "office",
                "commerce",
                "home",
                "people",
                "nature",
                "city",
                "mystery",
                "halloween",
                "christmas",
                "ui"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Searches by name in any language (\"timbre\", \"doorbell\", \"Türklingel\"), ignoring case and accents.",
            "schema": {
              "type": "string",
              "examples": [
                "timbre"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "sound_effects": [
                    {
                      "sound_effect_id": "window",
                      "name": "Window",
                      "localized_name": "Ventana",
                      "tag": "window",
                      "localized_tag": "ventana",
                      "category": "home",
                      "type": "action",
                      "ambience": false,
                      "variant_count": 4,
                      "durations_s": [
                        1.67,
                        2.5,
                        3.46,
                        2.5
                      ]
                    },
                    {
                      "sound_effect_id": "vacuum",
                      "name": "Vacuum cleaner",
                      "localized_name": "Aspiradora",
                      "tag": "vacuum",
                      "localized_tag": "aspiradora",
                      "category": "home",
                      "type": "ambience",
                      "ambience": true,
                      "variant_count": 5,
                      "durations_s": [
                        6,
                        5.2,
                        7.5,
                        6,
                        6
                      ]
                    }
                  ],
                  "total_count": 2,
                  "language": "es",
                  "categories": [
                    "audience",
                    "office",
                    "commerce",
                    "home",
                    "people",
                    "nature",
                    "city",
                    "mystery",
                    "halloween",
                    "christmas",
                    "ui"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/history": {
      "get": {
        "operationId": "history",
        "summary": "List history",
        "description": "Lists your generations, with filters.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-history",
        "tags": [
          "History"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-history"
        },
        "parameters": [
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "description": "Number of generations per page. It must be an integer (otherwise 422); out-of-range values are clamped to 1 or 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Origin of the generations: api (made via API), ad_studio (from the web app studios), web (from the classic TTS studio) or all (every origin).",
            "schema": {
              "type": "string",
              "enum": [
                "api",
                "ad_studio",
                "web",
                "all"
              ],
              "default": "api"
            }
          },
          {
            "name": "voice_id",
            "in": "query",
            "required": false,
            "description": "Filters by voice.",
            "schema": {
              "type": "string",
              "examples": [
                "9d3f8a2e-…"
              ]
            }
          },
          {
            "name": "date_after",
            "in": "query",
            "required": false,
            "description": "Only generations strictly after this date: ISO 8601 or a Unix timestamp in seconds. A date that cannot be parsed returns 422.",
            "schema": {
              "type": "string",
              "examples": [
                "2026-07-01T00:00:00Z"
              ]
            }
          },
          {
            "name": "date_before",
            "in": "query",
            "required": false,
            "description": "Only generations strictly before this date (ISO 8601 or a Unix timestamp in seconds; if it cannot be parsed, 422). Use it to paginate: pass the created_at of the last generation of the previous page.",
            "schema": {
              "type": "string",
              "examples": [
                "2026-07-09T00:00:00Z"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "history": [
                    {
                      "generation_id": "e7c1a9b2-5d4f-4a38-9c0e-6f2b8d7a1c53",
                      "text": "Hola, bienvenido a Voicefinder.",
                      "voice_id": "9d3f8a2e-…",
                      "voice_name": "Carmen",
                      "style_id": null,
                      "model": "Voyager 1",
                      "character_count": 31,
                      "source": "api",
                      "created_at": "2026-07-09T10:00:00Z",
                      "params": {
                        "language": "es",
                        "seed": 184530221,
                        "output_format": "mp3",
                        "content_marking": {
                          "watermarked": true,
                          "c2pa_signed": true
                        }
                      }
                    }
                  ],
                  "has_more": false
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/history/{generation_id}": {
      "get": {
        "operationId": "historyDetail",
        "summary": "Get generation",
        "description": "Returns the metadata of one generation.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-history-detail",
        "tags": [
          "History"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-history-detail"
        },
        "parameters": [
          {
            "name": "generation_id",
            "in": "path",
            "required": true,
            "description": "Generation identifier. It is the x-request-id header of the generation response, and it also appears in GET /history.",
            "schema": {
              "type": "string",
              "examples": [
                "e7c1a9b2-5d4f-4a38-9c0e-6f2b8d7a1c53"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "generation_id": "e7c1a9b2-5d4f-4a38-9c0e-6f2b8d7a1c53",
                  "text": "Hola, bienvenido a Voicefinder.",
                  "voice_id": "9d3f8a2e-…",
                  "voice_name": "Carmen",
                  "style_id": null,
                  "style_name": null,
                  "model": "Voyager 1",
                  "character_count": 31,
                  "source": "api",
                  "created_at": "2026-07-09T10:00:00Z",
                  "params": {
                    "language": "es",
                    "seed": 184530221,
                    "output_format": "mp3",
                    "content_marking": {
                      "watermarked": true,
                      "c2pa_signed": true
                    }
                  },
                  "has_audio": true
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/history/{generation_id}/audio": {
      "get": {
        "operationId": "historyAudio",
        "summary": "Download audio",
        "description": "Re-downloads the audio of a generation.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-history-audio",
        "tags": [
          "History"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-history-audio"
        },
        "parameters": [
          {
            "name": "generation_id",
            "in": "path",
            "required": true,
            "description": "Generation identifier. It is the x-request-id header of the generation response, and it also appears in GET /history.",
            "schema": {
              "type": "string",
              "examples": [
                "e7c1a9b2-5d4f-4a38-9c0e-6f2b8d7a1c53"
              ]
            }
          },
          {
            "name": "output_format",
            "in": "query",
            "required": false,
            "description": "Format of the downloaded audio. Any other value returns 422.",
            "schema": {
              "type": "string",
              "enum": [
                "wav",
                "mp3"
              ],
              "default": "wav"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The audio file, with its AI-content marking embedded (watermark and C2PA Content Credentials).",
            "content": {
              "audio/wav": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "audio/mpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/user": {
      "get": {
        "operationId": "user",
        "summary": "Get user",
        "description": "Returns your account, plan and remaining credits.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-user",
        "tags": [
          "User"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-user"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "user_id": "f2a8c4e6-…",
                  "email": "dev@example.com",
                  "first_name": "Dev",
                  "last_name": "Example",
                  "subscription": {
                    "plan": "standard",
                    "status": "active",
                    "current_period_end": "2026-08-01T00:00:00Z"
                  },
                  "credits": {
                    "characters_remaining": 48210,
                    "characters_reset_at": "2026-08-01T00:00:00Z"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/user/subscription": {
      "get": {
        "operationId": "subscription",
        "summary": "Get subscription",
        "description": "Plan and characters in subscription format.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-subscription",
        "tags": [
          "User"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-subscription"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/usage": {
      "get": {
        "operationId": "usage",
        "summary": "Get usage",
        "description": "Usage statistics per period.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-usage",
        "tags": [
          "Usage"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-usage"
        },
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Days back included in the period. It must be an integer (otherwise 422); out-of-range values are clamped to 1 or 90.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90,
              "default": 30
            }
          },
          {
            "name": "breakdown",
            "in": "query",
            "required": false,
            "description": "With \"day\" it includes api.daily, the daily breakdown of API usage (only days with activity, as UTC dates). With \"total\" it is omitted.",
            "schema": {
              "type": "string",
              "enum": [
                "day",
                "total"
              ],
              "default": "day"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "period": {
                    "days": 30,
                    "start": "2026-06-09T10:00:00.000Z",
                    "end": "2026-07-09T10:00:00.000Z"
                  },
                  "api": {
                    "characters_used": 1790,
                    "generation_count": 12,
                    "total_requests": 58,
                    "daily": [
                      {
                        "date": "2026-07-08",
                        "characters": 310,
                        "requests": 2
                      }
                    ]
                  },
                  "web": {
                    "characters_used": 5400,
                    "generation_count": 21
                  },
                  "total": {
                    "characters_used": 7190,
                    "generation_count": 33
                  },
                  "credits": {
                    "characters_remaining": 48210
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Health check",
        "description": "Public service status. No API key required.\n\nDocs: https://voicefinder.io/en/developers/docs#ep-health",
        "tags": [
          "Health"
        ],
        "externalDocs": {
          "url": "https://voicefinder.io/en/developers/docs#ep-health"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "status": "healthy",
                  "checks": {
                    "database": "ok",
                    "tts": "ok"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error. Every error shares this JSON shape; `detail.code` names the cause.\n\n- **200**: Request succeeded.\n- **401**: Missing, invalid or revoked API key.\n- **402**: Not enough credits for this generation (the response includes characters_required and characters_remaining), or the account has no credit balance (on any endpoint).\n- **403**: The account does not have the voice API enabled or is disabled (account_disabled), the key is suspended (key_suspended), or the text violates the content rules or the voice's usage restrictions (the response includes reasons).\n- **404**: Voice, style, generation, audio or account not found.\n- **422**: Invalid JSON body, out-of-range parameter, unavailable output format (pcm_*, ulaw_8000, opus_*…) a filter with an unsupported value (gender or age in GET /voices), an out-of-range seed, a non-integer page_size or days, an invalid date or an unsupported tag. The message names the field.\n- **429**: Plan limit exceeded (requests per minute, concurrent generations or characters per hour) or access temporarily blocked. Honor the Retry-After header.\n- **500**: Internal error. Retry; if it persists, contact support.\n- **502**: Generation failed, came back empty or truncated, or content marking could not complete. Nothing is deducted. Retry.\n- **503**: The voice service is at capacity or unavailable, content moderation or the admission system is not responding, the audio cannot be delivered marked right now (content_marking_unavailable) or the sound effects cannot be prepared right now (sound_effects_unavailable). If Retry-After is present, wait that many seconds before retrying.\n\nFull list: https://voicefinder.io/en/developers/docs#status-codes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "status": 422,
                    "message": "cfg_scale must be a number between 1.0 and 4.0."
                  },
                  "detail": {
                    "type": "validation_error",
                    "code": "invalid_parameters",
                    "message": "cfg_scale must be a number between 1.0 and 4.0.",
                    "status": "invalid_parameters",
                    "request_id": "6f1c2e0a-…"
                  }
                }
              }
            }
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Your vf_ key."
      },
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authorization: Bearer vf_your_key"
      },
      "xiApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "xi-api-key",
        "description": "Compatibility header (ElevenLabs SDK)."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "status": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              }
            }
          },
          "detail": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}