Skip to content

Support OpenRouter TTS models as TTS provider (GPT-4o Mini TTS, Gemini 3.1 Flash TTS, Voxtral) #71268

Description

@AlexStephenLytton

Summary

OpenRouter recently added text-to-speech models that could serve as TTS providers alongside ElevenLabs:

  • GPT-4o Mini TTS — $0.60/1M chars, 4K context, OpenAI voices
  • Gemini 3.1 Flash TTS — $1/M input, $20/M output tokens, 8K context, 200+ inline audio tags (e.g. [whispers], [laughs], [excited]), 70+ languages, multi-speaker, SynthID watermarking
  • Voxtral Mini TTS — $16/1M chars, zero-shot voice cloning

Currently, OpenClaw's TTS subsystem only supports elevenlabs and sag as provider IDs. The OpenRouter TTS API uses a different request/response format than ElevenLabs, so it cannot be used as a drop-in replacement.

Why this matters

  • Cost flexibility: OpenRouter offers pay-per-use TTS without a monthly subscription (unlike ElevenLabs's $22/mo Creator plan)
  • Audio tags parity: Gemini 3.1 Flash TTS supports 200+ inline audio tags, very similar to ElevenLabs v3's audio tag system ([laughs], [whispers], etc.) — this is a natural fit for OpenClaw's [[tts:...]] directive
  • Multi-speaker: Gemini 3.1 Flash TTS supports 2 independent speakers with per-speaker voice/style config
  • Language coverage: 70+ languages vs ElevenLabs's ~30
  • Fallback: Users already using OpenRouter for LLMs could use the same API key for TTS

Suggested implementation

Add openrouter as a supported TTS provider ID that calls the OpenRouter /api/v1/models/{model}/speech endpoint (or equivalent) with the configured model ID.

Config would look like:

{
  "messages": {
    "tts": {
      "provider": "openrouter",
      "providers": {
        "openrouter": {
          "apiKey": "...",
          "modelId": "google/gemini-3.1-flash-tts-preview",
          "voiceId": "...",
          "languageCode": "de"
        }
      }
    }
  }
}

This would allow existing OpenRouter users to add TTS without a separate ElevenLabs subscription.

Environment

  • OpenClaw 2026.4.22
  • Currently using ElevenLabs v3 with audio tags (working well)
  • OpenRouter API key already configured for LLM fallbacks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions