ThunderPhone 2.0 ഇപ്പോൾ ലൈവാണ്.സ്വയം തുടങ്ങാം — 2¢/മിനിറ്റ് മുതൽ.പ്രഖ്യാപനം വായിക്കുക

Getting Started

ക്വിക്‌സ്റ്റാർട്ട് (API)

AI ഏജന്റിനൊപ്പം നിങ്ങളുടെ ആദ്യ ഫോൺ കോൾ സ്വീകരിക്കുക: API കീ നേടുക, ഒരു ഏജന്റ് സൃഷ്ടിക്കുക, ഒരു ഫോൺ നമ്പർ പ്രൊവിഷൻ ചെയ്യുക, ലൈവ് ടെസ്റ്റ് കോൾ നടത്തുക — എല്ലാം REST API വഴി.

ഈ ഗൈഡ്, ഒരു AI ഏജന്റുമായി നിങ്ങളുടെ ആദ്യ ഫോൺ കോൾ സ്വീകരിക്കാൻ ആവശ്യമായ നാല് REST കോളുകളിലൂടെ നിങ്ങളെ നയിക്കുന്നു.

ഘട്ടം 1: ഒരു API കീ നേടുക

  1. ലോഗിൻ ചെയ്യുക

    app.thunderphone.com തുറക്കുക.

  2. കീകളിലേക്ക് പോകുക

    ഡാഷ്ബോർഡിലെ ഓർഗനൈസേഷൻ → കീകൾ എന്നതിലേക്ക് പോകുക.

  3. ഒരു കീ സൃഷ്ടിക്കുക

    കീ സൃഷ്ടിക്കുക ക്ലിക്ക് ചെയ്യുക, അതിന് ഒരു പേര് നൽകുക, തുടർന്ന് sk_live_... മൂല്യം പകർത്തുക. പൂർണ്ണ കീ ഒരിക്കൽ മാത്രം കാണിക്കും — അത് ഉടൻ തന്നെ നിങ്ങളുടെ സീക്രട്ട് മാനേജറിൽ സൂക്ഷിക്കുക.

ഈ ഗൈഡിലുടനീളം, sk_live_YOUR_API_KEY നിങ്ങൾ ഇപ്പോൾ പകർത്തിയ മൂല്യം ഉപയോഗിച്ച് മാറ്റുക. കീ നിങ്ങളുടെ ഓർഗനൈസേഷനെ സ്വയമേവ തിരിച്ചറിയുന്നു, അതിനാൽ URL-കളിൽ ഒരിക്കലും ഓർഗനൈസേഷൻ ID ചേർക്കേണ്ടതില്ല.

ഘട്ടം 2: ഒരു ഏജന്റ് സൃഷ്ടിക്കുക

AI സംഭാഷണങ്ങൾ എങ്ങനെ കൈകാര്യം ചെയ്യണമെന്ന് ഒരു ഏജന്റ് നിർവചിക്കുന്നു — prompt, ശബ്ദം, ഉൽപ്പന്ന ടിയർ, ടൂളുകൾ, വിജറ്റ് ഉപയോഗയോഗ്യത എന്നിവ.

cURL
curl -X POST https://api.thunderphone.com/v1/agents \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name":   "Customer Support",
    "prompt": "You are a friendly support agent for Acme Corp. Help with orders, returns, and product info. Be concise and helpful.",
    "voice":  "john",
    "product": "spark"
  }'
Python
import os, requests
 
agent = requests.post(
    "https://api.thunderphone.com/v1/agents",
    headers={"Authorization": f"Bearer {os.environ['THUNDERPHONE_API_KEY']}"},
    json={
        "name":   "Customer Support",
        "prompt": "You are a friendly support agent for Acme Corp. Help with orders, returns, and product info. Be concise and helpful.",
        "voice":  "john",
        "product": "spark",
    },
).json()
print("Agent id:", agent["id"])
Node.js
const agent = await fetch("https://api.thunderphone.com/v1/agents", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.THUNDERPHONE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name:    "Customer Support",
    prompt:  "You are a friendly support agent for Acme Corp. Help with orders, returns, and product info. Be concise and helpful.",
    voice:   "john",
    product: "spark",
  }),
}).then((r) => r.json());
console.log("Agent id:", agent.id);

ഘട്ടം 3: ഒരു ഫോൺ നമ്പർ പ്രൊവിഷൻ ചെയ്യുക

