# Audivra Documentation

> API-first voice and digital human infrastructure — speech, recognition, score beds, cues, lip-synced video, cloning, dub, and agents on one prepaid credit pool.

## Instructions for AI Agents

- For a complete page index, fetch http://127.0.0.1:3000/docs/llms.txt
- For Markdown of a specific page, fetch http://127.0.0.1:3000/docs/llms-full.txt and search the heading — or use http://127.0.0.1:3000/docs/llms.txt
- OpenAPI 3.0 spec: http://127.0.0.1:3000/docs/openapi.json
- Postman collection: http://127.0.0.1:3000/docs/postman.json
- Base URL for API calls: http://127.0.0.1:3000
- Authentication header: Authorization: Bearer sk_live_…
- API key format: sk_live_ followed by 48 hex characters
- Step-by-step guides (creators, developers, self-hosters): http://127.0.0.1:3000/docs/guides
- Docs search (⌘K in the sidebar): http://127.0.0.1:3000/docs — indexes nav, headings, guides, and API routes
- Interactive try-it playgrounds: http://127.0.0.1:3000/docs/api/tts (TTS audio) · http://127.0.0.1:3000/docs/api/generate (generate + job status) — session or pasted API key
- Voice library with audio preview: http://127.0.0.1:3000/docs/overview/voices — play sample, copy voice_id
- Webhook payload schemas (Stripe, Paystack, Flutterwave, dLocal): http://127.0.0.1:3000/docs/api/webhooks
- Errors & limits reference: http://127.0.0.1:3000/docs/reference/errors · http://127.0.0.1:3000/docs/reference/limits
- Changelog & API v1 policy: http://127.0.0.1:3000/docs/reference/changelog
- Enterprise deployment: http://127.0.0.1:3000/docs/self-hosted/enterprise
- SDKs (TypeScript + Python): http://127.0.0.1:3000/docs/get-started/sdk

## Docs

### Overview

