SecretVoice

API Reference

v1 https://api.secretvoice.dev

Overview

Expressive speech, one request away.

SecretVoice is a low-latency text-to-speech API tuned for closeness: breathy whispers, intimate narration, and natural conversational turns. Twenty-nine voices across 22 languages, with synchronous, streaming, and realtime WebSocket delivery.

  • 29 premade voices: 13 female, 16 male, each with a distinct persona.
  • 22 languages: one voice keeps its character in every language.
  • Three delivery modes: synchronous audio, HTTP streaming, and realtime WebSocket.
  • Drop-in compatibility: point any ElevenLabs client at this API and it works. See Compatibility →

Billing is simple and transparent: you pay per character of text (1 credit = 1 character), tracked live on your balance.

Quickstart

Your first voice in 30 seconds.

Create an account, grab your API key, and synthesize your first line. One endpoint, one body.

POST /v1/text-to-speech/velvet Returns the generated audio file.
request · application/json
{
  "text": "Come closer. Let me tell you a secret. Now, just listen to my voice.",
  "model_id": "secret-v1"
}
curl
curl -X POST https://api.secretvoice.dev/v1/text-to-speech/velvet \
  -H "xi-api-key: $SECRETVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "text": "Come closer. Let me tell you a secret.", "model_id": "secret-v1" }' \
  --output voice.mp3
python
import requests

r = requests.post(
    "https://api.secretvoice.dev/v1/text-to-speech/velvet",
    headers={"xi-api-key": "YOUR_KEY", "Content-Type": "application/json"},
    json={"text": "Come closer. Let me tell you a secret.", "model_id": "secret-v1"},
)
open("voice.mp3", "wb").write(r.content)
javascript
const res = await fetch("https://api.secretvoice.dev/v1/text-to-speech/velvet", {
  method: "POST",
  headers: { "xi-api-key": "YOUR_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({ text: "Come closer. Let me tell you a secret.", model_id: "secret-v1" }),
});
const blob = await res.blob();
const url = URL.createObjectURL(blob); // play or save it

Listen to this exact request. The audio below is the real output of the request above.

Authentication

One header, every request.

Every endpoint that touches your account requires your API key, sent as the xi-api-key header. Voice and model listings and previews are public; everything else needs a key. Your key is tied to your account and is never shared.

header
xi-api-key: $SECRETVOICE_API_KEY
  • All requests must use HTTPS.
  • API keys are scoped to your account and cannot be shared across accounts.
  • Requests made without a valid key return 401 with {"detail": "Invalid API key"}.
  • Rotating a key invalidates the old one immediately.
  • No browser CORS. The API is for server-side use; cross-origin browser calls are not permitted, which protects your key from exposure in client code.

Models

One model, tuned for closeness.

SecretVoice exposes a single model, secret-v1, engineered for intimate, expressive delivery. Common model identifiers from compatible clients are accepted as aliases.

GET /v1/models Lists available models.

Response · 200

200 · application/json
{
  "models": [{
    "model_id": "secret-v1",
    "name": "SecretVoice v1",
    "can_do_text_to_speech": true,
    "can_do_voice_conversion": false,
    "languages": ["en", "es", "ja", "fr", "de", "it", "pt", "ru", "zh", "ko", "th", "id", "vi", "ms", "nl", "pl", "et", "fi", "hi", "ta", "cs", "tr"]
  }]
}

Model aliases

The following identifiers are silently mapped to secret-v1 for compatibility: eleven_multilingual_v2, eleven_flash_v2_5, eleven_turbo_v2_5.

Voices

Twenty-nine voices, tuned for closeness.

Every voice has a distinct persona and keeps its character across all 22 languages. Voice ids are lowercase shorthands.

GET /v1/voices Lists all available voices.

Response · 200

200 · application/json
{
  "voices": [{
    "voice_id": "velvet",
    "name": "Velvet",
    "category": "premade",
    "labels": { "gender": "female", "style": "rich and luxurious" },
    "preview_url": "https://api.secretvoice.dev/v1/voices/velvet/preview.mp3"
  }, /* …28 more */]
}
GET /v1/voices/{voice_id} Returns a single voice. 404 if the voice is not in the public roster.

Response · 200

200 · application/json
{
  "voice_id": "velvet",
  "name": "Velvet",
  "category": "premade",
  "labels": { "gender": "female", "style": "rich and luxurious" },
  "preview_url": "https://api.secretvoice.dev/v1/voices/velvet/preview.mp3"
}
GET /v1/voices/{voice_id}/preview.mp3 Redirects (301) to the voice's preview audio. This is what preview_url points to.
GET /v1/voices/{voice_id}/settings Returns the account-level settings override for a voice.

Response · 200

200 · application/json
{
  "stability": 0.5,
  "similarity_boost": 0.75,
  "style": 0.0,
  "speed": 1.0,
  "use_speaker_boost": true
}
PATCH /v1/voices/{voice_id}/settings Updates voice settings for your account. Partial bodies accepted; omitted fields keep current values.
FieldTypeRequiredDescription
stabilitynumber0 – 1. Lower = broader emotional range.
similarity_boostnumber0 – 1. Adherence to the voice's native character.
stylenumber0 – 1. Style exaggeration. Accepted; the signature style is always present.
speednumber0.5 – 2.0. 1.0 is default.
use_speaker_boostbooleanAccepted for compatibility.
request
PATCH /v1/voices/velvet/settings
{
  "stability": 0.4,
  "speed": 0.9
}

The roster

Female

Male

Text to Speech

Convert text to speech.

The core endpoint. Converts text into speech using a voice of your choice and returns the audio file directly.

POST /v1/text-to-speech/{voice_id} Returns the generated audio. voice_id is a roster shorthand (e.g. velvet).

Query parameters

ParameterTypeRequiredDescription
output_formatstringAudio format as codec_sample_rate_bitrate. Default mp3_44100_128.
enable_loggingbooleanDefault true. Set false for zero retention (no history).

Request body

FieldTypeRequiredDescription
textstringyesThe text to synthesize. Cannot be empty.
model_idstringModel to use. Default secret-v1.
language_codestringISO 639-1 code to enforce a language. Default en.
voice_settingsobjectPer-request voice overrides. See table below.
previous_textstringText before this request, for continuity.
next_textstringText after this request, for continuity.
apply_text_normalizationenumauto (default), on, off.
seedintegerBest-effort deterministic sampling. Accepted; not guaranteed.
pronunciation_dictionary_locatorsarrayAccepted for compatibility. Reserved for a future release.

voice_settings

FieldTypeRequiredDescription
stabilitynumber0 – 1. Lower = broader emotional range.
similarity_boostnumber0 – 1. Adherence to the voice's native character.
stylenumber0 – 1. Accepted; the signature style is always present.
speednumber0.5 – 2.0. 1.0 is default.
use_speaker_boostbooleanAccepted for compatibility.

Response · 200

Binary audio. Content-Type matches the requested format. Response headers: X-Request-Id (trace id), X-Duration (audio-seconds produced; informational: billing is per character).

example
curl -X POST "https://api.secretvoice.dev/v1/text-to-speech/whisper?output_format=mp3_44100_128" \
  -H "xi-api-key: $SECRETVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "Lean in. I have something to tell you.",
  "model_id": "secret-v1",
  "language_code": "en",
  "voice_settings": { "stability": 0.6, "speed": 0.95 }
}' \
  --output whisper.mp3

