Quickstart

Under 3 minutes. You need a Saperly account and one API key.

Get an API key

Sign in at saperly.com/login with a magic link, Google, or GitHub. Open Settings → API Keys and create a key. The plaintext is shown once. Copy it and save it as SAPERLY_API_KEY in your environment or secrets manager.

New accounts include a $5 signup credit. Credits never expire.

Install the SDK

$pip install saperly

Make your first API call

This snippet provisions a hosted line and prints its phone number. Hosted mode runs the AI for you, so you don’t need a webhook server.

1import os
2from saperly import SaperlyClient
3
4saperly = SaperlyClient(api_key=os.environ["SAPERLY_API_KEY"])
5
6line = saperly.lines.create(
7 name="my agent",
8 mode="hosted",
9 system_prompt="You are a helpful assistant.",
10)
11
12print(line.phone_number)

Call the number that comes back. You’ll hear the hosted AI answer.

Next steps