The short answer: copy or download the prompt from vistaraai.in/integration/chatgpt, paste it (or attach the file) in a new ChatGPT chat, and follow along. ChatGPT walks you through account setup, writes your voice agent's prompt, gives you the exact command to run for each API step — curl on macOS or Linux, PowerShell on Windows — and reads the responses you paste back. It finishes by writing complete files for your backend.
How this differs from a coding agent
In a normal chat, ChatGPT can't make requests to your Vistara account or edit your files. You are its hands: you run each command it gives you and paste the JSON response back, and it reads the response carefully before the next step. It is slower than a coding agent like Claude Code or Cursor, but it needs nothing beyond a browser and a terminal.
Step 1: Start the chat
Open a new conversation and paste the prompt. It is long; if ChatGPT says the message is too long, use Download as .md File on the ChatGPT page, attach the file, and ask ChatGPT to follow it.
Step 2: Tell it your operating system
ChatGPT asks whether you're on Windows or macOS/Linux and gives commands for that system. The commands read your key from the VISTARA_API_KEY environment variable, so you never paste the key into the chat. Set it once in your terminal:
# macOS / Linux
export VISTARA_API_KEY="your-key"
# Windows PowerShell
$env:VISTARA_API_KEY = "your-key"
Step 3: Design the agent together
Answer ChatGPT's questions about your business and the goal of the call. It writes the agent prompt with Vistara's Voice Agent Builder — instructions in English, spoken lines in the customer's own script — and gives you the agent as one JSON file, agent.json, plus the command that sends it. A long prompt full of quotes and Hindi text breaks easily inside a shell string, which is why it uses a file.
Step 4: Place a test call to your own phone
ChatGPT gives you a test-call command. In PowerShell it looks like this:
$headers = @{ "x-api-key" = $env:VISTARA_API_KEY; "x-call-type" = "test" }
$body = @{ phone = "+919876543210"; agentId = "AGENT_UUID"; name = "Ravi" } | ConvertTo-Json
Invoke-RestMethod -Uri "https://app.vistaraai.in/api/v1/calls/initiate" -Method Post -Headers $headers -ContentType "application/json; charset=utf-8" -Body $body
Your phone rings. Talk to the agent like a real customer — interrupt it, go off script, push back. Then run the status command ChatGPT gives you and paste the result: it reads the summary, answers and transcript and suggests fixes.
Step 5: Get the backend code
Tell ChatGPT your stack. It writes complete files — not fragments — and says exactly where each one goes: a server-side client that starts calls, a webhook endpoint protected by a secret token, and a table for call results.
Reading the responses you paste back
| Status | What it means |
|---|---|
| 200 / 201 | Success — ChatGPT moves to the next step. |
| 400 | A field is invalid; the error message names it. |
| 401 | The API key is missing or wrong in your terminal. |
| 402 | Wallet balance too low — recharge on the Wallet page. |
| 429 | Rate limit — wait the number of seconds in Retry-After. |