Emoji vocal cues

Include supported emoji vocal cues directly inside your text to guide breathing, whispers, sighs, pauses, and emotional delivery across synchronous, streaming, and realtime WebSocket calls. Unsupported emojis are automatically stripped before synthesis, and consecutive cues collapse to the first cue in the run.

EmojiVocal effectEmojiVocal effect
👂Whisper😮‍💨Sigh / exhale
🌬️Breathless🥵Panting
🤭Chuckle😏Teasing
🥺Trembling😮Gasp
💋Kiss👅Licking
🫶Tenderly😭Sobbing
⏸️Pause🐢Slowly
⏩Hurriedly😪Sleepily
🫣Shyly🙏Pleadingly
😌Relieved😖Painfully
😆Joyfully😊Cheerfully
😰Nervous😟Anxiously
😠Angry😲Surprised
😱Screaming🥱Yawning
🥤Gulping🤧Coughing
🎵Humming🤐Muffled
🥴Drunkenly📞Telephone
📢Echo🙄Exasperated
😒Tutting👌Agreeing
🤔Wondering

Output formats

FormatSample ratesNotes
mp3_*22050 · 24000 · 44100Bitrates 32 – 192 kbps. Default mp3_44100_128.
wav_*8000 – 44100Uncompressed, highest fidelity.
pcm_*8000 – 48000Raw 16-bit PCM, for realtime pipelines.
opus_48000_*48000Efficient streaming codec.
ulaw_8000 / alaw_80008000Telephony codecs, e.g. Twilio.

