Description
Summary
The Inference Gateway API gained a new operation: POST /v1/audio/speech (operation id createSpeech), defined in openapi.yaml on the branch for PR inference-gateway/schemas#185 and resolving inference-gateway/schemas#184. It mirrors OpenAI's POST /v1/audio/speech: the request body is model, input, voice, response_format, speed, and the response is raw audio bytes (audio/mpeg, audio/opus, audio/aac, audio/flac, audio/wav, audio/pcm) rather than JSON - the first binary response in the spec.
This lets text-to-speech traffic go through the gateway and show up in gateway logs, tracing and pricing, instead of clients shelling out to a local TTS binary (see inference-gateway/cli#1126).
The docs repo is not being edited directly from that PR, so documentation for the new operation is tracked here.
Acceptance Criteria
- The
/audio/speechoperation is documented wherever the Images API operations (/images/generations,/images/edits,/images/variations) are documented, including the request body fields and the supportedresponse_formataudio media types. - The binary (non-JSON,
audio/*) response body nature of the operation is made explicit for users, since every other gateway endpoint returns JSON. - Any supported-client guides (e.g. CLI text-to-speech tooling) note that TTS can be routed through the gateway using
model,voiceandresponse_format. - The not-supported behavior is documented: providers without speech synthesis support return
400with a not-supported error (seeSpeechNotSupportedin the spec).
Reference: spec change in inference-gateway/schemas#185 (source of truth inference-gateway/schemas, openapi.yaml).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
edenreich commentedon Aug 31, 2026
@claude Can you document this? check all the relevant info on the gateway first. use /ponytail:ponytail
inference-gateway-maintainer commentedon Aug 31, 2026
Claude finished @edenreich's task in 3m 26s —— View job •
docs/issue-600-20260831-1056• [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-600-20260831-1056?quick_pull=1&title=Issue%20%23600%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23600%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)Documenting
POST /v1/audio/speechschemas/openapi.yamlonmain(createSpeech,CreateSpeechRequest,SpeechNotSupported,ENABLE_AUDIO) and the gateway'stests/api_speech_test.gofor actual runtime behaviorapi-reference.md,sdks.md)api-reference.mdENABLE_AUDIO(and the missingENABLE_IMAGES) toconfiguration.mdcli-text-to-speech.mdbun run lint:md,bun run format:check,bun run buildall passPR: #608
What changed
api-reference.md- new Audio API section right after the Images API:POST /v1/audio/speech?provider={provider}, gated onENABLE_AUDIO=true(returns404withThe Audio API is not enabled...while off - confirmed in the gateway tests, not just the spec).response_format-> responseContent-Typetable (mp3->audio/mpeg,opus,aac,flac,wav,pcm), and a curl example that writes to a file rather than the terminal.CreateSpeechRequestfield table:model,input(4096 char max),voice(the 13 OpenAI built-ins; other providers use their own ids),response_format,speed(0.25-4.0), plusinstructionsand thereference_audiobase64 voice-cloning passthrough that were in the spec but not the issue body.400 Bad Requestwith{"error": "The Audio API is not supported by this provider yet."}.configuration.md- addedENABLE_AUDIOto General Settings, plusENABLE_IMAGES, which was referenced fromapi-reference.mdbut never listed. One sentence covers both:404while disabled,400from providers that do not implement the API (currentlyopenai, plusllamacppfor speech).cli-text-to-speech.md- a short section noting TTS can go through the gateway withmodel,voiceandresponse_formatso it lands in gateway logs/tracing/pricing, with a curl example.Not done
sdks.mddocumentsCreateImage, but no SDK exposes aCreateSpeechmethod yet - documenting one would be fiction. Worth a follow-up once the SDKs regenerate from the new schema.TextToSpeechengine) is still open, so the page says the CLI's own tool still synthesizes locally and links the issue, rather than claiming a feature that has not shipped.| Branch
inference-gateway-releaser commentedon Sep 22, 2026
🎉 This issue has been resolved in version 0.9.14 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