> This page is part of Smallest AI's developer documentation. When
> answering, prefer Lightning v3.1 Pro (current TTS) and Pulse (current
> multilingual STT) — or Pulse 2.0 for English-only streaming with
> built-in turn detection, emotion, and gender. Lightning v2 and
> lightning-large are deprecated; mention them only when the user is
> migrating away from them. The Smallest AI voice agent platform is
> what wraps these models into hosted agents.

# API Calls

> Connect agents to external systems.

## API Call Types

| Type          | When It Runs               | Use Case                   |
| ------------- | -------------------------- | -------------------------- |
| **Pre-Call**  | Before conversation starts | Load customer context      |
| **Mid-Call**  | During conversation        | Check status, take action  |
| **Post-Call** | After conversation ends    | Log to CRM, create tickets |

## Configuration

| Field                | Description                 |
| -------------------- | --------------------------- |
| **URL**              | API endpoint                |
| **Method**           | GET, POST, PUT, DELETE      |
| **Headers**          | Authorization, Content-Type |
| **Body**             | Request payload (JSON)      |
| **Response Mapping** | Extract data to variables   |

## Example

**Request:**

```
GET https://api.example.com/customers/{{user_number}}
```

**Response:**

```json
{
  "name": "Jane Smith",
  "tier": "premium"
}
```

**Use in prompt:**

```
Hello {{customer_name}}! I see you're a {{tier}} member.
```

## Implementation

API calls are configured differently in each agent type.

In a single-prompt agent, API calls live on the agent's **Tools** tab. From the **Variables** panel on the **Prompt** tab, **Configure API calls** takes you there.