How do I give an assistant tool access through the...
# support
d
I've created two custom tools in the API. But I don't know how to have the assistant be able to call the tools through the API? It's a dynamic thing where if a user is integrated with a particular service then they have access to these tools, so it's not always the case. I'm not seeing this answered in the documentation. Thanks
v
Based on the information I found, you can update an assistant's configuration to include tool IDs using a PATCH request to
https://api.vapi.ai/assistant/id
. Here's an example:
Copy code
curl -X PATCH https://api.vapi.ai/assistant/id \
     -H "Authorization: Bearer YOUR_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
  "model": {
    "provider": "openai",
    "model": "gpt-4o",
    "toolIds": [
      "your-tool-id-here"
    ]
  }
}'
For the dynamic aspect, could you clarify how you're determining whether a user is integrated with the particular service? This would help me provide more specific guidance on implementing conditional tool access. Source: - [Discord Channel](https://discord.com/channels/1211482211119796234/1333975440003563604)
d
@Vapi Support Bot in the API how do I ensure that the model is elevenlabs flash or elevenlabs turbo?
v
Based on the information I found, there are both "flash" and "turbo" models available for ElevenLabs in Vapi, with some users reporting issues with the flash model. While I don't have the exact API syntax, it likely involves specifying the model parameter similar to other model configurations. Are you trying to set this for voice synthesis (TTS) or as an LLM provider? This would help me provide more specific guidance on the correct API parameters to use. Source: - [Discord Channel](https://discord.com/channels/1211482211119796234/1335277468805758986)
d
@Vapi Support Bot this is for TTS. I would like to use 11labs for TTS, but specifically I want to use 11labs flash rather than 11labs turbo.
v
Based on the information I found, you can likely specify ElevenLabs flash for TTS by updating your assistant configuration with a PATCH request. The flash models
eleven_flash_v2
and
eleven_flash_v2_5
are available in Vapi, but I don't have the exact parameter name. Try this approach:
Copy code
json
{
  "voice": {
    "provider": "11labs",
    "model": "eleven_flash_v2_5"  // or possibly "voiceModel": "eleven_flash_v2_5"
  }
}
Note: The flash model is newer and may have some hiccups compared to turbo. Sources: - [Vapi Changelog](https://docs.vapi.ai/changelog/2024/12/21) - [Discord Channel](https://discord.com/channels/1211482211119796234/1342104920207392819)
d
ok, thanks @Vapi Support Bot - and how do I choose a particular elevenlabs voice? what do I have to put in for the ID?
v
Based on the information I found, you can specify a particular ElevenLabs voice by adding the
voiceId
parameter to your voice configuration. Here's how to structure it:
Copy code
json
{
  "voice": {
    "provider": "11labs",
    "model": "eleven_flash_v2_5",
    "voiceId": "your-voice-id-here"
  }
}
To get your voice IDs, have you already added your ElevenLabs voices to the Vapi dashboard at https://dashboard.vapi.ai/library/voice? You'll need to sync with ElevenLabs first to access your voices. Sources: - [Discord Channel](https://discord.com/channels/1211482211119796234/1270786139355090995) - [Custom Voice Documentation](https://docs.vapi.ai/customization/custom-voices/custom-voice)
k
Obtain the voice ID from the ElevenLabs website or API, and input it into Vapi interface or API configuration.
4 Views