ElevenLabs Setup
ElevenLabs Setup
You only need to set this up once for the server.
1. Create an API key
Sign in to ElevenLabs and create a new API key for Raze_NPCAI. A restricted key is recommended. The current build needs:
- ElevenAgents: Write
- Voices: Read
Keep the key private. Do not post it in Discord, screenshots or client-side FiveM files.
2. Configure the agent
Raze_NPCAI currently expects:
- TTS output: PCM 48000 Hz
- Client event: user_transcript enabled
- Audio and interruption enabled
- agent_response enabled or recommended
Publish the agent after changing its settings.
3. Add the server values
Open:
config/server_config.json
Set:
ElevenLabsApiKey
ElevenLabsAgentId
The API key belongs only in the server configuration. Do not move it into client_config.json, NUI JavaScript or any other client-visible file.
4. Start the resource
The server console should confirm that the ElevenLabs voice inventory loaded. If the API request fails, check the key permissions, Agent ID and outbound connectivity from FXServer.