Agents
Create Agent
Agents
Create Agent
POST
/
agents
curl --request POST \
--url https://api.voiceos.io/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"initial_message": "<string>",
"prompt": "<string>",
"voice": {
"provider": "playht",
"credential_id": "<string>",
"model": "susan",
"speed": 1,
"temperature": 1,
"text_guidance": 1.5,
"style_guidance": 15.5
},
"language_model": {
"provider": "openai",
"credential_id": "<string>",
"model": "gpt-3.5-turbo",
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {
"type": "object",
"properties": {},
"required": [
"<string>"
]
}
}
}
],
"temperature": 0,
"max_tokens": 300
},
"transcriber": {
"provider": "deepgram",
"credential_id": "<string>",
"model": "nova-2",
"language": "en",
"keywords": []
},
"max_duration_seconds": 600,
"webhooks": [
{
"events": [
"phone_call:connection_requested"
],
"filter": "<string>",
"url": "<string>",
"method": "GET",
"headers": {}
}
],
"hooks": [
{
"events": [
"phone_call:connection_requested"
],
"filter": "<string>",
"instructions": [
{
"instruction": "hang_up"
}
]
}
],
"metadata": {}
}'
{
"initial_message": "<string>",
"prompt": "<string>",
"voice": {
"provider": "playht",
"credential_id": "<string>",
"model": "susan",
"speed": 1,
"temperature": 1,
"text_guidance": 1.5,
"style_guidance": 15.5
},
"language_model": {
"provider": "openai",
"credential_id": "<string>",
"model": "gpt-3.5-turbo",
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {
"type": "object",
"properties": {},
"required": [
"<string>"
]
}
}
}
],
"temperature": 0,
"max_tokens": 300
},
"transcriber": {
"provider": "deepgram",
"credential_id": "<string>",
"model": "nova-2",
"language": "en",
"keywords": []
},
"max_duration_seconds": 600,
"webhooks": [
{
"events": [
"phone_call:connection_requested"
],
"filter": "<string>",
"url": "<string>",
"method": "GET",
"headers": {}
}
],
"hooks": [
{
"events": [
"phone_call:connection_requested"
],
"filter": "<string>",
"instructions": [
{
"instruction": "hang_up"
}
]
}
],
"metadata": {},
"uri": "<string>",
"account_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"id": "<string>"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
application/json
Successful Response
The response is of type object
.
curl --request POST \
--url https://api.voiceos.io/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"initial_message": "<string>",
"prompt": "<string>",
"voice": {
"provider": "playht",
"credential_id": "<string>",
"model": "susan",
"speed": 1,
"temperature": 1,
"text_guidance": 1.5,
"style_guidance": 15.5
},
"language_model": {
"provider": "openai",
"credential_id": "<string>",
"model": "gpt-3.5-turbo",
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {
"type": "object",
"properties": {},
"required": [
"<string>"
]
}
}
}
],
"temperature": 0,
"max_tokens": 300
},
"transcriber": {
"provider": "deepgram",
"credential_id": "<string>",
"model": "nova-2",
"language": "en",
"keywords": []
},
"max_duration_seconds": 600,
"webhooks": [
{
"events": [
"phone_call:connection_requested"
],
"filter": "<string>",
"url": "<string>",
"method": "GET",
"headers": {}
}
],
"hooks": [
{
"events": [
"phone_call:connection_requested"
],
"filter": "<string>",
"instructions": [
{
"instruction": "hang_up"
}
]
}
],
"metadata": {}
}'
{
"initial_message": "<string>",
"prompt": "<string>",
"voice": {
"provider": "playht",
"credential_id": "<string>",
"model": "susan",
"speed": 1,
"temperature": 1,
"text_guidance": 1.5,
"style_guidance": 15.5
},
"language_model": {
"provider": "openai",
"credential_id": "<string>",
"model": "gpt-3.5-turbo",
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {
"type": "object",
"properties": {},
"required": [
"<string>"
]
}
}
}
],
"temperature": 0,
"max_tokens": 300
},
"transcriber": {
"provider": "deepgram",
"credential_id": "<string>",
"model": "nova-2",
"language": "en",
"keywords": []
},
"max_duration_seconds": 600,
"webhooks": [
{
"events": [
"phone_call:connection_requested"
],
"filter": "<string>",
"url": "<string>",
"method": "GET",
"headers": {}
}
],
"hooks": [
{
"events": [
"phone_call:connection_requested"
],
"filter": "<string>",
"instructions": [
{
"instruction": "hang_up"
}
]
}
],
"metadata": {},
"uri": "<string>",
"account_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"id": "<string>"
}