Sample rates the engine doesn't emit natively are served at the nearest supported rate (e.g. mp3_22050_* → 32000 Hz).

Streaming

Audio as it's synthesized.

Identical request to the synchronous endpoint, but the audio streams back as it is produced. Useful for agents and long-form narration that want the first byte fast.

POST /v1/text-to-speech/{voice_id}/stream Streaming audio response (chunked). Same body and query as the synchronous endpoint.
ParameterTypeRequiredDescription
output_formatstringDefault mp3_44100_128.

Request body

Identical to Text to Speech: text, model_id, language_code, voice_settings.

example
curl -X POST "https://api.secretvoice.dev/v1/text-to-speech/velvet/stream" \
  -H "xi-api-key: $SECRETVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "text": "There you are. I was starting to miss you.", "model_id": "secret-v1" }' \
  --output live.mp3

Realtime

A voice agent that responds immediately.

Realtime speech over WebSocket. Send text chunks as they arrive; audio streams back as it is produced. Word timings are included for captions.

WS wss://ws.secretvoice.dev/v1/text-to-speech/{voice_id}/stream-input Realtime TTS over WebSocket. Authenticate with the xi-api-key header on the handshake. Query: output_format (default mp3_44100_128).

Send

MessagePurpose
{ "text": " " }Initialize the connection. May also carry language_code and voice_settings (speed, stability, similarity_boost).
{ "text": "..." }Stream text chunks as they become available.
{ "voice_id": "steele" }Optional. Switch voices for this and following segments. Combine it with a text message, or send it alone. One socket can carry several voices.
{ "flush": true }Force generation of remaining buffered text.
{ "abort": true }Cancel buffered, queued and in-flight audio. The socket stays open, so you can keep the conversation going.
{ "text": "" }Close the stream cleanly.

Language can be set with the ?language_code=ja query parameter, or in the init message. All 22 languages are supported.

Receive

MessageMeaning
{ "audio": "<base64>", "voice_id": "velvet", "isFinal": false }One chunk of generated audio, tagged with the voice that produced it.
{ "aborted": true }Acknowledges an abort. The socket is still open.
{ "isFinal": true }The stream is complete.
{ "error": "..." }Synthesis failed; the server closes.
websocket
const ws = new WebSocket(
  "wss://ws.secretvoice.dev/v1/text-to-speech/velvet/stream-input?output_format=mp3_44100_128",
  { headers: { "xi-api-key": "YOUR_KEY" } }
);

ws.onopen = () => {
  ws.send(JSON.stringify({ text: " " }));
  ws.send(JSON.stringify({ text: "There you are. I was starting to miss you." }));
  ws.send(JSON.stringify({ flush: true }));
  ws.send(JSON.stringify({ text: "" }));
};

ws.onmessage = (e) => {
  const msg = JSON.parse(e.data);
  if (msg.audio) playBase64Audio(msg.audio); // decode + queue
  if (msg.isFinal) ws.close();
};

Hear it. The sample below is a real streamed reply generated through the realtime path.

History

Every generation, retrievable.

Generation history is stored on your account so you can review or delete it. Audio itself is never stored. History keeps only the transcript and generation metadata. Pass ?enable_logging=false on any synthesis call to opt out (zero retention).

GET /v1/history Lists recent generations, newest first.

Response · 200

200 · application/json
{
  "history": [{
    "history_item_id": "req_01HZxK…",
    "voice_id": "velvet",
    "text": "Come closer. Let me tell you a secret.",
    "date_unix": 1770000000,
    "seconds": 8.3
  }]
}
GET /v1/history/{history_item_id} Returns the history item's metadata. 404 if it doesn't exist or belongs to another account.
DELETE /v1/history/{history_item_id} Deletes a history item. Returns 200, or 404 if not found.

Account & Billing

Pay for what you produce.

You are billed by characters of text, not audio time: 1 credit = 1 character of speech. Your balance is deducted progressively during generation, and you can monitor it at any time. Monthly plans renew every month. Annual plans are prepaid for 12 months and deliver the monthly pool as 12 drops, on the same day each month; unused monthly credits do not roll over. API-only top-up credits are used only after your plan credits run out, and the Studio never spends them. Top-ups are available to subscribers.

In the dashboard under Billing you can manage your subscription: switch plans or change between monthly and annual mid-cycle (the difference is prorated), cancel at the end of the current period, and open the billing portal to update your payment method and download receipts. The Invoices list shows every card and USDC payment, newest first.

GET /v1/user Returns your account.