- [Introduction](http://127.0.0.1:3000/docs): How Audivra works
- [Models](http://127.0.0.1:3000/docs/overview/models): Engine comparison — latency, languages, tiers
- [Voice library](http://127.0.0.1:3000/docs/overview/voices): Browse voices — play sample, copy voice_id

### Get started

- [Quickstart](http://127.0.0.1:3000/docs/get-started/quickstart): Make your first API call in under five minutes.
- [Authentication](http://127.0.0.1:3000/docs/get-started/authentication): All API requests require a Bearer token using your Audivra API key.
- [SDKs](http://127.0.0.1:3000/docs/get-started/sdk): TypeScript + Python thin clients
- [Dashboard](http://127.0.0.1:3000/docs/get-started/dashboard): Studio — STT, dub, voices, agents, keys
- [Install the app](http://127.0.0.1:3000/docs/get-started/install): PWA on phone, tablet, and desktop

### Guides

- [All guides](http://127.0.0.1:3000/docs/guides): Step-by-step tutorials — creators, developers, self-hosters
- [Dub a talking head](http://127.0.0.1:3000/docs/guides/dub-talking-head): Transcribe, translate, and lip-sync source speech
- [Stream Opus on low bandwidth](http://127.0.0.1:3000/docs/guides/stream-opus-low-bandwidth): Chunked Opus TTS for mobile networks
- [Self-host on RTX 4090](http://127.0.0.1:3000/docs/guides/self-host-rtx-4090): Ollama + Kokoro + MuseTalk on local GPU
- [M-Pesa via Paystack](http://127.0.0.1:3000/docs/guides/paystack-mpesa-webhook): Kenya checkout and webhook upgrade flow
- [Professional voice clone](http://127.0.0.1:3000/docs/guides/professional-voice-clone): Multi-sample training for higher clone quality
- [Share a community voice](http://127.0.0.1:3000/docs/guides/share-community-voice): Publish a clone and license it as voice_id
- [Media content tips](http://127.0.0.1:3000/docs/guides/media-tips): Face framing, clean audio, sync_mode
- [Media formats](http://127.0.0.1:3000/docs/guides/media-formats): URL, upload, asset_id, containers
- [Generation times](http://127.0.0.1:3000/docs/guides/generation-times): Latency, polling, stuck jobs

### Concepts

- [Cloned voices](http://127.0.0.1:3000/docs/concepts/cloned-voices): Instant and professional cloning
- [Voice remix](http://127.0.0.1:3000/docs/concepts/voice-remix): Prompt-conditioned clone variants
- [Voice marketplace](http://127.0.0.1:3000/docs/concepts/marketplace): Share and license community voices
- [Voice design](http://127.0.0.1:3000/docs/concepts/voice-design): Prompt-based custom voices
- [Avatars](http://127.0.0.1:3000/docs/concepts/avatars): avatar_id selects a talking-head preset and default lip-sync model.
- [Pricing](http://127.0.0.1:3000/docs/concepts/pricing): Talking-head minutes, compare table, Private GPU, grants
- [Credits](http://127.0.0.1:3000/docs/concepts/credits): Calculator — audio characters, avatar minutes, local-rail checkout
- [Pay As You Go](http://127.0.0.1:3000/docs/concepts/pay-as-you-go): Prepaid top-ups — extend quota on any tier
- [Processing nodes](http://127.0.0.1:3000/docs/concepts/processing-nodes): Short prompts route to local Ollama (LLM), Kokoro/Piper (TTS), and MuseTalk/Wav2Lip (lip-sync) before offloading to GPU cluster or external APIs. Every execution is logged in PostgreSQL with atomic credit deduction.

### Reference

- [Errors](http://127.0.0.1:3000/docs/reference/errors): 401 · 402 · 429 · 502 — JSON bodies and recovery
- [Limits & quotas](http://127.0.0.1:3000/docs/reference/limits): Credits, plan caps, routing credits, rate limits, overages
- [Changelog](http://127.0.0.1:3000/docs/reference/changelog): API v1 stability · release history · deprecation policy
- [Developer exports](http://127.0.0.1:3000/docs/reference/developer-exports): llms.txt, llms-full.txt, openapi.json, postman.json
- [Legal](http://127.0.0.1:3000/docs/legal): Terms, privacy, and voice-consent records

### API reference

- [OpenAPI](http://127.0.0.1:3000/docs/api/openapi): Download openapi.json and Postman collection
- [Generate](http://127.0.0.1:3000/docs/api/generate): Unified generate — async video jobs, fast-path local TTS/LLM, GPU cluster offload.
- [Batch generate](http://127.0.0.1:3000/docs/api/generate-batch): JSONL batch, dry_run, webhooks
- [Estimate](http://127.0.0.1:3000/docs/api/estimate): Preview credits including lipsync
- [Assets](http://127.0.0.1:3000/docs/api/assets): Reusable video, audio, and image IDs
- [Text to speech](http://127.0.0.1:3000/docs/api/tts): Generate speech audio from text — WAV response or low-bandwidth Opus/AAC streaming.
- [Speech to text](http://127.0.0.1:3000/docs/api/stt): Transcribe audio — credits per second
- [Music](http://127.0.0.1:3000/docs/api/music): Score beds billed per second
- [Sound effects](http://127.0.0.1:3000/docs/api/sfx): Short cues billed per clip
- [Dubbing](http://127.0.0.1:3000/docs/api/dub): STT → translate → TTS → lip-sync job
- [Avatars & jobs](http://127.0.0.1:3000/docs/api/avatars): Create lip-synced talking-head videos asynchronously — poll status or subscribe to SSE.
- [Voice cloning](http://127.0.0.1:3000/docs/api/voice-cloning): Upload a short audio sample to train a custom voice on paid plans.
- [Voice remix](http://127.0.0.1:3000/docs/api/voice-remix): Create a new custom voice from a clone you own using a natural-language prompt.
- [Marketplace](http://127.0.0.1:3000/docs/api/marketplace): Publish ready clones and license community listings as voice_id.
- [Voice design](http://127.0.0.1:3000/docs/api/voice-design): Generate a custom voice from a natural-language description on paid plans.
- [Agents](http://127.0.0.1:3000/docs/api/agents): Turn-based conversational agents that return text replies and optional TTS audio.
- [Webhooks](http://127.0.0.1:3000/docs/api/webhooks): Payment provider webhooks — payload schemas, signature headers, retries, and idempotency.
- [Billing](http://127.0.0.1:3000/docs/api/billing): Upgrade plans via Stripe or Global South payment rails.

### Self-hosted

- [Local worker](http://127.0.0.1:3000/docs/self-hosted/local-worker): Self-hosted stack — Ollama, Kokoro-82M, MuseTalk on RTX 3060/4090 or CPU.
- [Deploy](http://127.0.0.1:3000/docs/self-hosted/deploy): Production deployment with Supabase, Docker Compose, Caddy TLS, and Celery workers.
- [Enterprise deployment](http://127.0.0.1:3000/docs/self-hosted/enterprise): Private VPC, on-prem GPU, air-gapped, SLA

## Machine-readable exports

- [Documentation index (/docs/llms.txt)](http://127.0.0.1:3000/docs/llms.txt): sitemap-style page index for agents and IDE plugins
- [Full documentation (/docs/llms-full.txt)](http://127.0.0.1:3000/docs/llms-full.txt): complete docs corpus in one Markdown file
- [OpenAPI spec (/docs/openapi.json)](http://127.0.0.1:3000/docs/openapi.json): OpenAPI 3.0 — Postman, Insomnia, codegen
- [Postman collection (/docs/postman.json)](http://127.0.0.1:3000/docs/postman.json): importable v2.1 collection

## Primary API endpoints

- POST /api/v1/tts — text to speech (WAV or streaming Opus/AAC)
- POST /api/v1/generate — text→avatar or video+audio lipsync (input[], sync_mode)
- POST /api/v1/generate/batch — JSONL or JSON items, dry_run, batch.completed webhook
- POST /api/v1/estimate — credit preview (tts, stt, video, dub, lipsync)
- POST /api/v1/assets — media library (url, upload, asset_id)
- POST /api/v1/avatar — async talking-head video job
- GET /api/v1/jobs/{id} — poll async job status
- POST /api/voices/clone — voice cloning (paid plans)
- PATCH /api/voices/clone/{id} — rename a clone
- POST /api/v1/agents/turn — conversational voice agents
- POST /api/billing/checkout — plan upgrades and Global South payments
