Voice Agent Quickstart

Create an agent and place a test call fast

Agents is in beta. Shapes on /v1/agents/* may change before general availability.

The shortest path to hearing a working agent. Create one, start a conversation, and talk to it.

1

Get your API key

  1. Sign up at platform.speechify.ai
  2. Copy an API key from API Keys
$export SPEECHIFY_API_KEY="your-api-key-here"
2

Create an agent

POST
/v1/agents
1curl -X POST https://api.speechify.ai/v1/agents \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "name": "Example name",
6 "prompt": "example",
7 "first_message": "example",
8 "tts": {
9 "voice_id": "voice_01jqr8x9zg5k2m3n4p5q6r7s8t",
10 "speed": 0.5
11 },
12 "slug": "example",
13 "language": "en-US",
14 "llm": {
15 "provider": "openai",
16 "model": "gpt-4o",
17 "base_url": "example",
18 "credential_id": "cred_01jqr8x9zg5k2m3n4p5q6r7s8t",
19 "extra_body": {},
20 "temperature": 0
21 },
22 "stt": {
23 "override": "whisper-v3"
24 },
25 "turn_handling": {
26 "response_delay_seconds": 0,
27 "inactivity_timeout_seconds": 30
28 },
29 "memory": {
30 "enabled": true,
31 "retention_days": 0
32 },
33 "navigator": {
34 "enabled": true,
35 "ivr_cache_enabled": true
36 },
37 "background_noise": {
38 "preset": "office",
39 "volume": 0
40 },
41 "widget_config": {
42 "version": 1,
43 "style": "pill",
44 "theme": "dark",
45 "avatar": {
46 "type": "orb",
47 "image_url": "example",
48 "orb_color_1": "example",
49 "orb_color_2": "example"
50 },
51 "text": {
52 "start_call": "example",
53 "end_call": "example",
54 "listening": "example",
55 "thinking": "example",
56 "speaking": "example"
57 },
58 "terms": {
59 "enabled": true,
60 "content": "example"
61 },
62 "transcript": {
63 "enabled": true
64 }
65 },
66 "is_public": true,
67 "allowed_origins": [
68 "example"
69 ],
70 "hostname_allowlist": [
71 "example"
72 ],
73 "webhook_url": "https://example.com/webhook",
74 "webhook_secret": "whsec_01jqr8x9zg5k2m3n4p5q6r7s8t",
75 "amd": {
76 "enabled": true,
77 "on_voicemail": {
78 "action": "hangup",
79 "message": "example"
80 },
81 "on_ivr": {
82 "action": "proceed"
83 },
84 "on_unavailable": {
85 "action": "hangup"
86 },
87 "tuning": {
88 "human_speech_threshold_seconds": 0.5,
89 "no_speech_threshold_seconds": 1,
90 "timeout_seconds": 5,
91 "classification_prompt": "example"
92 }
93 },
94 "save_audio_recording": true
95}'

Keep the agent id from the response.

3

Start a conversation

The response carries the realtime url and a short-lived token the caller connects with.

4

Test it from the console

The quickest path without writing any integration: open the agent in the console, click Test Call, and talk.

Prefer to hear it on a web page? Drop in the widget - see Voice Agent API for the snippet.

Next steps