# AINPCEngine - AI-Powered NPC Engine for Game Studios # https://ainpcengine.com ## What is this? AINPCEngine gives game NPCs persistent memory, real personalities, and multi-agent intelligence. Send game events, get intelligent NPC responses. REST + WebSocket API. SDKs for Unity, Unreal, Godot, Rust, and Node.js. 51 AI voices for NPC speech synthesis (TTS). ## Authentication Every request requires two headers: x-api-key: YOUR_API_KEY x-game-id: YOUR_GAME_ID Start with 5 NPCs and 1,000 interactions for a one-time $1 verification. Sign up at https://ainpcengine.com/auth/register ## Quick Start 1. Create NPC: POST /api/npcs {name, role, personality: {traits, speechStyle, backstory, values}} 2. Send event: POST /api/npcs/:id/event {type: "player_dialogue", playerId, message, context} 3. Get response: {response: {dialogue, emotion, action, tradeOffer}, tokenUsage} 4. NPC speaks: POST /api/npcs/:id/speak {text} -> {audio (base64), format, voice} ## Key Endpoints POST /api/npcs Create NPC GET /api/npcs List NPCs GET /api/npcs/:id Get single NPC PATCH /api/npcs/:id Update NPC DELETE /api/npcs/:id Delete NPC POST /api/npcs/:id/event Send game event (dialogue, combat, trade, quest...) POST /api/npcs/:id/event?voice=true Send event + get voice audio with response POST /api/npcs/:id/speak Synthesize NPC voice from text (TTS) POST /api/events Batch events (up to 50) POST /api/events?stream=true Same, as SSE: a `typing` frame per event the moment it is accepted, then `message` per result, then `done` (show the NPC "typing…" until the line lands) POST /api/npcs/generate NPC Persona - AI-generate NPC with OCEAN personality + schedule + psychology POST /api/npcs/generate-batch Batch generate with social links GET /api/stats Expert registry + cognitive features GET /api/health Healthcheck (includes version) WS /ws?apiKey=X&gameId=Y Real-time game event streaming (emits a `typing` frame on accept, then `response`) ## Event Types player_approached, player_dialogue, player_left, combat_started, combat_ended, trade_requested, trade_completed, quest_accepted, quest_completed, quest_failed, ambient_trigger, world_event, npc_interaction ## CLI (fastest way for agents) npm install -g ainpc-cli ainpc login --key YOUR_KEY --game my-game ainpc create "NPC Name" --role merchant ainpc say NPC_ID "hello" ainpc generate --role guard ainpc list ainpc --help ## SDKs CLI (npm): npm install -g ainpc-cli (recommended for agents) Unity (C#): Copy sdk/unity/ into Assets/Plugins/AINPCEngine/ Unreal (C++): Copy sdk/unreal/AINPCEngine/ into Plugins/ Godot (GDScript): Copy sdk/godot/addons/ainpcengine/ into addons/ Rust: git clone https://github.com/jyswee/ainpc-rust-sdk.git Node.js / REST: No SDK needed - use fetch/axios with x-api-key + x-game-id headers ## Demo Repos (clone and run) Unity: https://github.com/jyswee/ainpc-unity-demo Unreal: https://github.com/jyswee/ainpc-unreal-demo Godot: https://github.com/jyswee/ainpc-godot-demo Rust: https://github.com/jyswee/ainpc-rust-sdk ## Agent Integration Skill file (API key required): https://ainpcengine.com/api/docs/skill.md Quickstart guides: https://ainpcengine.com/docs/quickstart.html ## Pricing Starter: $1 one-time (5 NPCs, 1K interactions/mo, hard cap) Indie: $99/mo (25 NPCs, 10K interactions, overage $0.01/ea) Studio: $499/mo (100 NPCs, 50K interactions, overage $0.008/ea, all 9 experts) Enterprise: $1,990/mo (unlimited NPCs, 200K interactions, overage $0.005/ea) ## Voice Add-on Voice Basic: $99/mo (10K chars, 51 AI voices) Voice Pro: $299/mo (100K chars, premium voices, voice cloning) ## Company AINPCEngine is a product of Tyga.Cloud Ltd - https://tyga.cloud Contact: hello@ainpcengine.com