AniwaffleDocsHomeContact our team
Developer preview. Public API access is not open yet. Contact our team to discuss integration.

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.

EnvironmentBase URL
Production · UShttps://aniwaffle.com
Production · Japanhttps://jp.aniwaffle.com
Development · UShttps://dev.aniwaffle.com
Development · Japanhttps://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.

  1. Open Integrations in the Dashboard

    Sign in at /login, then select Integrations in the sidebar (under the Config group), or go directly to /app/keys. The page is titled API keys. Workspace Owners, Admins, and Builders can access it — other roles get “API key management requires an organization Owner, Admin, or Builder.”

  2. Name and create the key

    Enter a descriptive Label such as checkout-voice-prod and select Create key.

  3. 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.

  4. 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.

Use the key · every /v1 request
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 · codeWhen it happensFix
401 · unauthorizedThe 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_disabledThe workspace does not have the required product enabled.Contact Narya to enable the capability for your workspace.
402 · insufficient_creditThe workspace has insufficient credits for billable usage.Check Usage & credits in the Dashboard and contact Narya to arrange additional credits.
403 · organization_suspendedThe 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.

Narya API v1 · Text to Speech
# 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 token

Speech 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

Contact our team

Tell us about your character and what you’d like to build.