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 "additional_languages": [
15 {
16 "language": "es",
17 "voice_id": "sofia",
18 "first_message": "¡Hola! ¿En qué puedo ayudarte?"
19 }
20 ],
21 "llm": {
22 "provider": "openai",
23 "model": "gpt-4.1",
24 "base_url": "example",
25 "credential_id": "cred_01jqr8x9zg5k2m3n4p5q6r7s8t",
26 "extra_body": {},
27 "temperature": 0
28 },
29 "stt": {
30 "override": "whisper-v3"
31 },
32 "turn_handling": {
33 "response_delay_seconds": 0,
34 "inactivity_timeout_seconds": 30
35 },
36 "memory": {
37 "enabled": true,
38 "retention_days": 0
39 },
40 "navigator": {
41 "enabled": true,
42 "ivr_cache_enabled": true
43 },
44 "background_noise": {
45 "preset": "office",
46 "volume": 0
47 },
48 "widget_config": {
49 "version": 1,
50 "style": "pill",
51 "theme": "dark",
52 "avatar": {
53 "type": "orb",
54 "image_url": "example",
55 "orb_color_1": "example",
56 "orb_color_2": "example"
57 },
58 "text": {
59 "start_call": "example",
60 "end_call": "example",
61 "listening": "example",
62 "thinking": "example",
63 "speaking": "example"
64 },
65 "terms": {
66 "enabled": true,
67 "content": "example"
68 },
69 "transcript": {
70 "enabled": true
71 }
72 },
73 "is_public": true,
74 "allowed_origins": [
75 "example"
76 ],
77 "hostname_allowlist": [
78 "example"
79 ],
80 "webhook_url": "https://example.com/webhook",
81 "webhook_secret": "whsec_01jqr8x9zg5k2m3n4p5q6r7s8t",
82 "amd": {
83 "enabled": true,
84 "on_voicemail": {
85 "action": "hangup",
86 "message": "example"
87 },
88 "on_ivr": {
89 "action": "proceed"
90 },
91 "on_unavailable": {
92 "action": "hangup"
93 },
94 "tuning": {
95 "human_speech_threshold_seconds": 0.5,
96 "no_speech_threshold_seconds": 1,
97 "timeout_seconds": 5,
98 "classification_prompt": "example"
99 }
100 },
101 "save_audio_recording": true
102}'

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