Home / Servers / OpenAI API / create_speech

Create speech

An MCP tool from the OpenAI API server, hosted on mcp.hjlabs.in.

Create speech Generates audio from the input text. Returns the audio file content, or a stream of audio events. The tts-1, tts-1-hd, gpt-4o-mini-tts, gpt-4o-mini-tts-2025-03-20, and gpt-4o-mini-tts-2025-12-15… [POST /audio/speech]

Name on the gateway: openai_api__create_speech · may change things.

Parameters

NameTypeDescription
model requiredstringOne of the available TTS models: tts-1, tts-1-hd, gpt-4o-mini-tts, or…
input requiredstringThe text to generate audio for. The maximum length is 4096 characters.
instructionsstringControl the voice of your generated audio with additional instructions. Does…
voice requiredobjectThe voice to use when generating the audio. Supported built-in voices are…
response_formatmp3 | opus | aac | flac | wav | pcmThe format to audio in. Supported formats are mp3, opus, aac, flac, wav, and…
speednumberThe speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the…
stream_formatsse | audioThe format to stream the audio in. Supported formats are sse and audio. sse is…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "openai_api__create_speech",
  "arguments": {
    "model": "…",
    "input": "…",
    "voice": "…"
  }
}

Or connect the OpenAI API server directly, which lists 371 tools including this one:

Run in your terminal
claude mcp add --transport http hj-openai-api https://mcp.hjlabs.in/mcp/openai-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the create speech tool with model set to ….

More from OpenAI API