Claude logoVistara AI + Claude Integration

Add AI Calling to Your App with Claude

Connect AI voice calling to your codebase with Claude Code in your terminal or IDE, or with Claude on the web and desktop. Effortlessly equip your project with low-latency (450–600 ms) conversational telephony simply by copying and pasting the master prompt below into Claude.

Anthropic Claude & Claude Code Master Prompt
Production Telephony & Voice Agent Prompt Ready

The prompt contains complete knowledge of the Vistara Connect REST API, low-latency Hindi telephony defaults, voice agent craftsmanship guidelines, and an automated flow to trigger a live test call to your personal mobile phone.

Download as .md File

Coding agents work best with the file: save it in your project (for example as VISTARA.md) and ask Claude to follow it.

1-Click Copy No Manual SDK Config Required Live Phone Call Experience Included Up to ₹100 Free Credit on Signup

Using a different AI tool or editor?

Switch to dedicated integration pages for your favorite coding assistant:

View All AI Tools
Interactive Telephony Workflow

What Happens When You Paste This Prompt into Claude

Step 01

Account Verification

Claude asks if you are registered at app.vistaraai.in. If new, it guides you through phone OTP sign-up — ₹100 free credit with GSTIN (₹50 without); only connected minutes are billed, so unanswered test calls cost nothing.
Step 02

Agent Query & Selection

Uses your API key to list your existing voice agents. You can pick an active agent or let Claude construct a brand new dedicated persona.
Step 03

Voice Prompt Craftsmanship

Constructs a 10-section prompt with native Devanagari Hindi spoken text, phone conversation mechanics, objection handling, and CRM deliverables.
Step 04

Live Phone Test Call

Asks for your mobile number and dispatches a priority test call (x-call-type: test). Your phone rings immediately so you experience the AI conversation live!
Step 05

Codebase Scaffolding

Scaffolds clean outbound call dispatchers, webhook receivers for post-call transcripts, rate-limiting guards, and .env files directly in your repository.
Developer Telephony Specs

Under the Hood: Vistara Connect REST Architecture

Everything Claude will wire up into your backend application:

Programmatic Agent Management (GET, POST, PUT /api/v1/agents)

Manage conversational agent lifecycles via REST. Agents default to Hindi with native Indian speech synthesis (meera or Aoede).

// Create Voice Agent (100 req/min limit)
curl -X POST https://app.vistaraai.in/api/v1/agents \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Customer Support RM",
    "language": "Hindi",
    "calling_method": "traditional",
    "voice": "meera",
    "first_message": "नमस्ते {{customer_name}} जी! मैं आपकी क्या सहायता कर सकती हूँ?",
    "system_instruction": "You are a courteous, expert AI support assistant...",
    "deliverables": [
      { "question": "Was customer interested?", "type": "fixed", "options": "Yes, No", "isGoal": true, "goalValue": "Yes" }
    ]
  }'

Step-by-Step Guide: Claude + Vistara AI

The short answer: save the Vistara AI integration prompt from vistaraai.in/integration/claude in your project as VISTARA.md, store your API key as VISTARA_API_KEY, and ask Claude Code to follow the file. Claude Code checks your key, helps you build a voice agent, places a test call to your phone, and then writes the call-starting code, the webhook endpoint and the data model into your repository.

Why Claude Code fits this job

Claude Code works in your terminal or IDE with access to your repository and shell. That means it can do the whole loop itself: run the Vistara API calls, read the responses, and edit your code — while you stay in charge of the decisions. Claude on the web or desktop works too, but there you run each command yourself and paste the response back.

Before you start

  • A Vistara AI account — sign up at app.vistaraai.in with an Indian mobile number. New accounts get ₹100 free credit with a GSTIN (₹50 without); only connected minutes are billed, so unanswered calls cost nothing.
  • Your API key from the Connect page, stored as an environment variable: export VISTARA_API_KEY="..." on macOS or Linux, $env:VISTARA_API_KEY = "..." in PowerShell, or a .env file that is listed in .gitignore.
  • Claude Code opened in your project folder.

Step 1: Put the prompt in your project

On the Claude integration page, choose Download as .md File and save it at the root of your repository as VISTARA.md. Then tell Claude Code: "Read VISTARA.md and follow it to add Vistara AI voice calling to this project." Pasting the prompt works as well; the file simply lets Claude re-read the full guide at any point in a long session.

Step 2: Let Claude Code check your setup

