Lovable logoVistara AI + Lovable Integration

Add AI Calling to Your App with Lovable

Make the app you are building in Lovable AI-calling ready — test-call screen, call history and the backend that talks to Vistara AI. Effortlessly equip your project with low-latency (450–600 ms) conversational telephony simply by copying and pasting the master prompt below into Lovable.

Lovable 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 Lovable 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 Lovable

Step 01

Account Verification

Lovable 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 Lovable 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 Lovable 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: Lovable + Vistara AI

The short answer: open your project in Lovable and paste the prompt from vistaraai.in/integration/lovable into the chat. Lovable adds a backend function that starts Vistara AI calls, a second function that receives each call's result by webhook, and screens to place test calls and review summaries, transcripts and recordings. Your API key goes into the project's secrets, never into the frontend.

What you end up with

  • A "Test call" form — enter a phone number and name, and the agent calls.
  • A calls list with status badges: queued, in progress, completed, failed.
  • A call detail view with the summary, the answers the agent collected, the transcript and an audio player for the recording.
  • Behind them, a backend function that starts calls and a webhook function that stores results in a voice_calls table.

Step 1: Account and API key

Sign up at app.vistaraai.in with your mobile number — new accounts get ₹100 free credit with a GSTIN (₹50 without); only connected minutes are billed. Generate your API key on the Connect page.

Step 2: Paste the prompt into Lovable

In your Lovable project, paste the prompt into the chat. Lovable reads the whole guide, then works through the steps with you.

Step 3: Design the voice agent

Lovable asks what the agent should do — confirm orders, follow up leads, remind customers about appointments — and writes the agent's prompt with Vistara's Voice Agent Builder. Lovable can't run terminal commands, so for steps that talk to the Vistara API directly, such as creating the agent, it gives you a short command to run on your computer and asks you to paste the response back.

Step 4: Add your secrets

Lovable tells you exactly where to add three project secrets: VISTARA_API_KEY, VISTARA_AGENT_ID and VISTARA_WEBHOOK_TOKEN (a random string that protects your webhook). They stay on the server side of your app.

Step 5: Place a test call from your own app

Once the call function exists, use your app's new "Test call" form with your own number. Answer and talk to the agent like a customer would, then open the call in the detail view when the result arrives.

Step 6: Connect the webhook

The webhook URL is the public URL of your webhook function plus ?token= and your secret. Lovable saves it on the agent through the API, so every call's result lands in your app automatically.

Before you share the app

Every call is billed to your Vistara wallet, so make sure only signed-in admins — not every visitor — can trigger calls, and ask Lovable to add that check to the call function. Keep the 09:00–20:00 IST calling window in mind for real customers; test calls to your own phone work at any time.

Lovable Integration FAQ

How do I add AI calling to my app with Lovable?
Copy the Vistara AI integration prompt on this page and paste it into Lovable, or save it in your project as VISTARA.md and ask Lovable to follow it. Lovable 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.
Can Lovable build the screens as well as the integration?
Yes. Lovable builds a backend function that starts calls and receives the webhook, plus a test-call form, a calls list with status badges and a call detail view with the summary, answers, transcript and recording. Your API key goes into the project's secrets, never into the frontend.
Is my Vistara API key safe?
The prompt never contains your key. Lovable 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.
Do I need to write code?
Lovable writes the code. You answer its questions, add three secrets, and run a couple of commands it gives you while the agent is being set up.
Where does my API key go in Lovable?
Into the project's secrets, as VISTARA_API_KEY. Only the backend functions use it; it never appears in your app's frontend code.
Can my app's users trigger calls?
Yes, through the backend function — but every call uses your wallet credit, so restrict who can trigger calls, for example to signed-in admins, and validate phone numbers before calling.
How do call results show up in my Lovable app?
Vistara sends each result to your webhook function, which stores it in a voice_calls table. The calls list and detail view read from that table, so summaries, answers, transcripts and recordings appear automatically.

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