# Awtaar Enterprise Voice & Speech AI API - Full Integration Documentation > Official developer documentation and system prompt for AI Coding Assistants (ChatGPT, Claude, Cursor, GitHub Copilot, Windsurf, Devin, Antigravity). > Use this document to generate accurate, high-performance, and type-safe integrations for speech synthesis (TTS), voice streaming, speech-to-text (STT), and multi-speaker dialogues. --- ## 1. Quick Overview & Authentication - **Base URL:** ${origin} - **Authentication Scheme:** HTTP Bearer Token in request header: `Authorization: Bearer ` (or query param `?apiKey=...` or `x-vapi-secret` header) - **Content-Type:** `application/json` (except `/api/transcribe` which uses `multipart/form-data`) - **Key Management:** Generated in the developer dashboard at `/api-access` - **Billing & Quota:** Micro-metered deduction per exact second from user wallet. Check balance via `GET /api/wallet`. --- ## 2. Proprietary Neural Voice Models & Unit Pricing Matrix Awtaar provides 4 enterprise neural speech models engineered for specific workloads. All models are zero-vendor-leak protected and micro-metered against your wallet: | Model ID | Description | Latency | Quality | Unit Cost Multiplier | Ideal Use Cases | | :--- | :--- | :---: | :---: | :---: | :--- | | **`awtaar-realtime`** | Ultra-Low Latency Streaming Engine | <100ms | 24kHz Mono | **1.5x** | AI Phone Agents, Vapi, LiveKit, Interactive Callbots | | **`awtaar-realtime-flash`** | Real-Time Streaming Studio Flash Engine | ~3s (burst) | 24kHz Mono | **1.25x** | Prompt-steered Voice Agents, High-Fidelity Dialects | | **`awtaar-voice-v2`** | Flagship Studio Broadcast Engine | ~350ms | 44.1kHz Hi-Fi | **1.0x (Standard)** | IVR, Video Dubbing, Podcasts, Audiobooks | | **`awtaar-cinema`** | Expressive Dramatic Acting Engine | ~500ms | 44.1kHz Hi-Fi | **2.0x** | Cinematic Acting, Gaming, Storytelling, Deep Emotions | | **`awtaar-omni`** | Multimodal Nuanced Conversational Engine | ~400ms | 44.1kHz Hi-Fi | **2.22x** | Complex Dialogues, Multi-speaker Executive Assistants | | **`tts-1`** / **`tts-1-hd`** | OpenAI Compatible Aliases | ~350ms | 44.1kHz Hi-Fi | **1.0x** | Direct drop-in replacement for OpenAI SDKs | ### 2.1 Real-Time Streaming Latency & Architecture Benchmarks | معرّف النموذج في منصتك | المحرك والمعمارية الداخلية | زمن أول بايت (TTFB) | زمن التوليد الكلي | نوع التدفق | أفضل استخدام | | :--- | :--- | :---: | :---: | :---: | :--- | | **`awtaar-realtime`** ⚡ | محرك التدفق اللحظي (Neural FastStream) | **290 ms – 651 ms** | **1,077 ms** | Streaming فوري | الأسرع على الإطلاق لمكالمات Vapi.ai والروبوتات الهاتفية ذات المقاطعة السريعة | | **`awtaar-voice-v2 (Lite)`** | محرك الاستوديو السريع (Neural Stream-Lite) | **1,303 ms** | **1,395 ms** | Streaming | سريع واستوديو متوازن مع تحكم بالنبرات | | **`awtaar-cinema`** | محرك التمثيل الدرامي (Neural Cinema Drama) | **930 ms – 1,471 ms** | **1,471 ms** | Buffered Chunks | الأفضل للتمثيل الدرامي والقصص والبودكاست وتعبيرات التنفس | | **`awtaar-realtime-flash`** 🌟 | محرك النبرات واللهجات المتقنة (Neural Expressive Flash) | **3,052 ms – 3,358 ms** | **3,484 ms** | Burst Streaming | الأعلى جودة وتعبيرات لهجات طبيعية ومشاعر مسرحية حية | **الخلاصة التحليلية لاختيار النموذج:** - **لمكالمات Vapi.ai والمحادثات الحية (Ultra-Low Latency Phone Agents):** اختر نموذج `awtaar-realtime` لبدء إرجاع أول مقطع صوتي في أقل من 300ms، وهو العامل الحاسم لمنع أي فترات صمت محرجة أثناء التحدث. - **للهجات العربية المتقنة والتحكم بالمشاعر (Prompt-Steered Acting):** اختر نموذج `awtaar-realtime-flash` لتوجيه النبرة والمشاعر وإتقان اللهجات المحلية مع تدفق عالي النقاء. - **للتمثيل والقصص والبودكاست (Drama & Storytelling):** اختر نموذج `awtaar-cinema` لأداء تمثيلي مسرحي مشوق. - **للتطبيقات العامة والاستوديو الاقتصادي (Standard Studio):** اختر نموذج `awtaar-voice-v2` بمعامل تكلفة قياسي 1.0x. --- ## 3. API Endpoints Reference ### 3.1 Text-to-Speech & Real-Time Agent Webhook: POST /api/generate Generates natural, studio-quality speech or real-time streaming audio for AI Agents (Vapi.ai, LiveKit, Twilio). - **URL:** `${origin}/api/generate` - **Query Authentication (Recommended for Webhooks):** `${origin}/api/generate?apiKey=&model=awtaar-realtime&voiceId=nour-egyptian-warm` - **Method:** `POST` - **Headers:** - `Authorization: Bearer ` (or query param `?apiKey=...` or header `x-vapi-secret`) - `Content-Type: application/json` - **Request Body (JSON):** - `text` or `input` (string, required): The text script to synthesize. - `voiceId` or `voice` (string, optional, default: `nour-egyptian-warm`): Voice persona slug. - `model` (string, optional, default: `awtaar-realtime`): `"awtaar-realtime"`, `"awtaar-voice-v2"`, `"awtaar-cinema"`, `"awtaar-omni"`. - `response_format` (string, optional): `"wav"` (default), `"mp3"`, or `"pcm"`. - `stream` (boolean, optional): If `true`, streams raw audio chunks with chunked transfer encoding (sub-100ms latency). - `sampleRate` (number, optional): Target sample rate for raw PCM (`8000`, `16000`, `22050`, `24000`). Automatically detected and resampled for Vapi requests. - **Response:** - Standard Client: Binary audio (`audio/wav` or `audio/mpeg`) - Vapi / Telephony Agent: Raw 16-bit signed mono PCM (`application/octet-stream`) resampled without any header artifacts. - Custom Headers: - `X-Model`: Active model used - `X-Remaining-Seconds`: Remaining wallet balance in seconds - `X-Audio-Duration`: Synthesized audio length in seconds - `X-Sample-Rate`: Audio sampling frequency (e.g. 16000, 24000) - `X-Latency-Ms`: Processing latency in milliseconds --- ### 3.2 Dedicated Universal Audio Streaming API: POST & GET /api/stream Sub-100ms ultra-low latency real-time chunked streaming endpoint for ANY client, frontend, mobile app, backend bot, or AI agent. - **URL:** `${origin}/api/stream` - **HTTP Methods:** `POST` (Recommended for Apps/Bots) & `GET` (Instant playback via HTML5 `