Playground

Tune the voice, copy the request, ship the integration.

This page is the fastest way to test voices, formats, and delivery presets before wiring the API into your product.

Playground

Generate natural speech

Model: gpt-4o-mini-tts
Browser playback

The API returns raw audio bytes. This demo converts the response into a Blob and plays it locally.

Request

Integration-ready payload

{
  "text": "안녕하세요. SayBrain Speech API입니다. 사람처럼 자연스럽고 또렷한 음성으로 문장을 읽어드립니다.",
  "voice": "marin",
  "format": "mp3",
  "speed": 1,
  "style": "natural"
}

Code

Copy and integrate

const response = await fetch("https://your-domain.com/api/speech", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_APP_API_KEY",
  },
  body: JSON.stringify({
  "text": "안녕하세요. SayBrain Speech API입니다. 사람처럼 자연스럽고 또렷한 음성으로 문장을 읽어드립니다.",
  "voice": "marin",
  "format": "mp3",
  "speed": 1,
  "style": "natural"
}),
});

if (!response.ok) {
  throw new Error("Speech generation failed");
}

const audioBlob = await response.blob();
const audioUrl = URL.createObjectURL(audioBlob);
new Audio(audioUrl).play();

Optional auth

Set SPEECH_API_KEY to require Authorization: Bearer or x-api-key on every request.

Cross-origin browser use

Set CORS_ALLOW_ORIGIN when the client runs on a different domain.