Claude Code confirms VISTARA_API_KEY is set without printing it, then lists your active agents. A successful response confirms the key works; a 401 means the key is missing or wrong. You then choose: use one of your agents, improve one, or build a new one.

Step 3: Build the voice agent

Claude asks a handful of questions — company, the purpose of the call, language, the agent's name and voice, what to capture after each call, and which per-customer details your system will send (for example plan_name or renewal_due_date). It then writes a ten-section agent prompt using Vistara's Voice Agent Builder, saves it in your repository so it is version-controlled, and creates the agent after you approve it. Any business fact it doesn't know stays marked [TO FILL] until you supply it, so the agent never invents prices or dates.

Step 4: Take the test call

Claude repeats your number back, places a test call (test calls are allowed at any time of day, up to five per minute) and waits for the result. Then it shows you the summary, sentiment, extracted answers, the recording link and the parts of the transcript that matter. Tell it what to change — a line that sounded robotic, a question asked twice — and it updates the agent and offers another test call.

Step 5: Let it write the integration

Claude Code looks at your stack and builds inside your existing structure:

  • a Vistara client with startCall and getCall, 15-second timeouts and retries only where they are safe — it never automatically retries starting a call, because there is no idempotency key and a blind retry could ring a customer twice;
  • a webhook route that checks a secret token, saves each result by callId and answers 200 straight away;
  • a voice_calls table and a reconciliation job for webhooks that never arrived;
  • the place calls start from — a "Call now" button, an event such as a new lead, or a scheduled batch.
// Behind a "Call now" button — server-side only
const callId = await startCall({
  phone: lead.phone,
  name: lead.name,
  metadata: { lead_id: lead.id, plan_name: lead.plan },
});

Step 6: Go live

Before real customers are called, Claude walks you through the checklist: a production agent separate from the test agent, the webhook URL with its secret token, the key only in server-side environment variables, an alert when the wallet runs low, calls scheduled inside the 09:00–20:00 IST window, a redial policy for unanswered calls and an opt-out list.

Tips from real integrations

  • Keep the key out of the chat. Claude Code reads it from the environment; there is no need to paste it.
  • Webhooks need a public URL. Vistara rejects localhost, so expose your local server with a tunnelling tool and set that URL on a test agent.
  • Use two agents. The webhook URL belongs to the agent, so separate "Sales – Test" and "Sales – Production" agents keep test traffic out of production.

Claude Integration FAQ

How do I add AI calling to my app with Claude?
Copy the Vistara AI integration prompt on this page and paste it into Claude, or save it in your project as VISTARA.md and ask Claude to follow it. Claude then checks your Vistara account and API key, helps you create a voice agent, places a test call to your own phone, and writes the code that starts calls and receives each call's transcript, summary and extracted answers by webhook.
Does it work in Claude chat as well as Claude Code?
Yes. Claude Code can run the Vistara API calls and edit your project itself. In Claude on the web or desktop, Claude gives you the exact commands to run and complete files to add, and you paste the responses back.
Is my Vistara API key safe?
The prompt never contains your key. Claude is told to read it from the VISTARA_API_KEY environment variable, keep it out of source files, examples and logs, and use it only on the server — never in browser or mobile app code.
How much does it cost to try?
The prompt is free. New Vistara AI accounts get ₹100 free credit with GSTIN (₹50 without); only connected minutes are billed, so unanswered test calls cost nothing. After that, calls are billed per connected minute from your prepaid wallet.
Can I do this in Claude on the web instead of Claude Code?
Yes. In Claude on the web or desktop, Claude gives you the exact commands to run (curl or PowerShell) and complete files to add, and you paste each response back. Claude Code is faster because it runs the commands and edits the files itself.
Will Claude Code put my API key in the code?
No. The prompt tells it never to write the key into source files, examples, logs or commits, and to use it only server-side. Keep your .env file in .gitignore.
Which languages and frameworks does it support?
Whatever your project uses — Node.js, Next.js or Express, Python with FastAPI or Django, PHP and Laravel, Java, Go and others. Vistara AI is a plain REST API, so Claude Code writes the client in your stack.
Can the webhook point to localhost while I develop?
No. Vistara only sends webhooks to publicly reachable URLs. Expose your local server with a tunnelling tool, add the secret token to the URL, and set it as the test agent's webhook URL.

Ready to integrate voice AI into your product?

Sign up in under 60 seconds with your mobile number and get your live API key — plus ₹100 free credit with GSTIN (₹50 without); only connected minutes are billed, so unanswered test calls cost nothing.

Claim Free Credit