Response · 200

200 · application/json
{
  "id": "usr_01HZxK…",
  "email": "you@example.com",
  "is_new_user": false,
  "subscription": { "tier": "pro" }
}
GET /v1/user/subscription Current plan, usage, and reset information.

Response · 200

200 · application/json
{
  "tier": "pro",
  "billing_interval": "month",  // "month" or "year"
  "character_count": 1000000,  // remaining credits (1 credit = 1 character)
  "character_limit": -1,
  "next_character_count_reset_unix": 1795100000,  // next monthly reset (0 when not subscribed)
  "next_credit_grant_unix": 1795100000  // annual plans: next monthly credit drop
}

USDC Top-ups

Your permanent USDC top-up address.

Every subscriber gets a permanent Base USDC address, the same every time. Send USDC and credits land in seconds at 10,000 credits per USDC. Minimum top-up: 10 USDC. Top-up credits expire 12 months after they are received and are API-only. Top-ups are available to subscribers.

GET /v1/usdc-address Your permanent Base USDC deposit address. No reference keys: the address itself identifies your account.

Response · 200

request
curl "https://api.secretvoice.dev/v1/usdc-address" \
  -H "xi-api-key: $SECRETVOICE_API_KEY"
200 · application/json
{
  "network": "base",
  "chain_id": 8453,
  "currency": "USDC",
  "address": "0xYOUR_PERMANENT_BASE_ADDRESS",
  "minimum_usdc": 10,
  "credits_per_usdc": 10000
}

The address is your stable deposit address: the same one every time. Payments to it are matched to your account by the address itself; no reference keys needed. Send 10 USDC or more; credits are granted for the exact amount received.

Paying

  • From a wallet: scan the QR (or copy the address) and send USDC on the Base network from any wallet: Phantom, Coinbase Wallet, Rabby, MetaMask, or an exchange that supports Base withdrawals. The sender needs a tiny bit of ETH (~$0.01) on Base to cover the transfer fee.
  • Programmatically (agents): send USDC to the address with any EVM library: viem, ethers.js, or web3.py. No special payload; a plain transfer(to, amount) on the USDC contract (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913).
  • What does NOT work: sending on the wrong network (Ethereum, Solana, Arbitrum…), or sending a different token. Only USDC on Base is credited. Anything else is not recoverable.
agent · node (viem)
import { createWalletClient, http, parseUnits } from "viem";
import { base } from "viem/chains";

const USDC = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"; // USDC on Base

const addr = await fetch("https://api.secretvoice.dev/v1/usdc-address", {
  headers: { "xi-api-key": KEY },
}).then((r) => r.json());

const wallet = createWalletClient({ chain: base, transport: http() }); // your signer
await wallet.sendTransaction({
  to: USDC,
  data: "0xa9059cbb" + addr.address.slice(2).padStart(64, "0")
    + parseUnits("25", 6).toString(16).padStart(64, "0"), // transfer(to, 25 USDC)
});

Unmatched payments

Payments are matched by deposit address, so a payment to your address is always yours. If a payment arrives on the wrong network or as the wrong token, it cannot be recovered or credited. See the payment notes in the dashboard.

Credit Alerts & Webhooks

Know when to load, and let an agent load for you.

Any account can set an optional alert that fires when its credit balance drops below a chosen threshold. Alerts arrive by email, by webhook, or both. The webhook is designed to be consumed by an agent that automatically tops up with USDC through the API.

Setup

In the dashboard (Billing → Credit alerts) choose a threshold, a one-tap top-up size, and optionally a webhook URL. When your balance falls below the threshold you get one alert; it repeats only after you actually top up.

Set it from the API

The webhook is programmable with your API key, so an agent can register its own endpoint without a browser.

PUT /v1/webhook
curl -X PUT https://api.secretvoice.dev/v1/webhook   -H "xi-api-key: $SECRETVOICE_API_KEY"   -H "content-type: application/json"   -d '{"url":"https://your.app/hooks/secretvoice"}'

The response carries the signing secret once (also when the URL changes, or when you pass "rotate_secret": true). Store it. Use GET /v1/webhook to read the current URL and whether a secret is set, and DELETE /v1/webhook to remove it.

response
{
  "ok": true,
  "url": "https://your.app/hooks/secretvoice",
  "secret": "whsec_...",
  "secret_set": true,
  "events": ["credits.topup", "low_credits"],
  "signature": "Standard Webhooks (HMAC-SHA256)"
}

Events

credits.topup fires the moment credits land, from a card purchase or a USDC deposit:

