openrouter-tts
Installation
SKILL.md
OpenRouter Text-to-Speech
Synthesize speech via POST /api/v1/audio/speech using curl. The endpoint is OpenAI-compatible, so the OpenAI SDKs work by pointing them at https://openrouter.ai/api/v1. Requires OPENROUTER_API_KEY (get one at https://openrouter.ai/keys). If unset, stop and ask.
One call, raw bytes back
The response body is the audio bytes — write them to a file with the extension matching response_format. It is not JSON; error responses are, so only try to parse JSON when the status is non-200.
Two response headers are worth keeping:
Content-Type—audio/mpegfor mp3; for pcm it includes the sample rate and channel count, e.g.audio/pcm;rate=24000;channels=1. Parse these parameters if you need to wrap the raw bytes into a WAV container.X-Generation-Id— the generation ID (formatgen-tts-<timestamp>-<suffix>), useful for tracking, debugging, and cost lookups.
Drop-in workflow
#!/usr/bin/env bash
set -euo pipefail