API Access

Create a secure API key to authenticate your requests to the MagmaTTS engine.

Generate API Key

API Reference

Integrate MagmaTTS directly into your applications.

MagmaTTS provides a simple, RESTful interface for synthesizing ultra-low latency audio. Our API endpoints are designed to be natively compatible with serverless functions and backend edge services.

IMPORTANT: To guarantee sub-second generation times and prevent server bottlenecking, the /v1/tts endpoint supports a strict maximum of 350 characters per request natively. Developers must implement client-side chunking (e.g., splitting texts by paragraphs or sentences) and request audio generation sequentially or concurrently. Each request consumes your rate limits individually.

GET

/v1/voices

Retrieve a complete list of supported languages and available voices. No authentication required.

curl -X GET https://magma-tts.storycraftpro.me/v1/voices
POST

/v1/tts

Generate streaming-ready audio from text. Requires API key authentication in headers. Max 350 characters.

curl -X POST https://magma-tts.storycraftpro.me/v1/tts \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "text": "MagmaTTS guarantees extreme low latencies, delivering an audio experience that bridges the uncanny valley.", "language": "en-US", "voice": "Mia" }' --output audio.wav

Parameters

  • text (string, required) - The text to synthesize. Max 350 characters.
  • language (string, optional) - Default 'en-US'. e.g., 'de-DE', 'hi-IN'.
  • voice (string, optional) - Natively mapped voice name.
POST

/v1/agent/start-session

Initialize a real-time Conversational Voice Agent session.

curl -X POST "https://magma-tts.storycraftpro.me/v1/agent/start-session?voice=shubh" \ -H "Authorization: Bearer YOUR_API_KEY"
POST

/v1/images/generations

Generate high-quality images from text prompts using Nano Banana or Flux-1-Schnell. Requires API key authentication.

curl -X POST https://magma-tts.storycraftpro.me/v1/images/generations \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "A futuristic cyberpunk city at night", "model": "nano-banana" }'

Parameters

  • prompt (string, required) - The text description of the image you want to generate.
  • model (string, optional) - Underlying image model (default: nano-banana). Valid options: nano-banana, @cf/black-forest-labs/flux-1-schnell.
GET

/v1/usage

Retrieve your current API usage, tier information, and quota stats.

curl -X GET "https://magma-tts.storycraftpro.me/v1/usage" \
  -H "Authorization: Bearer YOUR_API_KEY"

Notification

Message content.