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

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

<Info>
  നിങ്ങൾക്ക് ഒരു [ThunderPhone അക്കൗണ്ട്](https://app.thunderphone.com) ആവശ്യമാണ്.
  സൈൻ അപ്പ് സൗജന്യമാണ്, ഒരു മിനിറ്റിൽ താഴെ സമയം മാത്രം എടുക്കും. ക്ലിക്ക് ചെയ്യുന്നതിന് പകരം curl ഉപയോഗിക്കാനാണോ ഇഷ്ടം?
  കോഡ് ഒന്നും എഴുതാതെ തന്നെ [ഡാഷ്ബോർഡ് ക്വിക്ക്സ്റ്റാർട്ട്](/ml/quickstart-dashboard)
  അതേ ആദ്യ കോളിലേക്ക് എത്തിക്കുന്നു.
</Info>

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

<Steps>
  <Step title="ലോഗിൻ ചെയ്യുക">
    [app.thunderphone.com](https://app.thunderphone.com) തുറക്കുക.
  </Step>
  <Step title="കീകളിലേക്ക് പോകുക">
    ഡാഷ്ബോർഡിലെ **ഓർഗനൈസേഷൻ → കീകൾ** എന്നതിലേക്ക് പോകുക.
  </Step>
  <Step title="ഒരു കീ സൃഷ്ടിക്കുക">
    **കീ സൃഷ്ടിക്കുക** ക്ലിക്ക് ചെയ്യുക, അതിന് ഒരു പേര് നൽകുക, തുടർന്ന്
    `sk_live_...` മൂല്യം പകർത്തുക. പൂർണ്ണ കീ **ഒരിക്കൽ മാത്രം** കാണിക്കും — അത്
    ഉടൻ തന്നെ നിങ്ങളുടെ സീക്രട്ട് മാനേജറിൽ സൂക്ഷിക്കുക.
  </Step>
</Steps>

<Tip>
  തടസ്സപ്പെട്ടോ? [ഒരു സെർവർ API കീ സൃഷ്ടിക്കുക](/ml/guides/api-keys) ഈ
  പ്രക്രിയയെ ഘട്ടംഘട്ടമായി വിശദീകരിക്കുന്നു, കൂടാതെ ആപ്പിനുള്ളിലെ കോപൈലറ്റിന്
  ഓരോ നിയന്ത്രണവും തത്സമയം നിങ്ങൾക്കായി ഹൈലൈറ്റ് ചെയ്യാനാകും.
</Tip>

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

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

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

<CodeGroup>
```bash 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 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"])
```

```javascript 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);
```
</CodeGroup>

<Tip>
  ഉൽപ്പന്ന ടിയറുകൾ: `spark` ചെലവിനായി ഒപ്റ്റിമൈസ് ചെയ്തതാണ്, `bolt` വേഗതയ്ക്കും,
  `storm-base` / `storm-extra` സങ്കീർണ്ണ prompt-കളിലെ ബുദ്ധിശേഷിക്കുമായി.
  പൂർണ്ണ താരതമ്യത്തിനായി [Agents](/api-reference/agents#product-tiers-at-a-glance) കാണുക.
</Tip>

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

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

<CodeGroup>
```bash 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 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"])
```
</CodeGroup>

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

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

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

```bash
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`
ഹെഡർ പരിശോധിക്കാൻ ആ സീക്രറ്റ് ഉപയോഗിക്കുക (കാണുക
[വെബ്ഹുക്കുകളുടെ അവലോകനം](/ml/webhooks/overview)).

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

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

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

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

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

```bash
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"
```

---

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

<CardGroup cols={2}>
  <Card title="ഫംഗ്ഷൻ ടൂളുകൾ ചേർക്കുക" icon="screwdriver-wrench" href="/ml/tools/overview">
    സംഭാഷണത്തിനിടെ നിങ്ങളുടെ ഏജന്റിനെ നിങ്ങളുടെ API-കൾ വിളിക്കാൻ അനുവദിക്കുക.
  </Card>
  <Card title="ഔട്ട്ബൗണ്ട് കോളുകൾ നടത്തുക" icon="arrow-up-right" href="/api-reference/outbound-calls">
    നിങ്ങളുടെ സ്വന്തം കോഡിൽ നിന്ന് കോളുകൾ ട്രിഗർ ചെയ്യുക.
  </Card>
  <Card title="വെബ്ഹുക്കുകൾ കൈകാര്യം ചെയ്യുക" icon="bolt" href="/ml/webhooks/overview">
    തത്സമയം കോൾ ഇവന്റുകളോട് പ്രതികരിക്കുക.
  </Card>
  <Card title="പൂർണ്ണ API റഫറൻസ്" icon="book" href="/api-reference/introduction">
    എല്ലാ പബ്ലിക് എൻഡ്പോയിന്റുകളുടെയും ഡോക്യുമെന്റേഷൻ.
  </Card>
</CardGroup>
