{
  "openapi": "3.1.0",
  "info": {
    "title": "Runware API - Gemini 3.1 Flash TTS",
    "summary": "Expressive text-to-speech with audio tags, multi-speaker dialogue, and 70+ languages",
    "description": "Gemini 3.1 Flash TTS is a text-to-speech model for expressive spoken audio generation from text. It supports granular control over delivery through audio tags, native multi-speaker dialogue, and speech generation across 70+ languages, making it suitable for narration, conversational voice apps, podcasts, audiobooks, and other production-oriented voice workflows.",
    "version": "1.0.0",
    "x-model-id": "google-gemini-3-1-flash-tts",
    "x-air-id": "google:gemini@3.1-flash-tts",
    "x-status": "coming-soon",
    "x-creator": {
      "id": "google",
      "name": "Google",
      "logo": "https://assets.runware.ai/c6494cd0-df37-490c-a3b5-eedadec1d81e.png"
    },
    "x-capabilities": [
      "text-to-audio"
    ],
    "x-released-at": "2026-04-15T00:00:00Z",
    "x-cover-image": "https://assets.runware.ai/93921d15-93a0-4930-90f9-9bf8a07f8e40.jpeg"
  },
  "servers": [
    {
      "url": "https://api.runware.ai/v1",
      "description": "Runware REST API"
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Runware API Key (e.g., Bearer <your-key>)"
      }
    },
    "schemas": {
      "AuthenticationTask": {
        "title": "Authentication",
        "description": "Authenticates a connection using an API key. Can be sent as the first element of the request array as an alternative to using the Authorization header.",
        "type": "object",
        "x-response-schema": "https://schemas.runware.ai/responses/utilities/authentication.json",
        "properties": {
          "taskType": {
            "const": "authentication",
            "title": "Task Type",
            "description": "The type of task to perform."
          },
          "apiKey": {
            "title": "API Key",
            "description": "Your Runware API key.",
            "type": "string"
          },
          "connectionSessionUUID": {
            "title": "Connection Session UUID",
            "description": "Optional session UUID to resume a previous connection and receive any buffered results.",
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "taskType",
          "apiKey"
        ],
        "additionalProperties": false
      },
      "RequestBody": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "model": {
              "title": "Model",
              "description": "Identifier of the model to use for generation.",
              "type": "string",
              "const": "google:gemini@3.1-flash-tts"
            },
            "speech": {
              "title": "Speech",
              "description": "Settings for speech generation.",
              "type": "object",
              "properties": {
                "text": {
                  "title": "Speech Text",
                  "description": "Text to convert to speech. For dialogue mode, use speaker tags such as [Sam] Hello [Bob] Hi there. Provider markup tags like [laughs] and [short pause] are also supported.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 4000
                },
                "voice": {
                  "title": "Voice",
                  "description": "Voice identifier to use. Set to `auto` for automatic selection.",
                  "type": "string",
                  "default": "Zephyr",
                  "oneOf": [
                    {
                      "const": "Achernar",
                      "description": "Female, Soft"
                    },
                    {
                      "const": "Achird",
                      "description": "Male, Friendly"
                    },
                    {
                      "const": "Algenib",
                      "description": "Male, Gravelly"
                    },
                    {
                      "const": "Algieba",
                      "description": "Male, Smooth"
                    },
                    {
                      "const": "Alnilam",
                      "description": "Male, Firm"
                    },
                    {
                      "const": "Aoede",
                      "description": "Female, Breezy"
                    },
                    {
                      "const": "Autonoe",
                      "description": "Female, Bright"
                    },
                    {
                      "const": "Callirrhoe",
                      "description": "Female, Easy-going"
                    },
                    {
                      "const": "Charon",
                      "description": "Male, Informative"
                    },
                    {
                      "const": "Despina",
                      "description": "Female, Smooth"
                    },
                    {
                      "const": "Enceladus",
                      "description": "Male, Breathy"
                    },
                    {
                      "const": "Erinome",
                      "description": "Female, Clear"
                    },
                    {
                      "const": "Fenrir",
                      "description": "Male, Excitable"
                    },
                    {
                      "const": "Gacrux",
                      "description": "Female, Mature"
                    },
                    {
                      "const": "Iapetus",
                      "description": "Male, Clear"
                    },
                    {
                      "const": "Kore",
                      "description": "Female, Firm"
                    },
                    {
                      "const": "Laomedeia",
                      "description": "Female, Upbeat"
                    },
                    {
                      "const": "Leda",
                      "description": "Female, Youthful"
                    },
                    {
                      "const": "Orus",
                      "description": "Male, Firm"
                    },
                    {
                      "const": "Puck",
                      "description": "Male, Upbeat"
                    },
                    {
                      "const": "Pulcherrima",
                      "description": "Female, Forward"
                    },
                    {
                      "const": "Rasalgethi",
                      "description": "Male, Informative"
                    },
                    {
                      "const": "Sadachbia",
                      "description": "Male, Lively"
                    },
                    {
                      "const": "Sadaltager",
                      "description": "Male, Knowledgeable"
                    },
                    {
                      "const": "Schedar",
                      "description": "Male, Even"
                    },
                    {
                      "const": "Sulafat",
                      "description": "Female, Warm"
                    },
                    {
                      "const": "Umbriel",
                      "description": "Male, Easy-going"
                    },
                    {
                      "const": "Vindemiatrix",
                      "description": "Female, Gentle"
                    },
                    {
                      "const": "Zephyr",
                      "description": "Female, Bright"
                    },
                    {
                      "const": "Zubenelgenubi",
                      "description": "Male, Casual"
                    }
                  ]
                },
                "voices": {
                  "type": "array",
                  "title": "Voices",
                  "description": "Two-speaker dialogue configuration. Use instead of voice for multi-speaker generation.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "speaker": {
                        "type": "string",
                        "title": "Speaker",
                        "description": "Unique alphanumeric speaker alias. Must appear in the text as [Alias].",
                        "minLength": 1
                      },
                      "voice": {
                        "title": "Voice",
                        "description": "Voice identifier to use. Set to `auto` for automatic selection.",
                        "type": "string",
                        "default": "Zephyr",
                        "oneOf": [
                          {
                            "const": "Achernar",
                            "description": "Female, Soft"
                          },
                          {
                            "const": "Achird",
                            "description": "Male, Friendly"
                          },
                          {
                            "const": "Algenib",
                            "description": "Male, Gravelly"
                          },
                          {
                            "const": "Algieba",
                            "description": "Male, Smooth"
                          },
                          {
                            "const": "Alnilam",
                            "description": "Male, Firm"
                          },
                          {
                            "const": "Aoede",
                            "description": "Female, Breezy"
                          },
                          {
                            "const": "Autonoe",
                            "description": "Female, Bright"
                          },
                          {
                            "const": "Callirrhoe",
                            "description": "Female, Easy-going"
                          },
                          {
                            "const": "Charon",
                            "description": "Male, Informative"
                          },
                          {
                            "const": "Despina",
                            "description": "Female, Smooth"
                          },
                          {
                            "const": "Enceladus",
                            "description": "Male, Breathy"
                          },
                          {
                            "const": "Erinome",
                            "description": "Female, Clear"
                          },
                          {
                            "const": "Fenrir",
                            "description": "Male, Excitable"
                          },
                          {
                            "const": "Gacrux",
                            "description": "Female, Mature"
                          },
                          {
                            "const": "Iapetus",
                            "description": "Male, Clear"
                          },
                          {
                            "const": "Kore",
                            "description": "Female, Firm"
                          },
                          {
                            "const": "Laomedeia",
                            "description": "Female, Upbeat"
                          },
                          {
                            "const": "Leda",
                            "description": "Female, Youthful"
                          },
                          {
                            "const": "Orus",
                            "description": "Male, Firm"
                          },
                          {
                            "const": "Puck",
                            "description": "Male, Upbeat"
                          },
                          {
                            "const": "Pulcherrima",
                            "description": "Female, Forward"
                          },
                          {
                            "const": "Rasalgethi",
                            "description": "Male, Informative"
                          },
                          {
                            "const": "Sadachbia",
                            "description": "Male, Lively"
                          },
                          {
                            "const": "Sadaltager",
                            "description": "Male, Knowledgeable"
                          },
                          {
                            "const": "Schedar",
                            "description": "Male, Even"
                          },
                          {
                            "const": "Sulafat",
                            "description": "Female, Warm"
                          },
                          {
                            "const": "Umbriel",
                            "description": "Male, Easy-going"
                          },
                          {
                            "const": "Vindemiatrix",
                            "description": "Female, Gentle"
                          },
                          {
                            "const": "Zephyr",
                            "description": "Female, Bright"
                          },
                          {
                            "const": "Zubenelgenubi",
                            "description": "Male, Casual"
                          }
                        ]
                      }
                    },
                    "required": [
                      "speaker",
                      "voice"
                    ],
                    "additionalProperties": false
                  },
                  "minItems": 2,
                  "maxItems": 2
                },
                "language": {
                  "title": "Language",
                  "description": "Language code for speech generation.",
                  "type": "string",
                  "minLength": 1,
                  "default": "en-US",
                  "oneOf": [
                    {
                      "description": "Arabic (Egypt)",
                      "const": "ar-EG"
                    },
                    {
                      "description": "Bangla (Bangladesh)",
                      "const": "bn-BD"
                    },
                    {
                      "description": "Dutch (Netherlands)",
                      "const": "nl-NL"
                    },
                    {
                      "description": "English (India)",
                      "const": "en-IN"
                    },
                    {
                      "description": "English (United States)",
                      "const": "en-US"
                    },
                    {
                      "description": "French (France)",
                      "const": "fr-FR"
                    },
                    {
                      "description": "German (Germany)",
                      "const": "de-DE"
                    },
                    {
                      "description": "Hindi (India)",
                      "const": "hi-IN"
                    },
                    {
                      "description": "Indonesian (Indonesia)",
                      "const": "id-ID"
                    },
                    {
                      "description": "Italian (Italy)",
                      "const": "it-IT"
                    },
                    {
                      "description": "Japanese (Japan)",
                      "const": "ja-JP"
                    },
                    {
                      "description": "Korean (South Korea)",
                      "const": "ko-KR"
                    },
                    {
                      "description": "Marathi (India)",
                      "const": "mr-IN"
                    },
                    {
                      "description": "Polish (Poland)",
                      "const": "pl-PL"
                    },
                    {
                      "description": "Portuguese (Brazil)",
                      "const": "pt-BR"
                    },
                    {
                      "description": "Romanian (Romania)",
                      "const": "ro-RO"
                    },
                    {
                      "description": "Russian (Russia)",
                      "const": "ru-RU"
                    },
                    {
                      "description": "Spanish (Spain)",
                      "const": "es-ES"
                    },
                    {
                      "description": "Tamil (India)",
                      "const": "ta-IN"
                    },
                    {
                      "description": "Telugu (India)",
                      "const": "te-IN"
                    },
                    {
                      "description": "Thai (Thailand)",
                      "const": "th-TH"
                    },
                    {
                      "description": "Turkish (Turkey)",
                      "const": "tr-TR"
                    },
                    {
                      "description": "Ukrainian (Ukraine)",
                      "const": "uk-UA"
                    },
                    {
                      "description": "Vietnamese (Vietnam)",
                      "const": "vi-VN"
                    },
                    {
                      "description": "Afrikaans (South Africa)",
                      "const": "af-ZA"
                    },
                    {
                      "description": "Albanian (Albania)",
                      "const": "sq-AL"
                    },
                    {
                      "description": "Amharic (Ethiopia)",
                      "const": "am-ET"
                    },
                    {
                      "description": "Arabic (World)",
                      "const": "ar-001"
                    },
                    {
                      "description": "Armenian (Armenia)",
                      "const": "hy-AM"
                    },
                    {
                      "description": "Azerbaijani (Azerbaijan)",
                      "const": "az-AZ"
                    },
                    {
                      "description": "Basque (Spain)",
                      "const": "eu-ES"
                    },
                    {
                      "description": "Belarusian (Belarus)",
                      "const": "be-BY"
                    },
                    {
                      "description": "Bulgarian (Bulgaria)",
                      "const": "bg-BG"
                    },
                    {
                      "description": "Burmese (Myanmar)",
                      "const": "my-MM"
                    },
                    {
                      "description": "Catalan (Spain)",
                      "const": "ca-ES"
                    },
                    {
                      "description": "Cebuano (Philippines)",
                      "const": "ceb-PH"
                    },
                    {
                      "description": "Chinese, Mandarin (China)",
                      "const": "cmn-CN"
                    },
                    {
                      "description": "Chinese, Mandarin (Taiwan)",
                      "const": "cmn-tw"
                    },
                    {
                      "description": "Croatian (Croatia)",
                      "const": "hr-HR"
                    },
                    {
                      "description": "Czech (Czech Republic)",
                      "const": "cs-CZ"
                    },
                    {
                      "description": "Danish (Denmark)",
                      "const": "da-DK"
                    },
                    {
                      "description": "English (Australia)",
                      "const": "en-AU"
                    },
                    {
                      "description": "English (United Kingdom)",
                      "const": "en-GB"
                    },
                    {
                      "description": "Estonian (Estonia)",
                      "const": "et-EE"
                    },
                    {
                      "description": "Filipino (Philippines)",
                      "const": "fil-PH"
                    },
                    {
                      "description": "Finnish (Finland)",
                      "const": "fi-FI"
                    },
                    {
                      "description": "French (Canada)",
                      "const": "fr-CA"
                    },
                    {
                      "description": "Galician (Spain)",
                      "const": "gl-ES"
                    },
                    {
                      "description": "Georgian (Georgia)",
                      "const": "ka-GE"
                    },
                    {
                      "description": "Greek (Greece)",
                      "const": "el-GR"
                    },
                    {
                      "description": "Gujarati (India)",
                      "const": "gu-IN"
                    },
                    {
                      "description": "Haitian Creole (Haiti)",
                      "const": "ht-HT"
                    },
                    {
                      "description": "Hebrew (Israel)",
                      "const": "he-IL"
                    },
                    {
                      "description": "Hungarian (Hungary)",
                      "const": "hu-HU"
                    },
                    {
                      "description": "Icelandic (Iceland)",
                      "const": "is-IS"
                    },
                    {
                      "description": "Javanese (Java)",
                      "const": "jv-JV"
                    },
                    {
                      "description": "Kannada (India)",
                      "const": "kn-IN"
                    },
                    {
                      "description": "Konkani (India)",
                      "const": "kok-IN"
                    },
                    {
                      "description": "Lao (Laos)",
                      "const": "lo-LA"
                    },
                    {
                      "description": "Latin (Vatican City)",
                      "const": "la-VA"
                    },
                    {
                      "description": "Latvian (Latvia)",
                      "const": "lv-LV"
                    },
                    {
                      "description": "Lithuanian (Lithuania)",
                      "const": "lt-LT"
                    },
                    {
                      "description": "Luxembourgish (Luxembourg)",
                      "const": "lb-LU"
                    },
                    {
                      "description": "Macedonian (North Macedonia)",
                      "const": "mk-MK"
                    },
                    {
                      "description": "Maithili (India)",
                      "const": "mai-IN"
                    },
                    {
                      "description": "Malagasy (Madagascar)",
                      "const": "mg-MG"
                    },
                    {
                      "description": "Malay (Malaysia)",
                      "const": "ms-MY"
                    },
                    {
                      "description": "Malayalam (India)",
                      "const": "ml-IN"
                    },
                    {
                      "description": "Mongolian (Mongolia)",
                      "const": "mn-MN"
                    },
                    {
                      "description": "Nepali (Nepal)",
                      "const": "ne-NP"
                    },
                    {
                      "description": "Norwegian, Bokmål (Norway)",
                      "const": "nb-NO"
                    },
                    {
                      "description": "Norwegian, Nynorsk (Norway)",
                      "const": "nn-NO"
                    },
                    {
                      "description": "Odia (India)",
                      "const": "or-IN"
                    },
                    {
                      "description": "Pashto (Afghanistan)",
                      "const": "ps-AF"
                    },
                    {
                      "description": "Persian (Iran)",
                      "const": "fa-IR"
                    },
                    {
                      "description": "Portuguese (Portugal)",
                      "const": "pt-PT"
                    },
                    {
                      "description": "Punjabi (India)",
                      "const": "pa-IN"
                    },
                    {
                      "description": "Serbian (Serbia)",
                      "const": "sr-RS"
                    },
                    {
                      "description": "Sindhi (India)",
                      "const": "sd-IN"
                    },
                    {
                      "description": "Sinhala (Sri Lanka)",
                      "const": "si-LK"
                    },
                    {
                      "description": "Slovak (Slovakia)",
                      "const": "sk-SK"
                    },
                    {
                      "description": "Slovenian (Slovenia)",
                      "const": "sl-SI"
                    },
                    {
                      "description": "Spanish (Latin America)",
                      "const": "es-419"
                    },
                    {
                      "description": "Spanish (Mexico)",
                      "const": "es-MX"
                    },
                    {
                      "description": "Swahili (Kenya)",
                      "const": "sw-KE"
                    },
                    {
                      "description": "Swedish (Sweden)",
                      "const": "sv-SE"
                    },
                    {
                      "description": "Urdu (Pakistan)",
                      "const": "ur-PK"
                    }
                  ]
                }
              },
              "required": [
                "text"
              ],
              "additionalProperties": false
            },
            "taskType": {
              "title": "Task Type",
              "description": "Identifier for the type of task being performed",
              "type": "string",
              "const": "audioInference"
            },
            "taskUUID": {
              "title": "Task UUID",
              "description": "UUID v4 identifier for tracking tasks and matching async responses. Must be unique per task.",
              "type": "string",
              "format": "uuid"
            },
            "webhookURL": {
              "title": "Webhook URL",
              "description": "Specifies a webhook URL where JSON responses will be sent via HTTP POST when generation tasks complete. For batch requests with multiple results, each completed item triggers a separate webhook call as it becomes available.",
              "type": "string",
              "format": "uri"
            },
            "includeCost": {
              "title": "Include Cost",
              "description": "Include task cost in the response.",
              "type": "boolean",
              "default": false
            },
            "numberResults": {
              "title": "Number of Results",
              "description": "Number of results to generate. Each result uses a different seed, producing variations of the same parameters.",
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "maximum": 4
            },
            "uploadEndpoint": {
              "title": "Upload Endpoint",
              "description": "Specifies a URL where the generated content will be automatically uploaded using the HTTP PUT method. The raw binary data of the media file is sent directly as the request body. For secure uploads to cloud storage, use presigned URLs that include temporary authentication credentials.\n\n**Common use cases:**\n\n- **Cloud storage**: Upload directly to S3 buckets, Google Cloud Storage, or Azure Blob Storage using presigned URLs.\n- **CDN integration**: Upload to content delivery networks for immediate distribution.\n\n```text\n// S3 presigned URL for secure upload\nhttps://your-bucket.s3.amazonaws.com/generated/content.mp4?X-Amz-Signature=abc123&X-Amz-Expires=3600\n\n// Google Cloud Storage presigned URL\nhttps://storage.googleapis.com/your-bucket/content.jpg?X-Goog-Signature=xyz789\n\n// Custom storage endpoint\nhttps://storage.example.com/uploads/generated-image.jpg\n```\n\nThe content data will be sent as the request body to the specified URL when generation is complete.\n\n[Read full documentation](https://runware.ai/docs/models/google-gemini-3-1-flash-tts#uploadEndpoint)",
              "type": "string",
              "format": "uri"
            },
            "ttl": {
              "title": "TTL",
              "description": "Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`.",
              "type": "integer",
              "minimum": 60
            },
            "outputType": {
              "title": "Output Type",
              "description": "Audio output type.",
              "type": "string",
              "enum": [
                "URL",
                "base64Data",
                "dataURI"
              ],
              "default": "URL"
            },
            "outputFormat": {
              "title": "Output Format",
              "description": "Specifies the file format of the generated output. The available values depend on the task type and the specific model's capabilities.\n\n- \\`JPG\\`: Best for photorealistic images with smaller file sizes (no transparency).\n- \\`PNG\\`: Lossless compression, supports high quality and transparency (alpha channel).\n- \\`WEBP\\`: Modern format providing superior compression and transparency support.\n- \\`MP4\\`: Widely supported video container (H.264), recommended for general use.\n- \\`WEBM\\`: Optimized for web delivery.\n- \\`MOV\\`: QuickTime format, common in professional workflows (Apple ecosystem).\n- \\`GIF\\`: Animated image format (no audio), suitable for short loops or previews.\n- \\`MP3\\`: Compressed audio, smaller file size.\n- \\`WAV\\`: Uncompressed, high-quality audio.\n- \\`FLAC\\`: Lossless compression.\n- \\`OGG\\`: Open-source compressed audio format (Vorbis codec).\n- \\`SVG\\`: Scalable Vector Graphics.\n- \\`TIFF\\`: High-quality output supporting layers.\n\n> [!NOTE]\n> \\*\\*Transparency\\*\\*: If you are using features like background removal or LayerDiffuse that require transparency, you must select a format that supports an alpha channel (e.g., \\`PNG\\`, \\`WEBP\\`, \\`TIFF\\`). \\`JPG\\` does not support transparency.\n\n[Read full documentation](https://runware.ai/docs/models/google-gemini-3-1-flash-tts#outputFormat)",
              "type": "string",
              "enum": [
                "MP3",
                "WAV",
                "FLAC",
                "OGG"
              ],
              "default": "MP3"
            },
            "deliveryMethod": {
              "title": "Delivery Method",
              "description": "Determines how the API delivers task results.",
              "type": "string",
              "oneOf": [
                {
                  "const": "sync",
                  "description": "Returns complete results directly in the API response."
                },
                {
                  "const": "async",
                  "description": "Returns an immediate acknowledgment with the task UUID. Poll for results using getResponse."
                }
              ],
              "default": "sync"
            },
            "audioSettings": {
              "title": "Audio Settings",
              "description": "Audio encoding settings for controlling the bitrate, number of channels, and sample rate of the generated audio. Only applicable for lossy output formats (`MP3` and `OGG`). When using lossless formats (`WAV` or `FLAC`), this parameter must not be provided.\n\nThe available sample rates and valid bitrate ranges depend on the output format. For `OGG`, bitrate limits also vary by the number of channels.\n\n**MP3 bitrate limits**:\n\nBitrate limits for MP3 are the same regardless of mono or stereo.\n\n| Sample Rate | Min Bitrate | Max Bitrate |\n| --- | --- | --- |\n| 8,000 Hz | 8 kbps | 64 kbps |\n| 11,025 Hz | 8 kbps | 64 kbps |\n| 12,000 Hz | 8 kbps | 64 kbps |\n| 16,000 Hz | 8 kbps | 160 kbps |\n| 22,050 Hz | 8 kbps | 160 kbps |\n| 24,000 Hz | 8 kbps | 160 kbps |\n| 32,000 Hz | 32 kbps | 320 kbps |\n| 44,100 Hz | 32 kbps | 320 kbps |\n| 48,000 Hz | 32 kbps | 320 kbps |\n\n**OGG bitrate limits — Mono (1 channel)**:\n\n| Sample Rate | Min Bitrate | Max Bitrate |\n| --- | --- | --- |\n| 8,000 Hz | 8 kbps | 40 kbps |\n| 12,000 Hz | 16 kbps | 48 kbps |\n| 16,000 Hz | 16 kbps | 96 kbps |\n| 24,000 Hz | 16 kbps | 80 kbps |\n| 48,000 Hz | 32 kbps | 224 kbps |\n\n**OGG bitrate limits — Stereo (2 channels)**:\n\n| Sample Rate | Min Bitrate | Max Bitrate |\n| --- | --- | --- |\n| 8,000 Hz | 16 kbps | 80 kbps |\n| 12,000 Hz | 16 kbps | 96 kbps |\n| 16,000 Hz | 24 kbps | 192 kbps |\n| 24,000 Hz | 32 kbps | 160 kbps |\n| 48,000 Hz | 48 kbps | 256 kbps |\n\n> [!NOTE]\n> **Lossless formats**: When `outputFormat` is set to `WAV` or `FLAC`, the `audioSettings` parameter is not available since these formats produce uncompressed or lossless audio with no configurable encoding settings.\n\n[Read full documentation](https://runware.ai/docs/models/google-gemini-3-1-flash-tts#audioSettings)",
              "type": "object",
              "properties": {
                "bitrate": {
                  "title": "Bitrate",
                  "description": "Audio bitrate in kbps.",
                  "type": "integer",
                  "minimum": 8
                },
                "channels": {
                  "title": "Channels",
                  "description": "Number of audio channels. 1 for mono, 2 for stereo.",
                  "type": "integer",
                  "enum": [
                    1,
                    2
                  ],
                  "default": 2
                },
                "sampleRate": {
                  "title": "Sample Rate",
                  "description": "Audio sample rate in Hz.",
                  "type": "integer"
                }
              },
              "additionalProperties": false
            }
          },
          "required": [
            "speech",
            "taskType",
            "taskUUID",
            "model"
          ],
          "allOf": [
            {
              "if": {
                "properties": {
                  "outputFormat": {
                    "enum": [
                      "WAV",
                      "FLAC"
                    ]
                  }
                },
                "required": [
                  "outputFormat"
                ]
              },
              "then": {
                "not": {
                  "required": [
                    "audioSettings"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "outputFormat": {
                    "const": "MP3"
                  }
                },
                "required": [
                  "outputFormat"
                ]
              },
              "then": {
                "properties": {
                  "audioSettings": {
                    "properties": {
                      "sampleRate": {
                        "enum": [
                          8000,
                          11025,
                          12000,
                          16000,
                          22050,
                          24000,
                          32000,
                          44100,
                          48000
                        ]
                      }
                    }
                  }
                },
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "sampleRate": {
                              "enum": [
                                8000,
                                11025,
                                12000
                              ]
                            }
                          },
                          "required": [
                            "sampleRate"
                          ]
                        }
                      },
                      "required": [
                        "audioSettings"
                      ]
                    },
                    "then": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "bitrate": {
                              "minimum": 8,
                              "maximum": 64
                            }
                          }
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "sampleRate": {
                              "enum": [
                                16000,
                                22050,
                                24000
                              ]
                            }
                          },
                          "required": [
                            "sampleRate"
                          ]
                        }
                      },
                      "required": [
                        "audioSettings"
                      ]
                    },
                    "then": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "bitrate": {
                              "minimum": 8,
                              "maximum": 160
                            }
                          }
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "sampleRate": {
                              "enum": [
                                32000,
                                44100,
                                48000
                              ]
                            }
                          },
                          "required": [
                            "sampleRate"
                          ]
                        }
                      },
                      "required": [
                        "audioSettings"
                      ]
                    },
                    "then": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "bitrate": {
                              "minimum": 32,
                              "maximum": 320
                            }
                          }
                        }
                      }
                    }
                  }
                ]
              }
            },
            {
              "if": {
                "properties": {
                  "outputFormat": {
                    "const": "OGG"
                  }
                },
                "required": [
                  "outputFormat"
                ]
              },
              "then": {
                "properties": {
                  "audioSettings": {
                    "properties": {
                      "sampleRate": {
                        "enum": [
                          8000,
                          12000,
                          16000,
                          24000,
                          48000
                        ]
                      }
                    }
                  }
                },
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "sampleRate": {
                              "const": 8000
                            },
                            "channels": {
                              "const": 1
                            }
                          },
                          "required": [
                            "sampleRate",
                            "channels"
                          ]
                        }
                      },
                      "required": [
                        "audioSettings"
                      ]
                    },
                    "then": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "bitrate": {
                              "minimum": 8,
                              "maximum": 40
                            }
                          }
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "sampleRate": {
                              "const": 8000
                            },
                            "channels": {
                              "const": 2
                            }
                          },
                          "required": [
                            "sampleRate",
                            "channels"
                          ]
                        }
                      },
                      "required": [
                        "audioSettings"
                      ]
                    },
                    "then": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "bitrate": {
                              "minimum": 16,
                              "maximum": 80
                            }
                          }
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "sampleRate": {
                              "const": 12000
                            },
                            "channels": {
                              "const": 1
                            }
                          },
                          "required": [
                            "sampleRate",
                            "channels"
                          ]
                        }
                      },
                      "required": [
                        "audioSettings"
                      ]
                    },
                    "then": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "bitrate": {
                              "minimum": 16,
                              "maximum": 48
                            }
                          }
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "sampleRate": {
                              "const": 12000
                            },
                            "channels": {
                              "const": 2
                            }
                          },
                          "required": [
                            "sampleRate",
                            "channels"
                          ]
                        }
                      },
                      "required": [
                        "audioSettings"
                      ]
                    },
                    "then": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "bitrate": {
                              "minimum": 16,
                              "maximum": 96
                            }
                          }
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "sampleRate": {
                              "const": 16000
                            },
                            "channels": {
                              "const": 1
                            }
                          },
                          "required": [
                            "sampleRate",
                            "channels"
                          ]
                        }
                      },
                      "required": [
                        "audioSettings"
                      ]
                    },
                    "then": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "bitrate": {
                              "minimum": 16,
                              "maximum": 96
                            }
                          }
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "sampleRate": {
                              "const": 16000
                            },
                            "channels": {
                              "const": 2
                            }
                          },
                          "required": [
                            "sampleRate",
                            "channels"
                          ]
                        }
                      },
                      "required": [
                        "audioSettings"
                      ]
                    },
                    "then": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "bitrate": {
                              "minimum": 24,
                              "maximum": 192
                            }
                          }
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "sampleRate": {
                              "const": 24000
                            },
                            "channels": {
                              "const": 1
                            }
                          },
                          "required": [
                            "sampleRate",
                            "channels"
                          ]
                        }
                      },
                      "required": [
                        "audioSettings"
                      ]
                    },
                    "then": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "bitrate": {
                              "minimum": 16,
                              "maximum": 80
                            }
                          }
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "sampleRate": {
                              "const": 24000
                            },
                            "channels": {
                              "const": 2
                            }
                          },
                          "required": [
                            "sampleRate",
                            "channels"
                          ]
                        }
                      },
                      "required": [
                        "audioSettings"
                      ]
                    },
                    "then": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "bitrate": {
                              "minimum": 32,
                              "maximum": 160
                            }
                          }
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "sampleRate": {
                              "const": 48000
                            },
                            "channels": {
                              "const": 1
                            }
                          },
                          "required": [
                            "sampleRate",
                            "channels"
                          ]
                        }
                      },
                      "required": [
                        "audioSettings"
                      ]
                    },
                    "then": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "bitrate": {
                              "minimum": 32,
                              "maximum": 224
                            }
                          }
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "sampleRate": {
                              "const": 48000
                            },
                            "channels": {
                              "const": 2
                            }
                          },
                          "required": [
                            "sampleRate",
                            "channels"
                          ]
                        }
                      },
                      "required": [
                        "audioSettings"
                      ]
                    },
                    "then": {
                      "properties": {
                        "audioSettings": {
                          "properties": {
                            "bitrate": {
                              "minimum": 48,
                              "maximum": 256
                            }
                          }
                        }
                      }
                    }
                  }
                ]
              }
            },
            {
              "not": {
                "allOf": [
                  {
                    "properties": {
                      "speech": {
                        "required": [
                          "voice"
                        ]
                      }
                    },
                    "required": [
                      "speech"
                    ]
                  },
                  {
                    "properties": {
                      "speech": {
                        "required": [
                          "voices"
                        ]
                      }
                    },
                    "required": [
                      "speech"
                    ]
                  }
                ]
              }
            }
          ],
          "additionalProperties": false
        },
        "description": "You must always POST an array of task objects."
      },
      "ResponseBody": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Unknown response structure"
            }
          }
        }
      },
      "ErrorResponse": {
        "title": "Error Response",
        "description": "Standard error response returned by the Runware API.",
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "code",
                "message"
              ],
              "additionalProperties": true,
              "properties": {
                "code": {
                  "type": "string",
                  "description": "A short identifier for the error (e.g., invalidApiKey, timeoutProvider)."
                },
                "message": {
                  "type": "string",
                  "description": "A human-readable explanation of what went wrong."
                },
                "parameter": {
                  "type": "string",
                  "description": "The request parameter related to the error, if applicable."
                },
                "taskType": {
                  "type": "string",
                  "description": "The task type of the request that failed."
                },
                "taskUUID": {
                  "type": "string",
                  "description": "The unique identifier of the failed request."
                },
                "documentation": {
                  "type": "string",
                  "description": "A link to relevant documentation."
                }
              }
            }
          }
        },
        "required": [
          "errors"
        ],
        "additionalProperties": false
      }
    }
  },
  "paths": {
    "/": {
      "post": {
        "summary": "Run Gemini 3.1 Flash TTS",
        "description": "Gemini 3.1 Flash TTS is a text-to-speech model for expressive spoken audio generation from text. It supports granular control over delivery through audio tags, native multi-speaker dialogue, and speech generation across 70+ languages, making it suitable for narration, conversational voice apps, podcasts, audiobooks, and other production-oriented voice workflows.",
        "operationId": "run_google_gemini_3_1_flash_tts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseBody"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Missing or invalid parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — No valid API key provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — Insufficient account balance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — The API key lacks permissions for this request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server Error — Something went wrong on Runware's end.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable — Temporarily unavailable (maintenance or capacity).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "apiKeyAuth": []
    }
  ]
}