Server integrations
API reference
Get a workspace API key, authenticate requests, and find the Text to Speech and voice endpoints. The full TTS contract, with runnable examples, is in the TTS API reference.
Start here
One API, two credential types
All public endpoints live under /v1 on the selected environment and region's host. Product capabilities still determine which resources a workspace can use.
| Environment | Base URL |
|---|---|
| Production · US | https://aniwaffle.com |
| Production · Japan | https://jp.aniwaffle.com |
| Development · US | https://dev.aniwaffle.com |
| Development · Japan | https://dev.jp.aniwaffle.com |
The two regions share the same accounts, API keys, and billing within each environment. DEV and PROD remain separate. Region selection does not move the database or guarantee Japan data residency.
For TTS, select the region through the HTTP or WebSocket hostname.
Japan production uses https://jp.aniwaffle.com/v1/tts and
wss://jp.aniwaffle.com/v1/tts/stream. The TTS request body has no region field.
See the TTS endpoint table for all environments.
Workspace API key
A permanent awp_ credential created in the Dashboard. Lives only on your backend; authenticates every request and mints the short-lived tokens below.
Short-lived stream tokens
TTS stream tokens (2 minutes) open one streaming synthesis connection, so a browser or mobile client never holds the permanent key. Your backend mints them with the workspace key.
Credentials
Get an API key
Every request below authenticates with a workspace API key in the Authorization header. Here is exactly where that key comes from.
Open Integrations in the Dashboard
Name and create the key
Enter a descriptive Label such as
checkout-voice-prodand select Create key.Copy the key immediately
A banner shows the full key exactly once: “Key created. Copy it now, it won’t be shown again.” The key starts with
awp_. Only a hash is stored, so a lost key must be replaced, not recovered.Store it server-side
Put the key in your backend’s secret manager. Never ship it in browser or mobile code — browsers use short-lived tokens instead. The Issued keys table shows each key’s prefix, status, and last-used time, and a Revoke button that disables it immediately.
curl https://aniwaffle.com/v1/voices \
--header 'Authorization: Bearer awp_your_key_here'Reliability
Authentication and account errors
Authentication and account failures share one JSON shape: { event: 'error', request_id, code, retryable, detail }. Match on code, not on detail text.
| Status · code | When it happens | Fix |
|---|---|---|
| 401 · unauthorized | The Authorization header is missing, the credential is not an awp_ key where one is required, or the key is unknown or revoked. | Send Authorization: Bearer awp_… with an active key from the Integrations page. Revocation rejects new authenticated requests and connections. An already-authenticated public TTS WebSocket can still start or finish its single request; revocation does not close it. |
| 403 · capability_disabled | The workspace does not have the required product enabled. | Contact Narya to enable the capability for your workspace. |
| 402 · insufficient_credit | The workspace has insufficient credits for billable usage. | Check Usage & credits in the Dashboard and contact Narya to arrange additional credits. |
| 403 · organization_suspended | The workspace is suspended. | Contact a platform administrator. |
The TTS errors and limits cover synthesis-specific codes.
Text to Speech
Endpoint index
These are the public Text to Speech and voice routes. Each one authenticates with a workspace API key, except WS /v1/tts/stream, which also accepts a short-lived stream token. The TTS reference documents request bodies, streaming events, audio formats, errors, and limits.
# Voices (workspace API key)
GET /v1/voices
# One-shot and durable synthesis (workspace API key)
POST /v1/tts
POST /v1/tts/jobs # requires Idempotency-Key
GET /v1/tts/jobs/{jobId}
GET /v1/tts/jobs/{jobId}/audio
# Streaming synthesis
POST /v1/tts/stream-tokens # key → 2-minute streaming token
WS /v1/tts/stream # workspace API key or stream tokenSpeech generation
Use the dedicated TTS reference for synthesis
The TTS reference covers voices, one-shot requests, streaming events, audio output, errors, limits, runnable examples, and the production checklist.
Open the TTS API reference