POST {your_url} · credits.topup
{
  "event": "credits.topup",
  "user_id": 42,
  "source": "usdc",
  "credits_added": 250000,
  "amount_usdc": 25,
  "balance": 480000,
  "currency": "credits"
}

Card top-ups send "source": "card" with amount_cents instead of amount_usdc. low_credits is the payload below.

Webhook payload

POST {your_url} · application/json
{
  "event": "low_credits",
  "user_id": 42,
  "balance": 48000,
  "threshold": 50000,
  "currency": "credits",
  "top_up": {
    "api": {
      "endpoint": "https://api.secretvoice.dev/v1/usdc-address",
      "method": "GET",
      "auth": "xi-api-key",
      "example": { "amount": "25.00" }
    },
    "address": {
      "address": "0xYOUR_PERMANENT_BASE_ADDRESS",
      "network": "base",
      "chain_id": 8453
    }
  }
}

The top_up.address block is your ready-to-pay USDC address. Send USDC (Base) to it and credits land in seconds.

Verify deliveries before paying

Every webhook delivery is signed with your per-user secret (Standard Webhooks, HMAC-SHA256). When you save a webhook URL the dashboard shows the signing secret once. Headers on each delivery:

  • webhook-id: unique delivery id
  • webhook-timestamp: unix seconds; reject deliveries older than a few minutes
  • webhook-signature: v1,<base64 HMAC-SHA256> over id.timestamp.raw_body, keyed by the base64-decoded secret

Never act on a delivery (or pay the included top_up.address) until the signature verifies: an unsigned or forged payload could point at an attacker's address.

verify · python
import base64, hashlib, hmac, time

def verify_webhook(secret, headers, raw_body):
    b64 = (secret[6:] if secret.startswith("whsec_") else secret).replace("-", "+").replace("_", "/")
    b64 += "=" * (-len(b64) % 4)  # whsec secrets may omit padding
    key = base64.b64decode(b64)
    content = f"{headers['webhook-id']}.{headers['webhook-timestamp']}.{raw_body}".encode()
    expected = base64.b64encode(hmac.new(key, content, hashlib.sha256).digest()).decode()
    if abs(time.time() - float(headers["webhook-timestamp"])) > 300: return False
    return hmac.compare_digest(expected, headers["webhook-signature"].split(" ")[0][3:])

Example: automated refill agent

agent
// Your endpoint receives the low_credits webhook, then:
async function onLowCredits(req, body, secret) {
  if (!verifyStandardWebhook(secret, req.headers, body)) {
    return res(401); // forged: never pay an unverified payload
  }
  const payload = JSON.parse(body);
  // 1. pay the ready address (send any amount of USDC on Base)
  const addr = payload.top_up.address.address;
  const usdc = await sendUsdcOnBase(addr, AMOUNT, WALLET); // plain ERC-20 transfer
  // 2. credits land in seconds: refresh your balance
  const me = await fetch("https://api.secretvoice.dev/v1/user/subscription", {
    headers: { "xi-api-key": KEY },
  }).then((r) => r.json());
  console.log("new balance", me.character_count);
}

Send USDC on the Base network only. See the USDC top-up section above.

Multilingual

One voice, twenty-two languages.

Pass a language_code and the same voice keeps its warmth and character in that language. Supported codes:

en · es · de · fr · it · pt · ru · zh · ja · ko · th · id · vi · ms · nl · pl · et · fi · hi · ta · cs · tr

Español · es "Acércate. Quiero contarte un secreto."
日本語 · ja "もっと近くに来て。秘密を教えてあげる。"
Français · fr "Approche-toi. Je vais te murmurer un secret."
example
curl -X POST "https://api.secretvoice.dev/v1/text-to-speech/whisper" \
  -H "xi-api-key: $SECRETVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "もっと近くに来て。秘密を教えてあげる。",
  "language_code": "ja",
  "model_id": "secret-v1"
}' \
  --output whisper-ja.mp3

Rate Limits

Fair use, for everyone.

Limits protect the reliability of the Service for all users. They scale with your plan.

LimitDefaultNotes
Requests per minute60Per API key, per endpoint.
Concurrent streams5Across the streaming and realtime endpoints.
Max text length5,000 charsPer synthesis request. Split longer text into consecutive calls with previous_text.
Max audio duration90 minPer generation.

When a limit is exceeded, the API returns 429 with a Retry-After header. Back off and retry after the indicated delay; exponential backoff is recommended.

Errors

Errors you can read.

