Developer documentation
Build speech into your product with a small, predictable API.
API keys, speech generation, webhooks, SDK examples, stable errors, and rate limits. This page documents what developers can use today.
Use API keys for server-side integrations. Firebase sessions are only for the RESONYX web app.
Quickstart
Create speech
Send text and voice settings to `POST /v1/speech`. The response includes a signed playback URL when generation completes.
curl -X POST https://api.resonyx.rudraix.com/v1/speech \
-H "Authorization: Bearer rx_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"text": "Create a calm welcome message for our product.",
"voice": "maya-realtime",
"mode": "natural",
"emotion": "warm",
"format": "mp3"
}'Authentication
Use API keys from your backend
Send the key as a bearer token. Full keys are shown once during creation and are never shown again.
Authorization: Bearer rx_live_xxxxxxxxxxxxxxxxxxxxxxxxx
Allows `POST /v1/speech` generation calls. This is required for external API audio creation.
Reserved for future generation lookup and signed playback metadata endpoints.
Allows future usage and request-log read APIs without exposing billing authority.
Reserved for future external realtime speech sessions and websocket authentication.
Speech API
Request and response
{
"text": "Create a calm welcome message for our product.",
"voice": "maya-realtime",
"mode": "natural",
"emotion": "warm",
"format": "mp3",
"realism": {
"level": 2,
"pauseNaturalness": 0.6,
"vocalTexture": 0.5
}
}{
"id": "gen_xxxxx",
"status": "completed",
"audio_url": "https://...",
"duration_seconds": 8,
"credits_used": 1
}Realism fields are optional. RESONYX validates values server-side and ignores unsupported combinations instead of trusting browser input.
SDKs
Production examples
Use retries, timeouts, and idempotency keys in production workloads.
import { Resonyx, ResonyxApiError } from "@resonyx/sdk";
const resonyx = new Resonyx({
apiKey: process.env.RESONYX_API_KEY!,
baseUrl: process.env.RESONYX_API_URL,
timeoutMs: 90_000,
maxRetries: 2,
});
try {
const audio = await resonyx.speech.create({
text: "This should feel human, not generated.",
voice: "maya-realtime",
mode: "natural",
emotion: "warm",
format: "mp3",
});
console.log(audio.audio_url);
} catch (error) {
if (error instanceof ResonyxApiError) {
console.error(error.code, error.status);
}
throw error;
}from resonyx_sdk import Resonyx, ResonyxAPIError
client = Resonyx(
api_key="rx_live_your_key",
base_url="https://api.resonyx.rudraix.com",
timeout=90,
max_retries=2,
)
try:
audio = client.speech.create(
text="This should feel human, not generated.",
voice="maya-realtime",
mode="natural",
emotion="warm",
format="mp3",
)
print(audio["audio_url"])
except ResonyxAPIError as error:
print(error.code, error.status)
raisecurl -X POST https://api.resonyx.rudraix.com/v1/speech \
-H "Authorization: Bearer rx_live_your_key" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: gen-2026-05-20-001" \
-d '{
"text": "This should feel human, not generated.",
"voice": "maya-realtime",
"mode": "natural",
"emotion": "warm",
"format": "mp3"
}'Webhooks
Signed event delivery
Webhook delivery is verified with signatures and destination ownership checks before production activation.
X-Resonyx-Timestamp: 1779138046 X-Resonyx-Signature: t=1779138046,v1=<signature> signed_payload = timestamp + "." + raw_body
Notify a backend when an audio generation has completed and a signed playback URL is available.
Notify a backend when generation fails after validation or engine processing.
Summarize realtime duration, credits, first-chunk latency, and interruption count.
Warn production integrators before generation requests begin failing for credit exhaustion.
Confirm key revocation to internal security workflows.
Send a signed test event to verify endpoint security, parsing, and delivery logs.
Errors
Stable error format
Errors return a machine-readable code and a short message. Do not parse message text for control flow.
invalid_api_key401Check the bearer token, environment prefix, and key copy process.
revoked_api_key401Create a new key and rotate the integration secret.
insufficient_scope403Create or rotate a key with the needed scope.
rate_limit_exceeded429Back off with jitter. Do not retry aggressively.
insufficient_credits402Wait for billing activation, add credits, or reduce usage.
invalid_request400Fix text length, voice, mode, emotion, format, or realism values.
generation_failed500Retry with backoff or inspect the request log and generation record.
internal_error500Retry safely; escalate if repeated.
Rate limits
Limits and usage
Test keys start with low request limits. Live keys increase by plan. Realtime and premium speech remain capped to keep quality and reliability predictable.