Issue: Custom LLM with Sarvam AI — can't add Beare...
# support
h
Hi Vapi team! I'm building a Tamil-language AI voice agent using Vapi (Assistant ID: 6256fe51-71b7-44ce-b3d3-0754d68a328f) My config: - Provider: Custom LLM - URL: https://api.sarvam.ai/v1 - Model: sarvam-30b - Auth needed: Authorization: Bearer Problem: In Vapi dashboard, I added the API key in Integrations/Provider Keys — but it was added WITHOUT the "Bearer" prefix. There's no option to add custom headers for Custom LLM in the dashboard. Questions: 1. Does Vapi auto-add "Bearer" prefix for Custom LLM keys? 2. How do I add Authorization: Bearer header manually? 3. Any workaround for Sarvam AI authentication in Vapi? Account: hsudan2412@gmail.com Thanks!
s
Hi, thanks for reaching out.
We'll soon get back to you on this.
Hi there! Great to see you building a Tamil-language agent with Sarvam AI. You’re correct that the dashboard UI is currently a bit limited for custom headers, but you can actually resolve this today by using the Vapi API or SDK. While the dashboard "Provider Keys" section adds the prefix automatically for standard providers, the Custom LLM configuration allows you to pass a headers object directly via the API. This will bypass the dashboard's default formatting.
The Solution You can update your assistant using a simple PATCH request to include the exact Authorization header required by Sarvam. Using cURL:
Copy code
bash
curl -X PATCH https://api.vapi.ai/assistant/6256fe51-71b7-44ce-b3d3-0754d68a328f \
  -H "Authorization: Bearer YOUR_VAPI_PRIVATE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": {
      "provider": "custom-llm",
      "url": "https://api.sarvam.ai/v1",
      "model": "sarvam-30b",
      "headers": {
        "Authorization": "Bearer YOUR_SARVAM_API_KEY"
      }
    }
  }'
Security: Header values are redacted in Vapi logs to ensure your API keys remain secure. Give that a try and your authentication should go through perfectly. Let us know if you have any other questions!