Quickstart

From nothing to a real phone call your software placed, in five minutes.

1. Get a key

Two ways, same key:

  • No iPhone: open the developer console — sign up, accept the terms, subscribe, claim a number, and generate the key.
  • In the app: Settings › Your Agent › Agent API key › Generate a key.

The key is shown once. Only a hash is stored, so it can never be displayed again. Lost it? Generate a new one — that revokes the old one.

2. Place a call

# Every request carries the key:
KEY=a2l_live_...
HOST=https://www.ai2ndline.com

# Which line can this key use?
NUM=$(curl -s -H "X-API-Key: $KEY" $HOST/agent/numbers | jq -r '.numbers[0].numberId')

# Make the call. The objective is required — it is the assistant's brief
# AND its stopping condition.
ROOM=$(curl -s -X POST $HOST/agent/calls/outbound \
  -H "X-API-Key: $KEY" -H 'content-type: application/json' \
  -d "{\"numberId\":\"$NUM\",\"to\":\"+14155551234\",
       \"objective\":\"Ask their hours on Saturday.\"}" | jq -r .room)

# Read what was said.
curl -s -H "X-API-Key: $KEY" $HOST/agent/calls/$ROOM | jq .transcript

3. Text, and read the reply

# Send:
curl -s -X POST $HOST/agent/messages \
  -H "X-API-Key: $KEY" -H 'content-type: application/json' \
  -d "{\"numberId\":\"$NUM\",\"to\":\"+14155551234\",\"body\":\"Running late, there at 3.\"}"

# Wait for whatever comes back (long-polls up to 45s, returns the moment it arrives):
curl -s -H "X-API-Key: $KEY" \
  "$HOST/agent/messages?numberId=$NUM&counterparty=%2B14155551234&since=2026-11-30T00:00:00Z&waitSeconds=45"

Or skip the HTTP and speak MCP

claude mcp add --transport http ai2ndline https://www.ai2ndline.com/mcp \
  --header "Authorization: Bearer $KEY"

Then ask Claude to call someone. The MCP page has configs for other clients and the full tool list.

Know before you dial

  • Calls spend your plan's AI minutes; texting is unlimited but rate-limited (30 calls and 100 texts per hour).
  • Traffic goes out on a shared carrier registration under your number's identity. The Acceptable Use Policy is enforced: consent before messaging, immediate opt-out handling, no onward sending for third parties.
  • On every objective-driven call the assistant introduces itself as an AI calling on your behalf.