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 "turn_handling": {
30 "response_delay_seconds": 0,
31 "interruption_sensitivity": "medium",
32 "inactivity_timeout_seconds": 30
33 },
34 "memory": {
35 "enabled": true,
36 "retention_days": 0
37 },
38 "navigator": {
39 "enabled": true,
40 "ivr_cache_enabled": true
41 },
42 "guardrails": {
43 "observer_enabled": false
44 },
45 "background_noise": {
46 "preset": "office",
47 "volume": 0
48 },
49 "widget_config": {
50 "version": 1,
51 "style": "pill",
52 "theme": "dark",
53 "avatar": {
54 "type": "orb",
55 "image_url": "example",
56 "orb_color_1": "example",
57 "orb_color_2": "example"
58 },
59 "text": {
60 "start_call": "example",
61 "end_call": "example",
62 "listening": "example",
63 "thinking": "example",
64 "speaking": "example"
65 },
66 "terms": {
67 "enabled": true,
68 "content": "example"
69 },
70 "transcript": {
71 "enabled": true
72 }
73 },
74 "is_public": true,
75 "allowed_origins": [
76 "example"
77 ],
78 "hostname_allowlist": [
79 "example"
80 ],
81 "webhook_url": "https://example.com/webhook",
82 "webhook_secret": "whsec_demo••••0000",
83 "amd": {
84 "enabled": true,
85 "on_voicemail": {
86 "action": "hangup",
87 "message": "example"
88 },
89 "on_ivr": {
90 "action": "proceed"
91 },
92 "on_unavailable": {
93 "action": "hangup"
94 },
95 "tuning": {
96 "human_speech_threshold_seconds": 0.5,
97 "no_speech_threshold_seconds": 1,
98 "timeout_seconds": 5,
99 "classification_prompt": "example"
100 }
101 },
102 "save_audio_recording": true
103}'

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