ഈ കോൾ ThunderPhone-നോട് ഒരു നമ്പർ ആവശ്യപ്പെടുകയും നിങ്ങളുടെ പുതിയ ഏജന്റിനെ ഇൻബൗണ്ട് ഹാൻഡ്‌ലറായി നിയോഗിക്കുകയും ചെയ്യുന്നു. (VoIP പ്രൊവൈഡറിൽ നിന്ന് നിങ്ങളുടെ സ്വന്തം നമ്പർ കൊണ്ടുവരാൻ, VoIP കണക്ഷനുകൾ കാണുക.)

cURL
# First provision
curl -X POST https://api.thunderphone.com/v1/phone-numbers \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"area_code": "415"}'
 
# Then assign the agent you created in Step 2
curl -X PATCH https://api.thunderphone.com/v1/phone-numbers/<id-from-previous> \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inbound_agent_id": 12}'
Python
number = requests.post(
    "https://api.thunderphone.com/v1/phone-numbers",
    headers={"Authorization": f"Bearer {os.environ['THUNDERPHONE_API_KEY']}"},
    json={"area_code": "415"},
).json()
requests.patch(
    f"https://api.thunderphone.com/v1/phone-numbers/{number['id']}",
    headers={"Authorization": f"Bearer {os.environ['THUNDERPHONE_API_KEY']}"},
    json={"inbound_agent_id": agent["id"]},
)
print("Your ThunderPhone number:", number["number"])

നിങ്ങളുടെ പുതിയ നമ്പർ status="provisioning" എന്ന നിലയിൽ ആരംഭിച്ച് ഏതാനും സെക്കൻഡുകൾക്കുള്ളിൽ active-ലേക്ക് മാറും; നിങ്ങൾ ബ്രൗസർ അടയ്ക്കുമ്പോഴേക്കും നമ്പർ കോളുകൾ സ്വീകരിക്കാൻ തയ്യാറായിരിക്കും.

ഘട്ടം 4 (ഐച്ഛികം): ഒരു വെബ്ഹുക്ക് സജ്ജീകരിക്കുക

തത്സമയ ഇവന്റുകൾക്കായി (ഡൈനാമിക് കോൾ റൂട്ടിംഗ്, കോൾ ശേഷമുള്ള പ്രോസസ്സിംഗ്) ഒരു വെബ്ഹുക്ക് എൻഡ്പോയിന്റ് ചേർക്കുക. നിങ്ങൾക്ക് ആവശ്യമായ ഇവന്റുകൾക്ക് മാത്രം സബ്സ്ക്രൈബ് ചെയ്യുക.

curl -X POST https://api.thunderphone.com/v1/developer/webhook-endpoints \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "label":  "Prod webhook",
    "url":    "https://your-server.com/thunderphone-webhook",
    "events": ["telephony.incoming", "telephony.complete"]
  }'

റെസ്പോൺസിൽ ഒറ്റത്തവണ ഉപയോഗിക്കാവുന്ന ഒരു secret ഉണ്ടാകും — അത് നിങ്ങളുടെ സീക്രറ്റ് മാനേജറിലേക്ക് പകർത്തുക. ഇൻകമിംഗ് റിക്വസ്റ്റുകളിലെ X-ThunderPhone-Signature ഹെഡർ പരിശോധിക്കാൻ ആ സീക്രറ്റ് ഉപയോഗിക്കുക (കാണുക വെബ്ഹുക്കുകളുടെ അവലോകനം).

ഘട്ടം 5: നിങ്ങളുടെ ഏജന്റിനെ പരീക്ഷിക്കുക

നിങ്ങൾ ഇപ്പോൾ പ്രൊവിഷൻ ചെയ്ത നമ്പറിലേക്ക് വിളിക്കുക. ഏജന്റ് കോൾ എടുക്കുകയും, സ്വയം പരിചയപ്പെടുത്തുകയും, നിങ്ങളുടെ prompt പിന്തുടരുകയും ചെയ്യും.

കോൾ അവസാനിച്ചതിന് ശേഷം അത് പരിശോധിക്കുക:

curl https://api.thunderphone.com/v1/calls \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"

ട്രാൻസ്ക്രിപ്റ്റും റെക്കോർഡിംഗ് URL-ഉം ലഭിക്കാൻ ഒരു നിർദിഷ്ട കോളിലേക്ക് വിശദമായി പ്രവേശിക്കുക:

curl https://api.thunderphone.com/v1/calls/{call_id}/transcript \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"
curl https://api.thunderphone.com/v1/calls/{call_id}/audio \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"

അടുത്ത ഘട്ടങ്ങൾ