VisionStory Docs
llms.txt Get API key

Turn text into natural-sounding speech with any public or cloned voice. The endpoint is synchronous — the response body is the MP3 audio.

Beta access. This endpoint is allowlisted during beta. If a request returns 403 / not enabled, contact your VisionStory representative. An active subscription is required.

Endpoint

Method Path What it does
POST /api/v1/tts Synthesize speech from text; returns MP3 audio

Synthesize speech

Send text and a voice_id (from GET /api/v1/voices — a public or your own cloned voice). The service automatically picks the best synthesis strategy for the voice and the text language.

curl -s -X POST -H "X-API-Key: $VISIONSTORY_API_KEY" -H "Content-Type: application/json" -d '{"text": "Hello from VisionStory.", "voice_id": "Alice"}' https://openapi.visionstory.ai/api/v1/tts --output speech.mp3

The response body is the raw MP3 (audio/mpeg, 44.1 kHz). Usage and billing come back in response headers, not the body:

Header Meaning
X-Audio-Duration-Sec Length of the generated audio, in seconds
X-Usage-Characters Characters billed
X-Cost-Credit Credits charged for this call
import requests, os

resp = requests.post(
    "https://openapi.visionstory.ai/api/v1/tts",
    headers={"X-API-Key": os.environ["VISIONSTORY_API_KEY"]},
    json={"text": "Hello from VisionStory.", "voice_id": "Alice"},
    timeout=240,
)
resp.raise_for_status()
with open("speech.mp3", "wb") as f:
    f.write(resp.content)
print("credits charged:", resp.headers.get("X-Cost-Credit"))

Notes

Next steps