All errors use a consistent, machine-readable body: {"detail": "..."}.

StatusMeaningExample detail
400Malformed request"Invalid JSON body"
401Missing or invalid key"Invalid API key"
402Insufficient balance"No credits available"
404Voice or model not found"Voice not found"
422Validation error"text is required"
429Rate limit exceeded"Rate limit exceeded"
500Internal error"TTS generation failed"
501Not implemented"Voice cloning is not available"

Compatibility

Drop-in for the ElevenLabs protocol.

SecretVoice speaks the ElevenLabs API contract. If your code already talks to ElevenLabs, you can point it at SecretVoice by changing the base URL and using a SecretVoice API key. No code changes.

  • Same surface: paths, methods, request bodies, and response shapes follow the same contract.
  • Same auth header: xi-api-key is accepted natively.
  • Same realtime protocol: the WebSocket stream-input flow matches message-for-message.
  • Model aliases: common model identifiers map to secret-v1 automatically.
  • Safe over-acceptance: optional fields with no equivalent here are accepted and safely ignored, so clients never break.
  • Same error shape: {"detail": "..."} bodies and matching status codes.

Compatibility contract. The contract is compatible; the model is ours. A handful of optional parameters (e.g. seed, request stitching ids) are accepted and safely ignored. Features we don't offer (voice conversion, custom voice cloning in v1) return a clear 501. Never a silent success.

Machine-readable

OpenAPI & llms.txt

The API is fully described as machine-readable artifacts, kept in sync with these docs.

MCP Server

The same voices, as tools your agent can call.

SecretVoice runs a remote Model Context Protocol server, so an agent can pick a voice, perform a script and stay inside its credit budget without you wiring an API client. Transport is Streamable HTTP, protocol version 2025-06-18.

endpoint
https://api.secretvoice.dev/mcp

Discovery is standard: an unauthenticated call returns 401 with a WWW-Authenticate header pointing at /.well-known/oauth-protected-resource, which names https://secretvoice.dev as the authorization server.

Tools

ToolScopeDescription
list_voicesvoices:readEvery voice with id and gender.
list_languagesvoices:readThe 22 supported language codes.
text_to_speechtts:generateText in, base64 audio out. Emoji vocal cues allowed.
generate_scenetts:generateOne clip per segment, each with its own voice and language.
get_balanceaccount:readPlan and remaining credits.
list_historyhistory:readRecent generations, newest first.

Emoji vocal cues

Cues inside the text direct the performance: 👂 whisper, 😮‍💨 sigh, 🌬️ breathless, 🥵 panting, 💋 kiss, 🤭 chuckle, 🥺 trembling, 😭 sobbing, ⏸️ pause, 🐢 slowly. Any other emoji is stripped before synthesis. The same cues work on the HTTP endpoints — this is not an MCP-only feature.

Resources

  • secretvoice://voices: the voice list as JSON.
  • secretvoice://languages: the language list as JSON.
  • secretvoice://vocal-cues: the emoji-to-direction map.

Billing is unchanged. An MCP call debits credits exactly like an HTTP call (1 credit = 1 character), appears in the same history, and is subject to the same rate limits. A token without tts:generate cannot spend anything.

Client configuration for Claude, Cursor and VS Code lives at /mcp.

OAuth 2.1

Tokens for agents, without pasting a key.

The authorization server behind the MCP endpoint is open to any client. It implements dynamic client registration (RFC 7591), PKCE with S256 only, resource indicators (RFC 8707) and revocation (RFC 7009).

discovery
https://secretvoice.dev/.well-known/oauth-authorization-server
https://api.secretvoice.dev/.well-known/oauth-protected-resource
EndpointPurpose
POST /oauth/registerDynamic client registration.
GET /oauth/authorizeConsent screen (requires a signed-in session).
POST /oauth/authorizeApprove or deny the request.
POST /oauth/tokenauthorization_code and refresh_token grants.
POST /oauth/revokeRevoke an access or refresh token.

Scopes

  • voices:read: list voices and languages.
  • tts:generate: generate audio. This spends credits.
  • history:read: read generation history.
  • account:read: read plan and balance.

Lifetimes

  • Authorization code: 5 minutes, single use.
  • Access token: 1 hour.
  • Refresh token: 30 days, rotated on every exchange — the old pair is revoked.

Codes and tokens are stored hashed. A database read cannot yield a usable token. Tokens are also bound to https://api.secretvoice.dev, so a token minted for one resource is refused by another.

The full flow, with request bodies, is at /oauth.