Agents
Create Agent
Creates a new agent using the specified name and call template
POST
/
api
/
agents
cURL
curl --request POST \
--url https://api.ultravox.ai/api/agents \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"callTemplate": {
"name": "<string>",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"medium": {
"webRtc": {
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"sideGenerationDelta": true,
"sideGenerationCompleted": true,
"threadSpawned": true,
"threadRejected": true,
"threadTerminated": true,
"invokingTool": true,
"threadState": true
}
},
"twilio": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"serverWebSocket": {
"inputSampleRate": 123,
"outputSampleRate": 123,
"clientBufferSizeMs": 123,
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"sideGenerationDelta": true,
"sideGenerationCompleted": true,
"threadSpawned": true,
"threadRejected": true,
"threadTerminated": true,
"invokingTool": true,
"threadState": true
},
"mediaIdleTimeout": "<string>"
},
"telnyx": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"plivo": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"exotel": {
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"sip": {
"incoming": {},
"outgoing": {
"to": "<string>",
"from": "<string>",
"username": "<string>",
"password": "<string>"
}
}
},
"joinTimeout": "<string>",
"maxDuration": "<string>",
"vadSettings": {
"turnEndpointDelay": "<string>",
"minimumTurnDuration": "<string>",
"minimumInterruptionDuration": "<string>",
"frameActivationThreshold": 123
},
"recordingEnabled": true,
"firstSpeakerSettings": {
"user": {
"fallback": {
"delay": "<string>",
"text": "<string>",
"prompt": "<string>"
}
},
"agent": {
"uninterruptible": true,
"text": "<string>",
"prompt": "<string>",
"delay": "<string>"
}
},
"systemPrompt": "<string>",
"temperature": 123,
"model": "<string>",
"voice": "<string>",
"externalVoice": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": true,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": true
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": [
"<string>"
],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": true
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": true,
"pronunciationDictionaryIds": [
"<string>"
]
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"voiceOverrides": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": true,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": true
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": [
"<string>"
],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": true
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": true,
"pronunciationDictionaryIds": [
"<string>"
]
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"languageHint": "<string>",
"timeExceededMessage": "<string>",
"inactivityMessages": [
{
"duration": "<string>",
"message": "<string>"
}
],
"selectedTools": [
{
"toolId": "<string>",
"toolName": "<string>",
"temporaryTool": {
"modelToolName": "<string>",
"description": "<string>",
"dynamicParameters": [
{
"name": "<string>",
"schema": {},
"required": true
}
],
"staticParameters": [
{
"name": "<string>",
"value": "<unknown>"
}
],
"automaticParameters": [
{
"name": "<string>"
}
],
"requirements": {
"httpSecurityOptions": {
"options": [
{
"requirements": {},
"ultravoxCallTokenRequirement": {
"scopes": [
"<string>"
]
}
}
]
},
"requiredParameterOverrides": [
"<string>"
]
},
"timeout": "<string>",
"precomputable": true,
"http": {
"baseUrlPattern": "<string>",
"httpMethod": "<string>"
},
"client": {},
"dataConnection": {},
"staticResponse": {
"responseText": "<string>"
}
},
"nameOverride": "<string>",
"descriptionOverride": "<string>",
"authTokens": {},
"parameterOverrides": {},
"transitionId": "<string>"
}
],
"dataConnection": {
"websocketUrl": "<string>",
"audioConfig": {
"sampleRate": 123
},
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"sideGenerationDelta": true,
"sideGenerationCompleted": true,
"threadSpawned": true,
"threadRejected": true,
"threadTerminated": true,
"invokingTool": true,
"threadState": true
},
"headers": {}
},
"contextSchema": {},
"sharedSecrets": [
"<string>"
],
"backgroundAudio": {
"audioClip": "<string>",
"volume": 123
},
"mediumRestriction": {
"allowedMediums": []
},
"additionalModels": [
"<string>"
],
"triggers": [
{
"temporaryTrigger": {
"name": "<string>",
"event": {
"dataMessage": "<string>",
"timer": "<string>"
},
"condition": {
"property": "<string>",
"propertyArguments": {},
"value": "<unknown>",
"conditions": "<array>"
},
"actions": [
{
"dataMessage": {},
"ternary": {
"condition": {
"property": "<string>",
"propertyArguments": {},
"value": "<unknown>",
"conditions": "<array>"
},
"whenTrue": "<array>",
"whenFalse": "<array>"
},
"setLocalVariable": {
"name": "<string>",
"value": "<unknown>"
},
"incrementLocalVariable": {
"name": "<string>",
"value": 123
},
"startTimer": {
"name": "<string>",
"delay": "<string>"
},
"cancelTimer": {
"name": "<string>"
}
}
],
"localVariables": {}
},
"triggerId": "<string>",
"triggerName": "<string>"
}
],
"transcriptionSettings": {
"prompts": [
"<string>"
],
"includeAgentContext": true
}
}
}
'import requests
url = "https://api.ultravox.ai/api/agents"
payload = {
"name": "<string>",
"callTemplate": {
"name": "<string>",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"medium": {
"webRtc": { "dataMessages": {
"pong": True,
"state": True,
"transcript": True,
"clientToolInvocation": True,
"dataConnectionToolInvocation": True,
"playbackClearBuffer": True,
"callStarted": True,
"debug": True,
"callEvent": True,
"toolUsed": True,
"userStartedSpeaking": True,
"userStoppedSpeaking": True,
"sideGenerationDelta": True,
"sideGenerationCompleted": True,
"threadSpawned": True,
"threadRejected": True,
"threadTerminated": True,
"invokingTool": True,
"threadState": True
} },
"twilio": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": True,
"userTextMessage": { "text": "<string>" }
}
},
"serverWebSocket": {
"inputSampleRate": 123,
"outputSampleRate": 123,
"clientBufferSizeMs": 123,
"dataMessages": {
"pong": True,
"state": True,
"transcript": True,
"clientToolInvocation": True,
"dataConnectionToolInvocation": True,
"playbackClearBuffer": True,
"callStarted": True,
"debug": True,
"callEvent": True,
"toolUsed": True,
"userStartedSpeaking": True,
"userStoppedSpeaking": True,
"sideGenerationDelta": True,
"sideGenerationCompleted": True,
"threadSpawned": True,
"threadRejected": True,
"threadTerminated": True,
"invokingTool": True,
"threadState": True
},
"mediaIdleTimeout": "<string>"
},
"telnyx": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": True,
"userTextMessage": { "text": "<string>" }
}
},
"plivo": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": True,
"userTextMessage": { "text": "<string>" }
}
},
"exotel": { "dtmfHandling": {
"ignore": True,
"userTextMessage": { "text": "<string>" }
} },
"sip": {
"incoming": {},
"outgoing": {
"to": "<string>",
"from": "<string>",
"username": "<string>",
"password": "<string>"
}
}
},
"joinTimeout": "<string>",
"maxDuration": "<string>",
"vadSettings": {
"turnEndpointDelay": "<string>",
"minimumTurnDuration": "<string>",
"minimumInterruptionDuration": "<string>",
"frameActivationThreshold": 123
},
"recordingEnabled": True,
"firstSpeakerSettings": {
"user": { "fallback": {
"delay": "<string>",
"text": "<string>",
"prompt": "<string>"
} },
"agent": {
"uninterruptible": True,
"text": "<string>",
"prompt": "<string>",
"delay": "<string>"
}
},
"systemPrompt": "<string>",
"temperature": 123,
"model": "<string>",
"voice": "<string>",
"externalVoice": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": True,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": True
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": ["<string>"],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": True
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": True,
"pronunciationDictionaryIds": ["<string>"]
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"voiceOverrides": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": True,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": True
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": ["<string>"],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": True
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": True,
"pronunciationDictionaryIds": ["<string>"]
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"languageHint": "<string>",
"timeExceededMessage": "<string>",
"inactivityMessages": [
{
"duration": "<string>",
"message": "<string>"
}
],
"selectedTools": [
{
"toolId": "<string>",
"toolName": "<string>",
"temporaryTool": {
"modelToolName": "<string>",
"description": "<string>",
"dynamicParameters": [
{
"name": "<string>",
"schema": {},
"required": True
}
],
"staticParameters": [
{
"name": "<string>",
"value": "<unknown>"
}
],
"automaticParameters": [{ "name": "<string>" }],
"requirements": {
"httpSecurityOptions": { "options": [
{
"requirements": {},
"ultravoxCallTokenRequirement": { "scopes": ["<string>"] }
}
] },
"requiredParameterOverrides": ["<string>"]
},
"timeout": "<string>",
"precomputable": True,
"http": {
"baseUrlPattern": "<string>",
"httpMethod": "<string>"
},
"client": {},
"dataConnection": {},
"staticResponse": { "responseText": "<string>" }
},
"nameOverride": "<string>",
"descriptionOverride": "<string>",
"authTokens": {},
"parameterOverrides": {},
"transitionId": "<string>"
}
],
"dataConnection": {
"websocketUrl": "<string>",
"audioConfig": { "sampleRate": 123 },
"dataMessages": {
"pong": True,
"state": True,
"transcript": True,
"clientToolInvocation": True,
"dataConnectionToolInvocation": True,
"playbackClearBuffer": True,
"callStarted": True,
"debug": True,
"callEvent": True,
"toolUsed": True,
"userStartedSpeaking": True,
"userStoppedSpeaking": True,
"sideGenerationDelta": True,
"sideGenerationCompleted": True,
"threadSpawned": True,
"threadRejected": True,
"threadTerminated": True,
"invokingTool": True,
"threadState": True
},
"headers": {}
},
"contextSchema": {},
"sharedSecrets": ["<string>"],
"backgroundAudio": {
"audioClip": "<string>",
"volume": 123
},
"mediumRestriction": { "allowedMediums": [] },
"additionalModels": ["<string>"],
"triggers": [
{
"temporaryTrigger": {
"name": "<string>",
"event": {
"dataMessage": "<string>",
"timer": "<string>"
},
"condition": {
"property": "<string>",
"propertyArguments": {},
"value": "<unknown>",
"conditions": "<array>"
},
"actions": [
{
"dataMessage": {},
"ternary": {
"condition": {
"property": "<string>",
"propertyArguments": {},
"value": "<unknown>",
"conditions": "<array>"
},
"whenTrue": "<array>",
"whenFalse": "<array>"
},
"setLocalVariable": {
"name": "<string>",
"value": "<unknown>"
},
"incrementLocalVariable": {
"name": "<string>",
"value": 123
},
"startTimer": {
"name": "<string>",
"delay": "<string>"
},
"cancelTimer": { "name": "<string>" }
}
],
"localVariables": {}
},
"triggerId": "<string>",
"triggerName": "<string>"
}
],
"transcriptionSettings": {
"prompts": ["<string>"],
"includeAgentContext": True
}
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
callTemplate: {
name: '<string>',
created: '2023-11-07T05:31:56Z',
updated: '2023-11-07T05:31:56Z',
medium: {
webRtc: {
dataMessages: {
pong: true,
state: true,
transcript: true,
clientToolInvocation: true,
dataConnectionToolInvocation: true,
playbackClearBuffer: true,
callStarted: true,
debug: true,
callEvent: true,
toolUsed: true,
userStartedSpeaking: true,
userStoppedSpeaking: true,
sideGenerationDelta: true,
sideGenerationCompleted: true,
threadSpawned: true,
threadRejected: true,
threadTerminated: true,
invokingTool: true,
threadState: true
}
},
twilio: {
outgoing: {to: '<string>', from: '<string>', additionalParams: {}},
dtmfHandling: {ignore: true, userTextMessage: {text: '<string>'}}
},
serverWebSocket: {
inputSampleRate: 123,
outputSampleRate: 123,
clientBufferSizeMs: 123,
dataMessages: {
pong: true,
state: true,
transcript: true,
clientToolInvocation: true,
dataConnectionToolInvocation: true,
playbackClearBuffer: true,
callStarted: true,
debug: true,
callEvent: true,
toolUsed: true,
userStartedSpeaking: true,
userStoppedSpeaking: true,
sideGenerationDelta: true,
sideGenerationCompleted: true,
threadSpawned: true,
threadRejected: true,
threadTerminated: true,
invokingTool: true,
threadState: true
},
mediaIdleTimeout: '<string>'
},
telnyx: {
outgoing: {to: '<string>', from: '<string>', additionalParams: {}},
dtmfHandling: {ignore: true, userTextMessage: {text: '<string>'}}
},
plivo: {
outgoing: {to: '<string>', from: '<string>', additionalParams: {}},
dtmfHandling: {ignore: true, userTextMessage: {text: '<string>'}}
},
exotel: {dtmfHandling: {ignore: true, userTextMessage: {text: '<string>'}}},
sip: {
incoming: {},
outgoing: {to: '<string>', from: '<string>', username: '<string>', password: '<string>'}
}
},
joinTimeout: '<string>',
maxDuration: '<string>',
vadSettings: {
turnEndpointDelay: '<string>',
minimumTurnDuration: '<string>',
minimumInterruptionDuration: '<string>',
frameActivationThreshold: 123
},
recordingEnabled: true,
firstSpeakerSettings: {
user: {fallback: {delay: '<string>', text: '<string>', prompt: '<string>'}},
agent: {uninterruptible: true, text: '<string>', prompt: '<string>', delay: '<string>'}
},
systemPrompt: '<string>',
temperature: 123,
model: '<string>',
voice: '<string>',
externalVoice: {
elevenLabs: {
voiceId: '<string>',
model: '<string>',
speed: 123,
useSpeakerBoost: true,
style: 123,
similarityBoost: 123,
stability: 123,
pronunciationDictionaries: [{dictionaryId: '<string>', versionId: '<string>'}],
optimizeStreamingLatency: 123,
maxSampleRate: 123,
enableSsmlParsing: true
},
cartesia: {
voiceId: '<string>',
model: '<string>',
speed: 123,
emotion: '<string>',
emotions: ['<string>'],
generationConfig: {volume: 123, speed: 123, emotion: '<string>', pronunciationDictId: '<string>'}
},
lmnt: {voiceId: '<string>', model: '<string>', speed: 123, conversational: true},
google: {voiceId: '<string>', speakingRate: 123},
inworld: {
voiceId: '<string>',
modelId: '<string>',
speakingRate: 123,
temperature: 123,
applyTextNormalization: true,
pronunciationDictionaryIds: ['<string>']
},
respeecher: {
voiceId: '<string>',
model: '<string>',
seed: 123,
temperature: 123,
topK: 123,
topP: 123,
minP: 123,
presencePenalty: 123,
repetitionPenalty: 123,
frequencyPenalty: 123
},
generic: {
url: '<string>',
headers: {},
body: JSON.stringify({}),
responseSampleRate: 123,
responseWordsPerMinute: 123,
responseMimeType: '<string>',
jsonAudioFieldPath: '<string>'
}
},
voiceOverrides: {
elevenLabs: {
voiceId: '<string>',
model: '<string>',
speed: 123,
useSpeakerBoost: true,
style: 123,
similarityBoost: 123,
stability: 123,
pronunciationDictionaries: [{dictionaryId: '<string>', versionId: '<string>'}],
optimizeStreamingLatency: 123,
maxSampleRate: 123,
enableSsmlParsing: true
},
cartesia: {
voiceId: '<string>',
model: '<string>',
speed: 123,
emotion: '<string>',
emotions: ['<string>'],
generationConfig: {volume: 123, speed: 123, emotion: '<string>', pronunciationDictId: '<string>'}
},
lmnt: {voiceId: '<string>', model: '<string>', speed: 123, conversational: true},
google: {voiceId: '<string>', speakingRate: 123},
inworld: {
voiceId: '<string>',
modelId: '<string>',
speakingRate: 123,
temperature: 123,
applyTextNormalization: true,
pronunciationDictionaryIds: ['<string>']
},
respeecher: {
voiceId: '<string>',
model: '<string>',
seed: 123,
temperature: 123,
topK: 123,
topP: 123,
minP: 123,
presencePenalty: 123,
repetitionPenalty: 123,
frequencyPenalty: 123
},
generic: {
url: '<string>',
headers: {},
body: JSON.stringify({}),
responseSampleRate: 123,
responseWordsPerMinute: 123,
responseMimeType: '<string>',
jsonAudioFieldPath: '<string>'
}
},
languageHint: '<string>',
timeExceededMessage: '<string>',
inactivityMessages: [{duration: '<string>', message: '<string>'}],
selectedTools: [
{
toolId: '<string>',
toolName: '<string>',
temporaryTool: {
modelToolName: '<string>',
description: '<string>',
dynamicParameters: [{name: '<string>', schema: {}, required: true}],
staticParameters: [{name: '<string>', value: '<unknown>'}],
automaticParameters: [{name: '<string>'}],
requirements: {
httpSecurityOptions: {
options: [{requirements: {}, ultravoxCallTokenRequirement: {scopes: ['<string>']}}]
},
requiredParameterOverrides: ['<string>']
},
timeout: '<string>',
precomputable: true,
http: {baseUrlPattern: '<string>', httpMethod: '<string>'},
client: {},
dataConnection: {},
staticResponse: {responseText: '<string>'}
},
nameOverride: '<string>',
descriptionOverride: '<string>',
authTokens: {},
parameterOverrides: {},
transitionId: '<string>'
}
],
dataConnection: {
websocketUrl: '<string>',
audioConfig: {sampleRate: 123},
dataMessages: {
pong: true,
state: true,
transcript: true,
clientToolInvocation: true,
dataConnectionToolInvocation: true,
playbackClearBuffer: true,
callStarted: true,
debug: true,
callEvent: true,
toolUsed: true,
userStartedSpeaking: true,
userStoppedSpeaking: true,
sideGenerationDelta: true,
sideGenerationCompleted: true,
threadSpawned: true,
threadRejected: true,
threadTerminated: true,
invokingTool: true,
threadState: true
},
headers: {}
},
contextSchema: {},
sharedSecrets: ['<string>'],
backgroundAudio: {audioClip: '<string>', volume: 123},
mediumRestriction: {allowedMediums: []},
additionalModels: ['<string>'],
triggers: [
{
temporaryTrigger: {
name: '<string>',
event: {dataMessage: '<string>', timer: '<string>'},
condition: {
property: '<string>',
propertyArguments: {},
value: '<unknown>',
conditions: '<array>'
},
actions: [
{
dataMessage: {},
ternary: {
condition: {
property: '<string>',
propertyArguments: {},
value: '<unknown>',
conditions: '<array>'
},
whenTrue: '<array>',
whenFalse: '<array>'
},
setLocalVariable: {name: '<string>', value: '<unknown>'},
incrementLocalVariable: {name: '<string>', value: 123},
startTimer: {name: '<string>', delay: '<string>'},
cancelTimer: {name: '<string>'}
}
],
localVariables: {}
},
triggerId: '<string>',
triggerName: '<string>'
}
],
transcriptionSettings: {prompts: ['<string>'], includeAgentContext: true}
}
})
};
fetch('https://api.ultravox.ai/api/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ultravox.ai/api/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'callTemplate' => [
'name' => '<string>',
'created' => '2023-11-07T05:31:56Z',
'updated' => '2023-11-07T05:31:56Z',
'medium' => [
'webRtc' => [
'dataMessages' => [
'pong' => true,
'state' => true,
'transcript' => true,
'clientToolInvocation' => true,
'dataConnectionToolInvocation' => true,
'playbackClearBuffer' => true,
'callStarted' => true,
'debug' => true,
'callEvent' => true,
'toolUsed' => true,
'userStartedSpeaking' => true,
'userStoppedSpeaking' => true,
'sideGenerationDelta' => true,
'sideGenerationCompleted' => true,
'threadSpawned' => true,
'threadRejected' => true,
'threadTerminated' => true,
'invokingTool' => true,
'threadState' => true
]
],
'twilio' => [
'outgoing' => [
'to' => '<string>',
'from' => '<string>',
'additionalParams' => [
]
],
'dtmfHandling' => [
'ignore' => true,
'userTextMessage' => [
'text' => '<string>'
]
]
],
'serverWebSocket' => [
'inputSampleRate' => 123,
'outputSampleRate' => 123,
'clientBufferSizeMs' => 123,
'dataMessages' => [
'pong' => true,
'state' => true,
'transcript' => true,
'clientToolInvocation' => true,
'dataConnectionToolInvocation' => true,
'playbackClearBuffer' => true,
'callStarted' => true,
'debug' => true,
'callEvent' => true,
'toolUsed' => true,
'userStartedSpeaking' => true,
'userStoppedSpeaking' => true,
'sideGenerationDelta' => true,
'sideGenerationCompleted' => true,
'threadSpawned' => true,
'threadRejected' => true,
'threadTerminated' => true,
'invokingTool' => true,
'threadState' => true
],
'mediaIdleTimeout' => '<string>'
],
'telnyx' => [
'outgoing' => [
'to' => '<string>',
'from' => '<string>',
'additionalParams' => [
]
],
'dtmfHandling' => [
'ignore' => true,
'userTextMessage' => [
'text' => '<string>'
]
]
],
'plivo' => [
'outgoing' => [
'to' => '<string>',
'from' => '<string>',
'additionalParams' => [
]
],
'dtmfHandling' => [
'ignore' => true,
'userTextMessage' => [
'text' => '<string>'
]
]
],
'exotel' => [
'dtmfHandling' => [
'ignore' => true,
'userTextMessage' => [
'text' => '<string>'
]
]
],
'sip' => [
'incoming' => [
],
'outgoing' => [
'to' => '<string>',
'from' => '<string>',
'username' => '<string>',
'password' => '<string>'
]
]
],
'joinTimeout' => '<string>',
'maxDuration' => '<string>',
'vadSettings' => [
'turnEndpointDelay' => '<string>',
'minimumTurnDuration' => '<string>',
'minimumInterruptionDuration' => '<string>',
'frameActivationThreshold' => 123
],
'recordingEnabled' => true,
'firstSpeakerSettings' => [
'user' => [
'fallback' => [
'delay' => '<string>',
'text' => '<string>',
'prompt' => '<string>'
]
],
'agent' => [
'uninterruptible' => true,
'text' => '<string>',
'prompt' => '<string>',
'delay' => '<string>'
]
],
'systemPrompt' => '<string>',
'temperature' => 123,
'model' => '<string>',
'voice' => '<string>',
'externalVoice' => [
'elevenLabs' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'useSpeakerBoost' => true,
'style' => 123,
'similarityBoost' => 123,
'stability' => 123,
'pronunciationDictionaries' => [
[
'dictionaryId' => '<string>',
'versionId' => '<string>'
]
],
'optimizeStreamingLatency' => 123,
'maxSampleRate' => 123,
'enableSsmlParsing' => true
],
'cartesia' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'emotion' => '<string>',
'emotions' => [
'<string>'
],
'generationConfig' => [
'volume' => 123,
'speed' => 123,
'emotion' => '<string>',
'pronunciationDictId' => '<string>'
]
],
'lmnt' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'conversational' => true
],
'google' => [
'voiceId' => '<string>',
'speakingRate' => 123
],
'inworld' => [
'voiceId' => '<string>',
'modelId' => '<string>',
'speakingRate' => 123,
'temperature' => 123,
'applyTextNormalization' => true,
'pronunciationDictionaryIds' => [
'<string>'
]
],
'respeecher' => [
'voiceId' => '<string>',
'model' => '<string>',
'seed' => 123,
'temperature' => 123,
'topK' => 123,
'topP' => 123,
'minP' => 123,
'presencePenalty' => 123,
'repetitionPenalty' => 123,
'frequencyPenalty' => 123
],
'generic' => [
'url' => '<string>',
'headers' => [
],
'body' => [
],
'responseSampleRate' => 123,
'responseWordsPerMinute' => 123,
'responseMimeType' => '<string>',
'jsonAudioFieldPath' => '<string>'
]
],
'voiceOverrides' => [
'elevenLabs' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'useSpeakerBoost' => true,
'style' => 123,
'similarityBoost' => 123,
'stability' => 123,
'pronunciationDictionaries' => [
[
'dictionaryId' => '<string>',
'versionId' => '<string>'
]
],
'optimizeStreamingLatency' => 123,
'maxSampleRate' => 123,
'enableSsmlParsing' => true
],
'cartesia' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'emotion' => '<string>',
'emotions' => [
'<string>'
],
'generationConfig' => [
'volume' => 123,
'speed' => 123,
'emotion' => '<string>',
'pronunciationDictId' => '<string>'
]
],
'lmnt' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'conversational' => true
],
'google' => [
'voiceId' => '<string>',
'speakingRate' => 123
],
'inworld' => [
'voiceId' => '<string>',
'modelId' => '<string>',
'speakingRate' => 123,
'temperature' => 123,
'applyTextNormalization' => true,
'pronunciationDictionaryIds' => [
'<string>'
]
],
'respeecher' => [
'voiceId' => '<string>',
'model' => '<string>',
'seed' => 123,
'temperature' => 123,
'topK' => 123,
'topP' => 123,
'minP' => 123,
'presencePenalty' => 123,
'repetitionPenalty' => 123,
'frequencyPenalty' => 123
],
'generic' => [
'url' => '<string>',
'headers' => [
],
'body' => [
],
'responseSampleRate' => 123,
'responseWordsPerMinute' => 123,
'responseMimeType' => '<string>',
'jsonAudioFieldPath' => '<string>'
]
],
'languageHint' => '<string>',
'timeExceededMessage' => '<string>',
'inactivityMessages' => [
[
'duration' => '<string>',
'message' => '<string>'
]
],
'selectedTools' => [
[
'toolId' => '<string>',
'toolName' => '<string>',
'temporaryTool' => [
'modelToolName' => '<string>',
'description' => '<string>',
'dynamicParameters' => [
[
'name' => '<string>',
'schema' => [
],
'required' => true
]
],
'staticParameters' => [
[
'name' => '<string>',
'value' => '<unknown>'
]
],
'automaticParameters' => [
[
'name' => '<string>'
]
],
'requirements' => [
'httpSecurityOptions' => [
'options' => [
[
'requirements' => [
],
'ultravoxCallTokenRequirement' => [
'scopes' => [
'<string>'
]
]
]
]
],
'requiredParameterOverrides' => [
'<string>'
]
],
'timeout' => '<string>',
'precomputable' => true,
'http' => [
'baseUrlPattern' => '<string>',
'httpMethod' => '<string>'
],
'client' => [
],
'dataConnection' => [
],
'staticResponse' => [
'responseText' => '<string>'
]
],
'nameOverride' => '<string>',
'descriptionOverride' => '<string>',
'authTokens' => [
],
'parameterOverrides' => [
],
'transitionId' => '<string>'
]
],
'dataConnection' => [
'websocketUrl' => '<string>',
'audioConfig' => [
'sampleRate' => 123
],
'dataMessages' => [
'pong' => true,
'state' => true,
'transcript' => true,
'clientToolInvocation' => true,
'dataConnectionToolInvocation' => true,
'playbackClearBuffer' => true,
'callStarted' => true,
'debug' => true,
'callEvent' => true,
'toolUsed' => true,
'userStartedSpeaking' => true,
'userStoppedSpeaking' => true,
'sideGenerationDelta' => true,
'sideGenerationCompleted' => true,
'threadSpawned' => true,
'threadRejected' => true,
'threadTerminated' => true,
'invokingTool' => true,
'threadState' => true
],
'headers' => [
]
],
'contextSchema' => [
],
'sharedSecrets' => [
'<string>'
],
'backgroundAudio' => [
'audioClip' => '<string>',
'volume' => 123
],
'mediumRestriction' => [
'allowedMediums' => [
]
],
'additionalModels' => [
'<string>'
],
'triggers' => [
[
'temporaryTrigger' => [
'name' => '<string>',
'event' => [
'dataMessage' => '<string>',
'timer' => '<string>'
],
'condition' => [
'property' => '<string>',
'propertyArguments' => [
],
'value' => '<unknown>',
'conditions' => '<array>'
],
'actions' => [
[
'dataMessage' => [
],
'ternary' => [
'condition' => [
'property' => '<string>',
'propertyArguments' => [
],
'value' => '<unknown>',
'conditions' => '<array>'
],
'whenTrue' => '<array>',
'whenFalse' => '<array>'
],
'setLocalVariable' => [
'name' => '<string>',
'value' => '<unknown>'
],
'incrementLocalVariable' => [
'name' => '<string>',
'value' => 123
],
'startTimer' => [
'name' => '<string>',
'delay' => '<string>'
],
'cancelTimer' => [
'name' => '<string>'
]
]
],
'localVariables' => [
]
],
'triggerId' => '<string>',
'triggerName' => '<string>'
]
],
'transcriptionSettings' => [
'prompts' => [
'<string>'
],
'includeAgentContext' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ultravox.ai/api/agents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"callTemplate\": {\n \"name\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\",\n \"updated\": \"2023-11-07T05:31:56Z\",\n \"medium\": {\n \"webRtc\": {\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n }\n },\n \"twilio\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"serverWebSocket\": {\n \"inputSampleRate\": 123,\n \"outputSampleRate\": 123,\n \"clientBufferSizeMs\": 123,\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n },\n \"mediaIdleTimeout\": \"<string>\"\n },\n \"telnyx\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"plivo\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"exotel\": {\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"sip\": {\n \"incoming\": {},\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n }\n }\n },\n \"joinTimeout\": \"<string>\",\n \"maxDuration\": \"<string>\",\n \"vadSettings\": {\n \"turnEndpointDelay\": \"<string>\",\n \"minimumTurnDuration\": \"<string>\",\n \"minimumInterruptionDuration\": \"<string>\",\n \"frameActivationThreshold\": 123\n },\n \"recordingEnabled\": true,\n \"firstSpeakerSettings\": {\n \"user\": {\n \"fallback\": {\n \"delay\": \"<string>\",\n \"text\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n },\n \"agent\": {\n \"uninterruptible\": true,\n \"text\": \"<string>\",\n \"prompt\": \"<string>\",\n \"delay\": \"<string>\"\n }\n },\n \"systemPrompt\": \"<string>\",\n \"temperature\": 123,\n \"model\": \"<string>\",\n \"voice\": \"<string>\",\n \"externalVoice\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true,\n \"pronunciationDictionaryIds\": [\n \"<string>\"\n ]\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"voiceOverrides\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true,\n \"pronunciationDictionaryIds\": [\n \"<string>\"\n ]\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"languageHint\": \"<string>\",\n \"timeExceededMessage\": \"<string>\",\n \"inactivityMessages\": [\n {\n \"duration\": \"<string>\",\n \"message\": \"<string>\"\n }\n ],\n \"selectedTools\": [\n {\n \"toolId\": \"<string>\",\n \"toolName\": \"<string>\",\n \"temporaryTool\": {\n \"modelToolName\": \"<string>\",\n \"description\": \"<string>\",\n \"dynamicParameters\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"required\": true\n }\n ],\n \"staticParameters\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automaticParameters\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"requirements\": {\n \"httpSecurityOptions\": {\n \"options\": [\n {\n \"requirements\": {},\n \"ultravoxCallTokenRequirement\": {\n \"scopes\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"requiredParameterOverrides\": [\n \"<string>\"\n ]\n },\n \"timeout\": \"<string>\",\n \"precomputable\": true,\n \"http\": {\n \"baseUrlPattern\": \"<string>\",\n \"httpMethod\": \"<string>\"\n },\n \"client\": {},\n \"dataConnection\": {},\n \"staticResponse\": {\n \"responseText\": \"<string>\"\n }\n },\n \"nameOverride\": \"<string>\",\n \"descriptionOverride\": \"<string>\",\n \"authTokens\": {},\n \"parameterOverrides\": {},\n \"transitionId\": \"<string>\"\n }\n ],\n \"dataConnection\": {\n \"websocketUrl\": \"<string>\",\n \"audioConfig\": {\n \"sampleRate\": 123\n },\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n },\n \"headers\": {}\n },\n \"contextSchema\": {},\n \"sharedSecrets\": [\n \"<string>\"\n ],\n \"backgroundAudio\": {\n \"audioClip\": \"<string>\",\n \"volume\": 123\n },\n \"mediumRestriction\": {\n \"allowedMediums\": []\n },\n \"additionalModels\": [\n \"<string>\"\n ],\n \"triggers\": [\n {\n \"temporaryTrigger\": {\n \"name\": \"<string>\",\n \"event\": {\n \"dataMessage\": \"<string>\",\n \"timer\": \"<string>\"\n },\n \"condition\": {\n \"property\": \"<string>\",\n \"propertyArguments\": {},\n \"value\": \"<unknown>\",\n \"conditions\": \"<array>\"\n },\n \"actions\": [\n {\n \"dataMessage\": {},\n \"ternary\": {\n \"condition\": {\n \"property\": \"<string>\",\n \"propertyArguments\": {},\n \"value\": \"<unknown>\",\n \"conditions\": \"<array>\"\n },\n \"whenTrue\": \"<array>\",\n \"whenFalse\": \"<array>\"\n },\n \"setLocalVariable\": {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n },\n \"incrementLocalVariable\": {\n \"name\": \"<string>\",\n \"value\": 123\n },\n \"startTimer\": {\n \"name\": \"<string>\",\n \"delay\": \"<string>\"\n },\n \"cancelTimer\": {\n \"name\": \"<string>\"\n }\n }\n ],\n \"localVariables\": {}\n },\n \"triggerId\": \"<string>\",\n \"triggerName\": \"<string>\"\n }\n ],\n \"transcriptionSettings\": {\n \"prompts\": [\n \"<string>\"\n ],\n \"includeAgentContext\": true\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ultravox.ai/api/agents")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"callTemplate\": {\n \"name\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\",\n \"updated\": \"2023-11-07T05:31:56Z\",\n \"medium\": {\n \"webRtc\": {\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n }\n },\n \"twilio\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"serverWebSocket\": {\n \"inputSampleRate\": 123,\n \"outputSampleRate\": 123,\n \"clientBufferSizeMs\": 123,\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n },\n \"mediaIdleTimeout\": \"<string>\"\n },\n \"telnyx\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"plivo\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"exotel\": {\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"sip\": {\n \"incoming\": {},\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n }\n }\n },\n \"joinTimeout\": \"<string>\",\n \"maxDuration\": \"<string>\",\n \"vadSettings\": {\n \"turnEndpointDelay\": \"<string>\",\n \"minimumTurnDuration\": \"<string>\",\n \"minimumInterruptionDuration\": \"<string>\",\n \"frameActivationThreshold\": 123\n },\n \"recordingEnabled\": true,\n \"firstSpeakerSettings\": {\n \"user\": {\n \"fallback\": {\n \"delay\": \"<string>\",\n \"text\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n },\n \"agent\": {\n \"uninterruptible\": true,\n \"text\": \"<string>\",\n \"prompt\": \"<string>\",\n \"delay\": \"<string>\"\n }\n },\n \"systemPrompt\": \"<string>\",\n \"temperature\": 123,\n \"model\": \"<string>\",\n \"voice\": \"<string>\",\n \"externalVoice\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true,\n \"pronunciationDictionaryIds\": [\n \"<string>\"\n ]\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"voiceOverrides\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true,\n \"pronunciationDictionaryIds\": [\n \"<string>\"\n ]\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"languageHint\": \"<string>\",\n \"timeExceededMessage\": \"<string>\",\n \"inactivityMessages\": [\n {\n \"duration\": \"<string>\",\n \"message\": \"<string>\"\n }\n ],\n \"selectedTools\": [\n {\n \"toolId\": \"<string>\",\n \"toolName\": \"<string>\",\n \"temporaryTool\": {\n \"modelToolName\": \"<string>\",\n \"description\": \"<string>\",\n \"dynamicParameters\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"required\": true\n }\n ],\n \"staticParameters\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automaticParameters\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"requirements\": {\n \"httpSecurityOptions\": {\n \"options\": [\n {\n \"requirements\": {},\n \"ultravoxCallTokenRequirement\": {\n \"scopes\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"requiredParameterOverrides\": [\n \"<string>\"\n ]\n },\n \"timeout\": \"<string>\",\n \"precomputable\": true,\n \"http\": {\n \"baseUrlPattern\": \"<string>\",\n \"httpMethod\": \"<string>\"\n },\n \"client\": {},\n \"dataConnection\": {},\n \"staticResponse\": {\n \"responseText\": \"<string>\"\n }\n },\n \"nameOverride\": \"<string>\",\n \"descriptionOverride\": \"<string>\",\n \"authTokens\": {},\n \"parameterOverrides\": {},\n \"transitionId\": \"<string>\"\n }\n ],\n \"dataConnection\": {\n \"websocketUrl\": \"<string>\",\n \"audioConfig\": {\n \"sampleRate\": 123\n },\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n },\n \"headers\": {}\n },\n \"contextSchema\": {},\n \"sharedSecrets\": [\n \"<string>\"\n ],\n \"backgroundAudio\": {\n \"audioClip\": \"<string>\",\n \"volume\": 123\n },\n \"mediumRestriction\": {\n \"allowedMediums\": []\n },\n \"additionalModels\": [\n \"<string>\"\n ],\n \"triggers\": [\n {\n \"temporaryTrigger\": {\n \"name\": \"<string>\",\n \"event\": {\n \"dataMessage\": \"<string>\",\n \"timer\": \"<string>\"\n },\n \"condition\": {\n \"property\": \"<string>\",\n \"propertyArguments\": {},\n \"value\": \"<unknown>\",\n \"conditions\": \"<array>\"\n },\n \"actions\": [\n {\n \"dataMessage\": {},\n \"ternary\": {\n \"condition\": {\n \"property\": \"<string>\",\n \"propertyArguments\": {},\n \"value\": \"<unknown>\",\n \"conditions\": \"<array>\"\n },\n \"whenTrue\": \"<array>\",\n \"whenFalse\": \"<array>\"\n },\n \"setLocalVariable\": {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n },\n \"incrementLocalVariable\": {\n \"name\": \"<string>\",\n \"value\": 123\n },\n \"startTimer\": {\n \"name\": \"<string>\",\n \"delay\": \"<string>\"\n },\n \"cancelTimer\": {\n \"name\": \"<string>\"\n }\n }\n ],\n \"localVariables\": {}\n },\n \"triggerId\": \"<string>\",\n \"triggerName\": \"<string>\"\n }\n ],\n \"transcriptionSettings\": {\n \"prompts\": [\n \"<string>\"\n ],\n \"includeAgentContext\": true\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ultravox.ai/api/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"callTemplate\": {\n \"name\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\",\n \"updated\": \"2023-11-07T05:31:56Z\",\n \"medium\": {\n \"webRtc\": {\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n }\n },\n \"twilio\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"serverWebSocket\": {\n \"inputSampleRate\": 123,\n \"outputSampleRate\": 123,\n \"clientBufferSizeMs\": 123,\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n },\n \"mediaIdleTimeout\": \"<string>\"\n },\n \"telnyx\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"plivo\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"exotel\": {\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"sip\": {\n \"incoming\": {},\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n }\n }\n },\n \"joinTimeout\": \"<string>\",\n \"maxDuration\": \"<string>\",\n \"vadSettings\": {\n \"turnEndpointDelay\": \"<string>\",\n \"minimumTurnDuration\": \"<string>\",\n \"minimumInterruptionDuration\": \"<string>\",\n \"frameActivationThreshold\": 123\n },\n \"recordingEnabled\": true,\n \"firstSpeakerSettings\": {\n \"user\": {\n \"fallback\": {\n \"delay\": \"<string>\",\n \"text\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n },\n \"agent\": {\n \"uninterruptible\": true,\n \"text\": \"<string>\",\n \"prompt\": \"<string>\",\n \"delay\": \"<string>\"\n }\n },\n \"systemPrompt\": \"<string>\",\n \"temperature\": 123,\n \"model\": \"<string>\",\n \"voice\": \"<string>\",\n \"externalVoice\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true,\n \"pronunciationDictionaryIds\": [\n \"<string>\"\n ]\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"voiceOverrides\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true,\n \"pronunciationDictionaryIds\": [\n \"<string>\"\n ]\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"languageHint\": \"<string>\",\n \"timeExceededMessage\": \"<string>\",\n \"inactivityMessages\": [\n {\n \"duration\": \"<string>\",\n \"message\": \"<string>\"\n }\n ],\n \"selectedTools\": [\n {\n \"toolId\": \"<string>\",\n \"toolName\": \"<string>\",\n \"temporaryTool\": {\n \"modelToolName\": \"<string>\",\n \"description\": \"<string>\",\n \"dynamicParameters\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"required\": true\n }\n ],\n \"staticParameters\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automaticParameters\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"requirements\": {\n \"httpSecurityOptions\": {\n \"options\": [\n {\n \"requirements\": {},\n \"ultravoxCallTokenRequirement\": {\n \"scopes\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"requiredParameterOverrides\": [\n \"<string>\"\n ]\n },\n \"timeout\": \"<string>\",\n \"precomputable\": true,\n \"http\": {\n \"baseUrlPattern\": \"<string>\",\n \"httpMethod\": \"<string>\"\n },\n \"client\": {},\n \"dataConnection\": {},\n \"staticResponse\": {\n \"responseText\": \"<string>\"\n }\n },\n \"nameOverride\": \"<string>\",\n \"descriptionOverride\": \"<string>\",\n \"authTokens\": {},\n \"parameterOverrides\": {},\n \"transitionId\": \"<string>\"\n }\n ],\n \"dataConnection\": {\n \"websocketUrl\": \"<string>\",\n \"audioConfig\": {\n \"sampleRate\": 123\n },\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n },\n \"headers\": {}\n },\n \"contextSchema\": {},\n \"sharedSecrets\": [\n \"<string>\"\n ],\n \"backgroundAudio\": {\n \"audioClip\": \"<string>\",\n \"volume\": 123\n },\n \"mediumRestriction\": {\n \"allowedMediums\": []\n },\n \"additionalModels\": [\n \"<string>\"\n ],\n \"triggers\": [\n {\n \"temporaryTrigger\": {\n \"name\": \"<string>\",\n \"event\": {\n \"dataMessage\": \"<string>\",\n \"timer\": \"<string>\"\n },\n \"condition\": {\n \"property\": \"<string>\",\n \"propertyArguments\": {},\n \"value\": \"<unknown>\",\n \"conditions\": \"<array>\"\n },\n \"actions\": [\n {\n \"dataMessage\": {},\n \"ternary\": {\n \"condition\": {\n \"property\": \"<string>\",\n \"propertyArguments\": {},\n \"value\": \"<unknown>\",\n \"conditions\": \"<array>\"\n },\n \"whenTrue\": \"<array>\",\n \"whenFalse\": \"<array>\"\n },\n \"setLocalVariable\": {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n },\n \"incrementLocalVariable\": {\n \"name\": \"<string>\",\n \"value\": 123\n },\n \"startTimer\": {\n \"name\": \"<string>\",\n \"delay\": \"<string>\"\n },\n \"cancelTimer\": {\n \"name\": \"<string>\"\n }\n }\n ],\n \"localVariables\": {}\n },\n \"triggerId\": \"<string>\",\n \"triggerName\": \"<string>\"\n }\n ],\n \"transcriptionSettings\": {\n \"prompts\": [\n \"<string>\"\n ],\n \"includeAgentContext\": true\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publishedRevisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"statistics": {
"calls": 0
},
"name": "<string>",
"callTemplate": {
"name": "<string>",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"medium": {
"webRtc": {
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"sideGenerationDelta": true,
"sideGenerationCompleted": true,
"threadSpawned": true,
"threadRejected": true,
"threadTerminated": true,
"invokingTool": true,
"threadState": true
}
},
"twilio": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>",
"urgency": "URGENCY_UNSPECIFIED"
}
}
},
"serverWebSocket": {
"inputSampleRate": 123,
"outputSampleRate": 123,
"clientBufferSizeMs": 123,
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"sideGenerationDelta": true,
"sideGenerationCompleted": true,
"threadSpawned": true,
"threadRejected": true,
"threadTerminated": true,
"invokingTool": true,
"threadState": true
},
"mediaIdleTimeout": "<string>"
},
"telnyx": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>",
"urgency": "URGENCY_UNSPECIFIED"
}
}
},
"plivo": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>",
"urgency": "URGENCY_UNSPECIFIED"
}
}
},
"exotel": {
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>",
"urgency": "URGENCY_UNSPECIFIED"
}
}
},
"sip": {
"incoming": {},
"outgoing": {
"to": "<string>",
"from": "<string>",
"username": "<string>",
"password": "<string>"
}
}
},
"initialOutputMedium": "MESSAGE_MEDIUM_UNSPECIFIED",
"joinTimeout": "<string>",
"maxDuration": "<string>",
"vadSettings": {
"turnEndpointDelay": "<string>",
"minimumTurnDuration": "<string>",
"minimumInterruptionDuration": "<string>",
"frameActivationThreshold": 123
},
"recordingEnabled": true,
"firstSpeakerSettings": {
"user": {
"fallback": {
"delay": "<string>",
"text": "<string>",
"prompt": "<string>"
}
},
"agent": {
"uninterruptible": true,
"text": "<string>",
"prompt": "<string>",
"delay": "<string>"
}
},
"systemPrompt": "<string>",
"temperature": 123,
"model": "<string>",
"voice": "<string>",
"externalVoice": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": true,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": true
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": [
"<string>"
],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": true
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": true,
"deliveryMode": "DELIVERY_MODE_UNSPECIFIED",
"pronunciationDictionaryIds": [
"<string>"
]
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>",
"jsonByteEncoding": "JSON_BYTE_ENCODING_UNSPECIFIED"
}
},
"voiceOverrides": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": true,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": true
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": [
"<string>"
],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": true
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": true,
"deliveryMode": "DELIVERY_MODE_UNSPECIFIED",
"pronunciationDictionaryIds": [
"<string>"
]
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>",
"jsonByteEncoding": "JSON_BYTE_ENCODING_UNSPECIFIED"
}
},
"languageHint": "<string>",
"timeExceededMessage": "<string>",
"inactivityMessages": [
{
"duration": "<string>",
"message": "<string>",
"endBehavior": "END_BEHAVIOR_UNSPECIFIED"
}
],
"selectedTools": [
{
"toolId": "<string>",
"toolName": "<string>",
"temporaryTool": {
"modelToolName": "<string>",
"description": "<string>",
"dynamicParameters": [
{
"name": "<string>",
"location": "PARAMETER_LOCATION_UNSPECIFIED",
"schema": {},
"required": true
}
],
"staticParameters": [
{
"name": "<string>",
"location": "PARAMETER_LOCATION_UNSPECIFIED",
"value": "<unknown>"
}
],
"automaticParameters": [
{
"name": "<string>",
"location": "PARAMETER_LOCATION_UNSPECIFIED",
"knownValue": "KNOWN_PARAM_UNSPECIFIED"
}
],
"requirements": {
"httpSecurityOptions": {
"options": [
{
"requirements": {},
"ultravoxCallTokenRequirement": {
"scopes": [
"<string>"
]
}
}
]
},
"requiredParameterOverrides": [
"<string>"
]
},
"timeout": "<string>",
"precomputable": true,
"http": {
"baseUrlPattern": "<string>",
"httpMethod": "<string>"
},
"client": {},
"dataConnection": {},
"defaultReaction": "AGENT_REACTION_UNSPECIFIED",
"staticResponse": {
"responseText": "<string>"
}
},
"nameOverride": "<string>",
"descriptionOverride": "<string>",
"authTokens": {},
"parameterOverrides": {},
"transitionId": "<string>"
}
],
"dataConnection": {
"websocketUrl": "<string>",
"audioConfig": {
"sampleRate": 123,
"channelMode": "CHANNEL_MODE_UNSPECIFIED"
},
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"sideGenerationDelta": true,
"sideGenerationCompleted": true,
"threadSpawned": true,
"threadRejected": true,
"threadTerminated": true,
"invokingTool": true,
"threadState": true
},
"headers": {}
},
"contextSchema": {},
"sharedSecrets": [
"<string>"
],
"retentionPolicy": "CALL_RETENTION_POLICY_UNSPECIFIED",
"backgroundAudio": {
"audioClip": "<string>",
"volume": 123
},
"admissionPreference": "CALL_ADMISSION_PREFERENCE_UNSPECIFIED",
"mediumRestriction": {
"allowedMediums": [
"MESSAGE_MEDIUM_UNSPECIFIED"
]
},
"additionalModels": [
"<string>"
],
"triggers": [
{
"temporaryTrigger": {
"name": "<string>",
"event": {
"dataMessage": "<string>",
"timer": "<string>"
},
"condition": {
"property": "<string>",
"propertyArguments": {},
"operator": "OPERATOR_UNSPECIFIED",
"value": "<unknown>",
"conditions": "<array>"
},
"actions": [
{
"dataMessage": {},
"ternary": {
"condition": {
"property": "<string>",
"propertyArguments": {},
"operator": "OPERATOR_UNSPECIFIED",
"value": "<unknown>",
"conditions": "<array>"
},
"whenTrue": "<array>",
"whenFalse": "<array>"
},
"setLocalVariable": {
"name": "<string>",
"value": "<unknown>"
},
"incrementLocalVariable": {
"name": "<string>",
"value": 123
},
"startTimer": {
"name": "<string>",
"delay": "<string>"
},
"cancelTimer": {
"name": "<string>"
}
}
],
"localVariables": {}
},
"triggerId": "<string>",
"triggerName": "<string>"
}
],
"transcriptionSettings": {
"prompts": [
"<string>"
],
"includeAgentContext": true
}
}
}Body
application/json
Response
201 - application/json
⌘I
cURL
curl --request POST \
--url https://api.ultravox.ai/api/agents \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"callTemplate": {
"name": "<string>",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"medium": {
"webRtc": {
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"sideGenerationDelta": true,
"sideGenerationCompleted": true,
"threadSpawned": true,
"threadRejected": true,
"threadTerminated": true,
"invokingTool": true,
"threadState": true
}
},
"twilio": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"serverWebSocket": {
"inputSampleRate": 123,
"outputSampleRate": 123,
"clientBufferSizeMs": 123,
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"sideGenerationDelta": true,
"sideGenerationCompleted": true,
"threadSpawned": true,
"threadRejected": true,
"threadTerminated": true,
"invokingTool": true,
"threadState": true
},
"mediaIdleTimeout": "<string>"
},
"telnyx": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"plivo": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"exotel": {
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"sip": {
"incoming": {},
"outgoing": {
"to": "<string>",
"from": "<string>",
"username": "<string>",
"password": "<string>"
}
}
},
"joinTimeout": "<string>",
"maxDuration": "<string>",
"vadSettings": {
"turnEndpointDelay": "<string>",
"minimumTurnDuration": "<string>",
"minimumInterruptionDuration": "<string>",
"frameActivationThreshold": 123
},
"recordingEnabled": true,
"firstSpeakerSettings": {
"user": {
"fallback": {
"delay": "<string>",
"text": "<string>",
"prompt": "<string>"
}
},
"agent": {
"uninterruptible": true,
"text": "<string>",
"prompt": "<string>",
"delay": "<string>"
}
},
"systemPrompt": "<string>",
"temperature": 123,
"model": "<string>",
"voice": "<string>",
"externalVoice": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": true,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": true
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": [
"<string>"
],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": true
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": true,
"pronunciationDictionaryIds": [
"<string>"
]
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"voiceOverrides": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": true,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": true
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": [
"<string>"
],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": true
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": true,
"pronunciationDictionaryIds": [
"<string>"
]
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"languageHint": "<string>",
"timeExceededMessage": "<string>",
"inactivityMessages": [
{
"duration": "<string>",
"message": "<string>"
}
],
"selectedTools": [
{
"toolId": "<string>",
"toolName": "<string>",
"temporaryTool": {
"modelToolName": "<string>",
"description": "<string>",
"dynamicParameters": [
{
"name": "<string>",
"schema": {},
"required": true
}
],
"staticParameters": [
{
"name": "<string>",
"value": "<unknown>"
}
],
"automaticParameters": [
{
"name": "<string>"
}
],
"requirements": {
"httpSecurityOptions": {
"options": [
{
"requirements": {},
"ultravoxCallTokenRequirement": {
"scopes": [
"<string>"
]
}
}
]
},
"requiredParameterOverrides": [
"<string>"
]
},
"timeout": "<string>",
"precomputable": true,
"http": {
"baseUrlPattern": "<string>",
"httpMethod": "<string>"
},
"client": {},
"dataConnection": {},
"staticResponse": {
"responseText": "<string>"
}
},
"nameOverride": "<string>",
"descriptionOverride": "<string>",
"authTokens": {},
"parameterOverrides": {},
"transitionId": "<string>"
}
],
"dataConnection": {
"websocketUrl": "<string>",
"audioConfig": {
"sampleRate": 123
},
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"sideGenerationDelta": true,
"sideGenerationCompleted": true,
"threadSpawned": true,
"threadRejected": true,
"threadTerminated": true,
"invokingTool": true,
"threadState": true
},
"headers": {}
},
"contextSchema": {},
"sharedSecrets": [
"<string>"
],
"backgroundAudio": {
"audioClip": "<string>",
"volume": 123
},
"mediumRestriction": {
"allowedMediums": []
},
"additionalModels": [
"<string>"
],
"triggers": [
{
"temporaryTrigger": {
"name": "<string>",
"event": {
"dataMessage": "<string>",
"timer": "<string>"
},
"condition": {
"property": "<string>",
"propertyArguments": {},
"value": "<unknown>",
"conditions": "<array>"
},
"actions": [
{
"dataMessage": {},
"ternary": {
"condition": {
"property": "<string>",
"propertyArguments": {},
"value": "<unknown>",
"conditions": "<array>"
},
"whenTrue": "<array>",
"whenFalse": "<array>"
},
"setLocalVariable": {
"name": "<string>",
"value": "<unknown>"
},
"incrementLocalVariable": {
"name": "<string>",
"value": 123
},
"startTimer": {
"name": "<string>",
"delay": "<string>"
},
"cancelTimer": {
"name": "<string>"
}
}
],
"localVariables": {}
},
"triggerId": "<string>",
"triggerName": "<string>"
}
],
"transcriptionSettings": {
"prompts": [
"<string>"
],
"includeAgentContext": true
}
}
}
'import requests
url = "https://api.ultravox.ai/api/agents"
payload = {
"name": "<string>",
"callTemplate": {
"name": "<string>",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"medium": {
"webRtc": { "dataMessages": {
"pong": True,
"state": True,
"transcript": True,
"clientToolInvocation": True,
"dataConnectionToolInvocation": True,
"playbackClearBuffer": True,
"callStarted": True,
"debug": True,
"callEvent": True,
"toolUsed": True,
"userStartedSpeaking": True,
"userStoppedSpeaking": True,
"sideGenerationDelta": True,
"sideGenerationCompleted": True,
"threadSpawned": True,
"threadRejected": True,
"threadTerminated": True,
"invokingTool": True,
"threadState": True
} },
"twilio": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": True,
"userTextMessage": { "text": "<string>" }
}
},
"serverWebSocket": {
"inputSampleRate": 123,
"outputSampleRate": 123,
"clientBufferSizeMs": 123,
"dataMessages": {
"pong": True,
"state": True,
"transcript": True,
"clientToolInvocation": True,
"dataConnectionToolInvocation": True,
"playbackClearBuffer": True,
"callStarted": True,
"debug": True,
"callEvent": True,
"toolUsed": True,
"userStartedSpeaking": True,
"userStoppedSpeaking": True,
"sideGenerationDelta": True,
"sideGenerationCompleted": True,
"threadSpawned": True,
"threadRejected": True,
"threadTerminated": True,
"invokingTool": True,
"threadState": True
},
"mediaIdleTimeout": "<string>"
},
"telnyx": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": True,
"userTextMessage": { "text": "<string>" }
}
},
"plivo": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": True,
"userTextMessage": { "text": "<string>" }
}
},
"exotel": { "dtmfHandling": {
"ignore": True,
"userTextMessage": { "text": "<string>" }
} },
"sip": {
"incoming": {},
"outgoing": {
"to": "<string>",
"from": "<string>",
"username": "<string>",
"password": "<string>"
}
}
},
"joinTimeout": "<string>",
"maxDuration": "<string>",
"vadSettings": {
"turnEndpointDelay": "<string>",
"minimumTurnDuration": "<string>",
"minimumInterruptionDuration": "<string>",
"frameActivationThreshold": 123
},
"recordingEnabled": True,
"firstSpeakerSettings": {
"user": { "fallback": {
"delay": "<string>",
"text": "<string>",
"prompt": "<string>"
} },
"agent": {
"uninterruptible": True,
"text": "<string>",
"prompt": "<string>",
"delay": "<string>"
}
},
"systemPrompt": "<string>",
"temperature": 123,
"model": "<string>",
"voice": "<string>",
"externalVoice": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": True,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": True
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": ["<string>"],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": True
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": True,
"pronunciationDictionaryIds": ["<string>"]
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"voiceOverrides": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": True,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": True
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": ["<string>"],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": True
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": True,
"pronunciationDictionaryIds": ["<string>"]
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"languageHint": "<string>",
"timeExceededMessage": "<string>",
"inactivityMessages": [
{
"duration": "<string>",
"message": "<string>"
}
],
"selectedTools": [
{
"toolId": "<string>",
"toolName": "<string>",
"temporaryTool": {
"modelToolName": "<string>",
"description": "<string>",
"dynamicParameters": [
{
"name": "<string>",
"schema": {},
"required": True
}
],
"staticParameters": [
{
"name": "<string>",
"value": "<unknown>"
}
],
"automaticParameters": [{ "name": "<string>" }],
"requirements": {
"httpSecurityOptions": { "options": [
{
"requirements": {},
"ultravoxCallTokenRequirement": { "scopes": ["<string>"] }
}
] },
"requiredParameterOverrides": ["<string>"]
},
"timeout": "<string>",
"precomputable": True,
"http": {
"baseUrlPattern": "<string>",
"httpMethod": "<string>"
},
"client": {},
"dataConnection": {},
"staticResponse": { "responseText": "<string>" }
},
"nameOverride": "<string>",
"descriptionOverride": "<string>",
"authTokens": {},
"parameterOverrides": {},
"transitionId": "<string>"
}
],
"dataConnection": {
"websocketUrl": "<string>",
"audioConfig": { "sampleRate": 123 },
"dataMessages": {
"pong": True,
"state": True,
"transcript": True,
"clientToolInvocation": True,
"dataConnectionToolInvocation": True,
"playbackClearBuffer": True,
"callStarted": True,
"debug": True,
"callEvent": True,
"toolUsed": True,
"userStartedSpeaking": True,
"userStoppedSpeaking": True,
"sideGenerationDelta": True,
"sideGenerationCompleted": True,
"threadSpawned": True,
"threadRejected": True,
"threadTerminated": True,
"invokingTool": True,
"threadState": True
},
"headers": {}
},
"contextSchema": {},
"sharedSecrets": ["<string>"],
"backgroundAudio": {
"audioClip": "<string>",
"volume": 123
},
"mediumRestriction": { "allowedMediums": [] },
"additionalModels": ["<string>"],
"triggers": [
{
"temporaryTrigger": {
"name": "<string>",
"event": {
"dataMessage": "<string>",
"timer": "<string>"
},
"condition": {
"property": "<string>",
"propertyArguments": {},
"value": "<unknown>",
"conditions": "<array>"
},
"actions": [
{
"dataMessage": {},
"ternary": {
"condition": {
"property": "<string>",
"propertyArguments": {},
"value": "<unknown>",
"conditions": "<array>"
},
"whenTrue": "<array>",
"whenFalse": "<array>"
},
"setLocalVariable": {
"name": "<string>",
"value": "<unknown>"
},
"incrementLocalVariable": {
"name": "<string>",
"value": 123
},
"startTimer": {
"name": "<string>",
"delay": "<string>"
},
"cancelTimer": { "name": "<string>" }
}
],
"localVariables": {}
},
"triggerId": "<string>",
"triggerName": "<string>"
}
],
"transcriptionSettings": {
"prompts": ["<string>"],
"includeAgentContext": True
}
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
callTemplate: {
name: '<string>',
created: '2023-11-07T05:31:56Z',
updated: '2023-11-07T05:31:56Z',
medium: {
webRtc: {
dataMessages: {
pong: true,
state: true,
transcript: true,
clientToolInvocation: true,
dataConnectionToolInvocation: true,
playbackClearBuffer: true,
callStarted: true,
debug: true,
callEvent: true,
toolUsed: true,
userStartedSpeaking: true,
userStoppedSpeaking: true,
sideGenerationDelta: true,
sideGenerationCompleted: true,
threadSpawned: true,
threadRejected: true,
threadTerminated: true,
invokingTool: true,
threadState: true
}
},
twilio: {
outgoing: {to: '<string>', from: '<string>', additionalParams: {}},
dtmfHandling: {ignore: true, userTextMessage: {text: '<string>'}}
},
serverWebSocket: {
inputSampleRate: 123,
outputSampleRate: 123,
clientBufferSizeMs: 123,
dataMessages: {
pong: true,
state: true,
transcript: true,
clientToolInvocation: true,
dataConnectionToolInvocation: true,
playbackClearBuffer: true,
callStarted: true,
debug: true,
callEvent: true,
toolUsed: true,
userStartedSpeaking: true,
userStoppedSpeaking: true,
sideGenerationDelta: true,
sideGenerationCompleted: true,
threadSpawned: true,
threadRejected: true,
threadTerminated: true,
invokingTool: true,
threadState: true
},
mediaIdleTimeout: '<string>'
},
telnyx: {
outgoing: {to: '<string>', from: '<string>', additionalParams: {}},
dtmfHandling: {ignore: true, userTextMessage: {text: '<string>'}}
},
plivo: {
outgoing: {to: '<string>', from: '<string>', additionalParams: {}},
dtmfHandling: {ignore: true, userTextMessage: {text: '<string>'}}
},
exotel: {dtmfHandling: {ignore: true, userTextMessage: {text: '<string>'}}},
sip: {
incoming: {},
outgoing: {to: '<string>', from: '<string>', username: '<string>', password: '<string>'}
}
},
joinTimeout: '<string>',
maxDuration: '<string>',
vadSettings: {
turnEndpointDelay: '<string>',
minimumTurnDuration: '<string>',
minimumInterruptionDuration: '<string>',
frameActivationThreshold: 123
},
recordingEnabled: true,
firstSpeakerSettings: {
user: {fallback: {delay: '<string>', text: '<string>', prompt: '<string>'}},
agent: {uninterruptible: true, text: '<string>', prompt: '<string>', delay: '<string>'}
},
systemPrompt: '<string>',
temperature: 123,
model: '<string>',
voice: '<string>',
externalVoice: {
elevenLabs: {
voiceId: '<string>',
model: '<string>',
speed: 123,
useSpeakerBoost: true,
style: 123,
similarityBoost: 123,
stability: 123,
pronunciationDictionaries: [{dictionaryId: '<string>', versionId: '<string>'}],
optimizeStreamingLatency: 123,
maxSampleRate: 123,
enableSsmlParsing: true
},
cartesia: {
voiceId: '<string>',
model: '<string>',
speed: 123,
emotion: '<string>',
emotions: ['<string>'],
generationConfig: {volume: 123, speed: 123, emotion: '<string>', pronunciationDictId: '<string>'}
},
lmnt: {voiceId: '<string>', model: '<string>', speed: 123, conversational: true},
google: {voiceId: '<string>', speakingRate: 123},
inworld: {
voiceId: '<string>',
modelId: '<string>',
speakingRate: 123,
temperature: 123,
applyTextNormalization: true,
pronunciationDictionaryIds: ['<string>']
},
respeecher: {
voiceId: '<string>',
model: '<string>',
seed: 123,
temperature: 123,
topK: 123,
topP: 123,
minP: 123,
presencePenalty: 123,
repetitionPenalty: 123,
frequencyPenalty: 123
},
generic: {
url: '<string>',
headers: {},
body: JSON.stringify({}),
responseSampleRate: 123,
responseWordsPerMinute: 123,
responseMimeType: '<string>',
jsonAudioFieldPath: '<string>'
}
},
voiceOverrides: {
elevenLabs: {
voiceId: '<string>',
model: '<string>',
speed: 123,
useSpeakerBoost: true,
style: 123,
similarityBoost: 123,
stability: 123,
pronunciationDictionaries: [{dictionaryId: '<string>', versionId: '<string>'}],
optimizeStreamingLatency: 123,
maxSampleRate: 123,
enableSsmlParsing: true
},
cartesia: {
voiceId: '<string>',
model: '<string>',
speed: 123,
emotion: '<string>',
emotions: ['<string>'],
generationConfig: {volume: 123, speed: 123, emotion: '<string>', pronunciationDictId: '<string>'}
},
lmnt: {voiceId: '<string>', model: '<string>', speed: 123, conversational: true},
google: {voiceId: '<string>', speakingRate: 123},
inworld: {
voiceId: '<string>',
modelId: '<string>',
speakingRate: 123,
temperature: 123,
applyTextNormalization: true,
pronunciationDictionaryIds: ['<string>']
},
respeecher: {
voiceId: '<string>',
model: '<string>',
seed: 123,
temperature: 123,
topK: 123,
topP: 123,
minP: 123,
presencePenalty: 123,
repetitionPenalty: 123,
frequencyPenalty: 123
},
generic: {
url: '<string>',
headers: {},
body: JSON.stringify({}),
responseSampleRate: 123,
responseWordsPerMinute: 123,
responseMimeType: '<string>',
jsonAudioFieldPath: '<string>'
}
},
languageHint: '<string>',
timeExceededMessage: '<string>',
inactivityMessages: [{duration: '<string>', message: '<string>'}],
selectedTools: [
{
toolId: '<string>',
toolName: '<string>',
temporaryTool: {
modelToolName: '<string>',
description: '<string>',
dynamicParameters: [{name: '<string>', schema: {}, required: true}],
staticParameters: [{name: '<string>', value: '<unknown>'}],
automaticParameters: [{name: '<string>'}],
requirements: {
httpSecurityOptions: {
options: [{requirements: {}, ultravoxCallTokenRequirement: {scopes: ['<string>']}}]
},
requiredParameterOverrides: ['<string>']
},
timeout: '<string>',
precomputable: true,
http: {baseUrlPattern: '<string>', httpMethod: '<string>'},
client: {},
dataConnection: {},
staticResponse: {responseText: '<string>'}
},
nameOverride: '<string>',
descriptionOverride: '<string>',
authTokens: {},
parameterOverrides: {},
transitionId: '<string>'
}
],
dataConnection: {
websocketUrl: '<string>',
audioConfig: {sampleRate: 123},
dataMessages: {
pong: true,
state: true,
transcript: true,
clientToolInvocation: true,
dataConnectionToolInvocation: true,
playbackClearBuffer: true,
callStarted: true,
debug: true,
callEvent: true,
toolUsed: true,
userStartedSpeaking: true,
userStoppedSpeaking: true,
sideGenerationDelta: true,
sideGenerationCompleted: true,
threadSpawned: true,
threadRejected: true,
threadTerminated: true,
invokingTool: true,
threadState: true
},
headers: {}
},
contextSchema: {},
sharedSecrets: ['<string>'],
backgroundAudio: {audioClip: '<string>', volume: 123},
mediumRestriction: {allowedMediums: []},
additionalModels: ['<string>'],
triggers: [
{
temporaryTrigger: {
name: '<string>',
event: {dataMessage: '<string>', timer: '<string>'},
condition: {
property: '<string>',
propertyArguments: {},
value: '<unknown>',
conditions: '<array>'
},
actions: [
{
dataMessage: {},
ternary: {
condition: {
property: '<string>',
propertyArguments: {},
value: '<unknown>',
conditions: '<array>'
},
whenTrue: '<array>',
whenFalse: '<array>'
},
setLocalVariable: {name: '<string>', value: '<unknown>'},
incrementLocalVariable: {name: '<string>', value: 123},
startTimer: {name: '<string>', delay: '<string>'},
cancelTimer: {name: '<string>'}
}
],
localVariables: {}
},
triggerId: '<string>',
triggerName: '<string>'
}
],
transcriptionSettings: {prompts: ['<string>'], includeAgentContext: true}
}
})
};
fetch('https://api.ultravox.ai/api/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ultravox.ai/api/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'callTemplate' => [
'name' => '<string>',
'created' => '2023-11-07T05:31:56Z',
'updated' => '2023-11-07T05:31:56Z',
'medium' => [
'webRtc' => [
'dataMessages' => [
'pong' => true,
'state' => true,
'transcript' => true,
'clientToolInvocation' => true,
'dataConnectionToolInvocation' => true,
'playbackClearBuffer' => true,
'callStarted' => true,
'debug' => true,
'callEvent' => true,
'toolUsed' => true,
'userStartedSpeaking' => true,
'userStoppedSpeaking' => true,
'sideGenerationDelta' => true,
'sideGenerationCompleted' => true,
'threadSpawned' => true,
'threadRejected' => true,
'threadTerminated' => true,
'invokingTool' => true,
'threadState' => true
]
],
'twilio' => [
'outgoing' => [
'to' => '<string>',
'from' => '<string>',
'additionalParams' => [
]
],
'dtmfHandling' => [
'ignore' => true,
'userTextMessage' => [
'text' => '<string>'
]
]
],
'serverWebSocket' => [
'inputSampleRate' => 123,
'outputSampleRate' => 123,
'clientBufferSizeMs' => 123,
'dataMessages' => [
'pong' => true,
'state' => true,
'transcript' => true,
'clientToolInvocation' => true,
'dataConnectionToolInvocation' => true,
'playbackClearBuffer' => true,
'callStarted' => true,
'debug' => true,
'callEvent' => true,
'toolUsed' => true,
'userStartedSpeaking' => true,
'userStoppedSpeaking' => true,
'sideGenerationDelta' => true,
'sideGenerationCompleted' => true,
'threadSpawned' => true,
'threadRejected' => true,
'threadTerminated' => true,
'invokingTool' => true,
'threadState' => true
],
'mediaIdleTimeout' => '<string>'
],
'telnyx' => [
'outgoing' => [
'to' => '<string>',
'from' => '<string>',
'additionalParams' => [
]
],
'dtmfHandling' => [
'ignore' => true,
'userTextMessage' => [
'text' => '<string>'
]
]
],
'plivo' => [
'outgoing' => [
'to' => '<string>',
'from' => '<string>',
'additionalParams' => [
]
],
'dtmfHandling' => [
'ignore' => true,
'userTextMessage' => [
'text' => '<string>'
]
]
],
'exotel' => [
'dtmfHandling' => [
'ignore' => true,
'userTextMessage' => [
'text' => '<string>'
]
]
],
'sip' => [
'incoming' => [
],
'outgoing' => [
'to' => '<string>',
'from' => '<string>',
'username' => '<string>',
'password' => '<string>'
]
]
],
'joinTimeout' => '<string>',
'maxDuration' => '<string>',
'vadSettings' => [
'turnEndpointDelay' => '<string>',
'minimumTurnDuration' => '<string>',
'minimumInterruptionDuration' => '<string>',
'frameActivationThreshold' => 123
],
'recordingEnabled' => true,
'firstSpeakerSettings' => [
'user' => [
'fallback' => [
'delay' => '<string>',
'text' => '<string>',
'prompt' => '<string>'
]
],
'agent' => [
'uninterruptible' => true,
'text' => '<string>',
'prompt' => '<string>',
'delay' => '<string>'
]
],
'systemPrompt' => '<string>',
'temperature' => 123,
'model' => '<string>',
'voice' => '<string>',
'externalVoice' => [
'elevenLabs' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'useSpeakerBoost' => true,
'style' => 123,
'similarityBoost' => 123,
'stability' => 123,
'pronunciationDictionaries' => [
[
'dictionaryId' => '<string>',
'versionId' => '<string>'
]
],
'optimizeStreamingLatency' => 123,
'maxSampleRate' => 123,
'enableSsmlParsing' => true
],
'cartesia' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'emotion' => '<string>',
'emotions' => [
'<string>'
],
'generationConfig' => [
'volume' => 123,
'speed' => 123,
'emotion' => '<string>',
'pronunciationDictId' => '<string>'
]
],
'lmnt' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'conversational' => true
],
'google' => [
'voiceId' => '<string>',
'speakingRate' => 123
],
'inworld' => [
'voiceId' => '<string>',
'modelId' => '<string>',
'speakingRate' => 123,
'temperature' => 123,
'applyTextNormalization' => true,
'pronunciationDictionaryIds' => [
'<string>'
]
],
'respeecher' => [
'voiceId' => '<string>',
'model' => '<string>',
'seed' => 123,
'temperature' => 123,
'topK' => 123,
'topP' => 123,
'minP' => 123,
'presencePenalty' => 123,
'repetitionPenalty' => 123,
'frequencyPenalty' => 123
],
'generic' => [
'url' => '<string>',
'headers' => [
],
'body' => [
],
'responseSampleRate' => 123,
'responseWordsPerMinute' => 123,
'responseMimeType' => '<string>',
'jsonAudioFieldPath' => '<string>'
]
],
'voiceOverrides' => [
'elevenLabs' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'useSpeakerBoost' => true,
'style' => 123,
'similarityBoost' => 123,
'stability' => 123,
'pronunciationDictionaries' => [
[
'dictionaryId' => '<string>',
'versionId' => '<string>'
]
],
'optimizeStreamingLatency' => 123,
'maxSampleRate' => 123,
'enableSsmlParsing' => true
],
'cartesia' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'emotion' => '<string>',
'emotions' => [
'<string>'
],
'generationConfig' => [
'volume' => 123,
'speed' => 123,
'emotion' => '<string>',
'pronunciationDictId' => '<string>'
]
],
'lmnt' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'conversational' => true
],
'google' => [
'voiceId' => '<string>',
'speakingRate' => 123
],
'inworld' => [
'voiceId' => '<string>',
'modelId' => '<string>',
'speakingRate' => 123,
'temperature' => 123,
'applyTextNormalization' => true,
'pronunciationDictionaryIds' => [
'<string>'
]
],
'respeecher' => [
'voiceId' => '<string>',
'model' => '<string>',
'seed' => 123,
'temperature' => 123,
'topK' => 123,
'topP' => 123,
'minP' => 123,
'presencePenalty' => 123,
'repetitionPenalty' => 123,
'frequencyPenalty' => 123
],
'generic' => [
'url' => '<string>',
'headers' => [
],
'body' => [
],
'responseSampleRate' => 123,
'responseWordsPerMinute' => 123,
'responseMimeType' => '<string>',
'jsonAudioFieldPath' => '<string>'
]
],
'languageHint' => '<string>',
'timeExceededMessage' => '<string>',
'inactivityMessages' => [
[
'duration' => '<string>',
'message' => '<string>'
]
],
'selectedTools' => [
[
'toolId' => '<string>',
'toolName' => '<string>',
'temporaryTool' => [
'modelToolName' => '<string>',
'description' => '<string>',
'dynamicParameters' => [
[
'name' => '<string>',
'schema' => [
],
'required' => true
]
],
'staticParameters' => [
[
'name' => '<string>',
'value' => '<unknown>'
]
],
'automaticParameters' => [
[
'name' => '<string>'
]
],
'requirements' => [
'httpSecurityOptions' => [
'options' => [
[
'requirements' => [
],
'ultravoxCallTokenRequirement' => [
'scopes' => [
'<string>'
]
]
]
]
],
'requiredParameterOverrides' => [
'<string>'
]
],
'timeout' => '<string>',
'precomputable' => true,
'http' => [
'baseUrlPattern' => '<string>',
'httpMethod' => '<string>'
],
'client' => [
],
'dataConnection' => [
],
'staticResponse' => [
'responseText' => '<string>'
]
],
'nameOverride' => '<string>',
'descriptionOverride' => '<string>',
'authTokens' => [
],
'parameterOverrides' => [
],
'transitionId' => '<string>'
]
],
'dataConnection' => [
'websocketUrl' => '<string>',
'audioConfig' => [
'sampleRate' => 123
],
'dataMessages' => [
'pong' => true,
'state' => true,
'transcript' => true,
'clientToolInvocation' => true,
'dataConnectionToolInvocation' => true,
'playbackClearBuffer' => true,
'callStarted' => true,
'debug' => true,
'callEvent' => true,
'toolUsed' => true,
'userStartedSpeaking' => true,
'userStoppedSpeaking' => true,
'sideGenerationDelta' => true,
'sideGenerationCompleted' => true,
'threadSpawned' => true,
'threadRejected' => true,
'threadTerminated' => true,
'invokingTool' => true,
'threadState' => true
],
'headers' => [
]
],
'contextSchema' => [
],
'sharedSecrets' => [
'<string>'
],
'backgroundAudio' => [
'audioClip' => '<string>',
'volume' => 123
],
'mediumRestriction' => [
'allowedMediums' => [
]
],
'additionalModels' => [
'<string>'
],
'triggers' => [
[
'temporaryTrigger' => [
'name' => '<string>',
'event' => [
'dataMessage' => '<string>',
'timer' => '<string>'
],
'condition' => [
'property' => '<string>',
'propertyArguments' => [
],
'value' => '<unknown>',
'conditions' => '<array>'
],
'actions' => [
[
'dataMessage' => [
],
'ternary' => [
'condition' => [
'property' => '<string>',
'propertyArguments' => [
],
'value' => '<unknown>',
'conditions' => '<array>'
],
'whenTrue' => '<array>',
'whenFalse' => '<array>'
],
'setLocalVariable' => [
'name' => '<string>',
'value' => '<unknown>'
],
'incrementLocalVariable' => [
'name' => '<string>',
'value' => 123
],
'startTimer' => [
'name' => '<string>',
'delay' => '<string>'
],
'cancelTimer' => [
'name' => '<string>'
]
]
],
'localVariables' => [
]
],
'triggerId' => '<string>',
'triggerName' => '<string>'
]
],
'transcriptionSettings' => [
'prompts' => [
'<string>'
],
'includeAgentContext' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ultravox.ai/api/agents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"callTemplate\": {\n \"name\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\",\n \"updated\": \"2023-11-07T05:31:56Z\",\n \"medium\": {\n \"webRtc\": {\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n }\n },\n \"twilio\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"serverWebSocket\": {\n \"inputSampleRate\": 123,\n \"outputSampleRate\": 123,\n \"clientBufferSizeMs\": 123,\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n },\n \"mediaIdleTimeout\": \"<string>\"\n },\n \"telnyx\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"plivo\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"exotel\": {\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"sip\": {\n \"incoming\": {},\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n }\n }\n },\n \"joinTimeout\": \"<string>\",\n \"maxDuration\": \"<string>\",\n \"vadSettings\": {\n \"turnEndpointDelay\": \"<string>\",\n \"minimumTurnDuration\": \"<string>\",\n \"minimumInterruptionDuration\": \"<string>\",\n \"frameActivationThreshold\": 123\n },\n \"recordingEnabled\": true,\n \"firstSpeakerSettings\": {\n \"user\": {\n \"fallback\": {\n \"delay\": \"<string>\",\n \"text\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n },\n \"agent\": {\n \"uninterruptible\": true,\n \"text\": \"<string>\",\n \"prompt\": \"<string>\",\n \"delay\": \"<string>\"\n }\n },\n \"systemPrompt\": \"<string>\",\n \"temperature\": 123,\n \"model\": \"<string>\",\n \"voice\": \"<string>\",\n \"externalVoice\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true,\n \"pronunciationDictionaryIds\": [\n \"<string>\"\n ]\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"voiceOverrides\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true,\n \"pronunciationDictionaryIds\": [\n \"<string>\"\n ]\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"languageHint\": \"<string>\",\n \"timeExceededMessage\": \"<string>\",\n \"inactivityMessages\": [\n {\n \"duration\": \"<string>\",\n \"message\": \"<string>\"\n }\n ],\n \"selectedTools\": [\n {\n \"toolId\": \"<string>\",\n \"toolName\": \"<string>\",\n \"temporaryTool\": {\n \"modelToolName\": \"<string>\",\n \"description\": \"<string>\",\n \"dynamicParameters\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"required\": true\n }\n ],\n \"staticParameters\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automaticParameters\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"requirements\": {\n \"httpSecurityOptions\": {\n \"options\": [\n {\n \"requirements\": {},\n \"ultravoxCallTokenRequirement\": {\n \"scopes\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"requiredParameterOverrides\": [\n \"<string>\"\n ]\n },\n \"timeout\": \"<string>\",\n \"precomputable\": true,\n \"http\": {\n \"baseUrlPattern\": \"<string>\",\n \"httpMethod\": \"<string>\"\n },\n \"client\": {},\n \"dataConnection\": {},\n \"staticResponse\": {\n \"responseText\": \"<string>\"\n }\n },\n \"nameOverride\": \"<string>\",\n \"descriptionOverride\": \"<string>\",\n \"authTokens\": {},\n \"parameterOverrides\": {},\n \"transitionId\": \"<string>\"\n }\n ],\n \"dataConnection\": {\n \"websocketUrl\": \"<string>\",\n \"audioConfig\": {\n \"sampleRate\": 123\n },\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n },\n \"headers\": {}\n },\n \"contextSchema\": {},\n \"sharedSecrets\": [\n \"<string>\"\n ],\n \"backgroundAudio\": {\n \"audioClip\": \"<string>\",\n \"volume\": 123\n },\n \"mediumRestriction\": {\n \"allowedMediums\": []\n },\n \"additionalModels\": [\n \"<string>\"\n ],\n \"triggers\": [\n {\n \"temporaryTrigger\": {\n \"name\": \"<string>\",\n \"event\": {\n \"dataMessage\": \"<string>\",\n \"timer\": \"<string>\"\n },\n \"condition\": {\n \"property\": \"<string>\",\n \"propertyArguments\": {},\n \"value\": \"<unknown>\",\n \"conditions\": \"<array>\"\n },\n \"actions\": [\n {\n \"dataMessage\": {},\n \"ternary\": {\n \"condition\": {\n \"property\": \"<string>\",\n \"propertyArguments\": {},\n \"value\": \"<unknown>\",\n \"conditions\": \"<array>\"\n },\n \"whenTrue\": \"<array>\",\n \"whenFalse\": \"<array>\"\n },\n \"setLocalVariable\": {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n },\n \"incrementLocalVariable\": {\n \"name\": \"<string>\",\n \"value\": 123\n },\n \"startTimer\": {\n \"name\": \"<string>\",\n \"delay\": \"<string>\"\n },\n \"cancelTimer\": {\n \"name\": \"<string>\"\n }\n }\n ],\n \"localVariables\": {}\n },\n \"triggerId\": \"<string>\",\n \"triggerName\": \"<string>\"\n }\n ],\n \"transcriptionSettings\": {\n \"prompts\": [\n \"<string>\"\n ],\n \"includeAgentContext\": true\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ultravox.ai/api/agents")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"callTemplate\": {\n \"name\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\",\n \"updated\": \"2023-11-07T05:31:56Z\",\n \"medium\": {\n \"webRtc\": {\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n }\n },\n \"twilio\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"serverWebSocket\": {\n \"inputSampleRate\": 123,\n \"outputSampleRate\": 123,\n \"clientBufferSizeMs\": 123,\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n },\n \"mediaIdleTimeout\": \"<string>\"\n },\n \"telnyx\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"plivo\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"exotel\": {\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"sip\": {\n \"incoming\": {},\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n }\n }\n },\n \"joinTimeout\": \"<string>\",\n \"maxDuration\": \"<string>\",\n \"vadSettings\": {\n \"turnEndpointDelay\": \"<string>\",\n \"minimumTurnDuration\": \"<string>\",\n \"minimumInterruptionDuration\": \"<string>\",\n \"frameActivationThreshold\": 123\n },\n \"recordingEnabled\": true,\n \"firstSpeakerSettings\": {\n \"user\": {\n \"fallback\": {\n \"delay\": \"<string>\",\n \"text\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n },\n \"agent\": {\n \"uninterruptible\": true,\n \"text\": \"<string>\",\n \"prompt\": \"<string>\",\n \"delay\": \"<string>\"\n }\n },\n \"systemPrompt\": \"<string>\",\n \"temperature\": 123,\n \"model\": \"<string>\",\n \"voice\": \"<string>\",\n \"externalVoice\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true,\n \"pronunciationDictionaryIds\": [\n \"<string>\"\n ]\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"voiceOverrides\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true,\n \"pronunciationDictionaryIds\": [\n \"<string>\"\n ]\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"languageHint\": \"<string>\",\n \"timeExceededMessage\": \"<string>\",\n \"inactivityMessages\": [\n {\n \"duration\": \"<string>\",\n \"message\": \"<string>\"\n }\n ],\n \"selectedTools\": [\n {\n \"toolId\": \"<string>\",\n \"toolName\": \"<string>\",\n \"temporaryTool\": {\n \"modelToolName\": \"<string>\",\n \"description\": \"<string>\",\n \"dynamicParameters\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"required\": true\n }\n ],\n \"staticParameters\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automaticParameters\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"requirements\": {\n \"httpSecurityOptions\": {\n \"options\": [\n {\n \"requirements\": {},\n \"ultravoxCallTokenRequirement\": {\n \"scopes\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"requiredParameterOverrides\": [\n \"<string>\"\n ]\n },\n \"timeout\": \"<string>\",\n \"precomputable\": true,\n \"http\": {\n \"baseUrlPattern\": \"<string>\",\n \"httpMethod\": \"<string>\"\n },\n \"client\": {},\n \"dataConnection\": {},\n \"staticResponse\": {\n \"responseText\": \"<string>\"\n }\n },\n \"nameOverride\": \"<string>\",\n \"descriptionOverride\": \"<string>\",\n \"authTokens\": {},\n \"parameterOverrides\": {},\n \"transitionId\": \"<string>\"\n }\n ],\n \"dataConnection\": {\n \"websocketUrl\": \"<string>\",\n \"audioConfig\": {\n \"sampleRate\": 123\n },\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n },\n \"headers\": {}\n },\n \"contextSchema\": {},\n \"sharedSecrets\": [\n \"<string>\"\n ],\n \"backgroundAudio\": {\n \"audioClip\": \"<string>\",\n \"volume\": 123\n },\n \"mediumRestriction\": {\n \"allowedMediums\": []\n },\n \"additionalModels\": [\n \"<string>\"\n ],\n \"triggers\": [\n {\n \"temporaryTrigger\": {\n \"name\": \"<string>\",\n \"event\": {\n \"dataMessage\": \"<string>\",\n \"timer\": \"<string>\"\n },\n \"condition\": {\n \"property\": \"<string>\",\n \"propertyArguments\": {},\n \"value\": \"<unknown>\",\n \"conditions\": \"<array>\"\n },\n \"actions\": [\n {\n \"dataMessage\": {},\n \"ternary\": {\n \"condition\": {\n \"property\": \"<string>\",\n \"propertyArguments\": {},\n \"value\": \"<unknown>\",\n \"conditions\": \"<array>\"\n },\n \"whenTrue\": \"<array>\",\n \"whenFalse\": \"<array>\"\n },\n \"setLocalVariable\": {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n },\n \"incrementLocalVariable\": {\n \"name\": \"<string>\",\n \"value\": 123\n },\n \"startTimer\": {\n \"name\": \"<string>\",\n \"delay\": \"<string>\"\n },\n \"cancelTimer\": {\n \"name\": \"<string>\"\n }\n }\n ],\n \"localVariables\": {}\n },\n \"triggerId\": \"<string>\",\n \"triggerName\": \"<string>\"\n }\n ],\n \"transcriptionSettings\": {\n \"prompts\": [\n \"<string>\"\n ],\n \"includeAgentContext\": true\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ultravox.ai/api/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"callTemplate\": {\n \"name\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\",\n \"updated\": \"2023-11-07T05:31:56Z\",\n \"medium\": {\n \"webRtc\": {\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n }\n },\n \"twilio\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"serverWebSocket\": {\n \"inputSampleRate\": 123,\n \"outputSampleRate\": 123,\n \"clientBufferSizeMs\": 123,\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n },\n \"mediaIdleTimeout\": \"<string>\"\n },\n \"telnyx\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"plivo\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"exotel\": {\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"sip\": {\n \"incoming\": {},\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n }\n }\n },\n \"joinTimeout\": \"<string>\",\n \"maxDuration\": \"<string>\",\n \"vadSettings\": {\n \"turnEndpointDelay\": \"<string>\",\n \"minimumTurnDuration\": \"<string>\",\n \"minimumInterruptionDuration\": \"<string>\",\n \"frameActivationThreshold\": 123\n },\n \"recordingEnabled\": true,\n \"firstSpeakerSettings\": {\n \"user\": {\n \"fallback\": {\n \"delay\": \"<string>\",\n \"text\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n },\n \"agent\": {\n \"uninterruptible\": true,\n \"text\": \"<string>\",\n \"prompt\": \"<string>\",\n \"delay\": \"<string>\"\n }\n },\n \"systemPrompt\": \"<string>\",\n \"temperature\": 123,\n \"model\": \"<string>\",\n \"voice\": \"<string>\",\n \"externalVoice\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true,\n \"pronunciationDictionaryIds\": [\n \"<string>\"\n ]\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"voiceOverrides\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true,\n \"pronunciationDictionaryIds\": [\n \"<string>\"\n ]\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"languageHint\": \"<string>\",\n \"timeExceededMessage\": \"<string>\",\n \"inactivityMessages\": [\n {\n \"duration\": \"<string>\",\n \"message\": \"<string>\"\n }\n ],\n \"selectedTools\": [\n {\n \"toolId\": \"<string>\",\n \"toolName\": \"<string>\",\n \"temporaryTool\": {\n \"modelToolName\": \"<string>\",\n \"description\": \"<string>\",\n \"dynamicParameters\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"required\": true\n }\n ],\n \"staticParameters\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automaticParameters\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"requirements\": {\n \"httpSecurityOptions\": {\n \"options\": [\n {\n \"requirements\": {},\n \"ultravoxCallTokenRequirement\": {\n \"scopes\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"requiredParameterOverrides\": [\n \"<string>\"\n ]\n },\n \"timeout\": \"<string>\",\n \"precomputable\": true,\n \"http\": {\n \"baseUrlPattern\": \"<string>\",\n \"httpMethod\": \"<string>\"\n },\n \"client\": {},\n \"dataConnection\": {},\n \"staticResponse\": {\n \"responseText\": \"<string>\"\n }\n },\n \"nameOverride\": \"<string>\",\n \"descriptionOverride\": \"<string>\",\n \"authTokens\": {},\n \"parameterOverrides\": {},\n \"transitionId\": \"<string>\"\n }\n ],\n \"dataConnection\": {\n \"websocketUrl\": \"<string>\",\n \"audioConfig\": {\n \"sampleRate\": 123\n },\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"sideGenerationDelta\": true,\n \"sideGenerationCompleted\": true,\n \"threadSpawned\": true,\n \"threadRejected\": true,\n \"threadTerminated\": true,\n \"invokingTool\": true,\n \"threadState\": true\n },\n \"headers\": {}\n },\n \"contextSchema\": {},\n \"sharedSecrets\": [\n \"<string>\"\n ],\n \"backgroundAudio\": {\n \"audioClip\": \"<string>\",\n \"volume\": 123\n },\n \"mediumRestriction\": {\n \"allowedMediums\": []\n },\n \"additionalModels\": [\n \"<string>\"\n ],\n \"triggers\": [\n {\n \"temporaryTrigger\": {\n \"name\": \"<string>\",\n \"event\": {\n \"dataMessage\": \"<string>\",\n \"timer\": \"<string>\"\n },\n \"condition\": {\n \"property\": \"<string>\",\n \"propertyArguments\": {},\n \"value\": \"<unknown>\",\n \"conditions\": \"<array>\"\n },\n \"actions\": [\n {\n \"dataMessage\": {},\n \"ternary\": {\n \"condition\": {\n \"property\": \"<string>\",\n \"propertyArguments\": {},\n \"value\": \"<unknown>\",\n \"conditions\": \"<array>\"\n },\n \"whenTrue\": \"<array>\",\n \"whenFalse\": \"<array>\"\n },\n \"setLocalVariable\": {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n },\n \"incrementLocalVariable\": {\n \"name\": \"<string>\",\n \"value\": 123\n },\n \"startTimer\": {\n \"name\": \"<string>\",\n \"delay\": \"<string>\"\n },\n \"cancelTimer\": {\n \"name\": \"<string>\"\n }\n }\n ],\n \"localVariables\": {}\n },\n \"triggerId\": \"<string>\",\n \"triggerName\": \"<string>\"\n }\n ],\n \"transcriptionSettings\": {\n \"prompts\": [\n \"<string>\"\n ],\n \"includeAgentContext\": true\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publishedRevisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"statistics": {
"calls": 0
},
"name": "<string>",
"callTemplate": {
"name": "<string>",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"medium": {
"webRtc": {
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"sideGenerationDelta": true,
"sideGenerationCompleted": true,
"threadSpawned": true,
"threadRejected": true,
"threadTerminated": true,
"invokingTool": true,
"threadState": true
}
},
"twilio": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>",
"urgency": "URGENCY_UNSPECIFIED"
}
}
},
"serverWebSocket": {
"inputSampleRate": 123,
"outputSampleRate": 123,
"clientBufferSizeMs": 123,
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"sideGenerationDelta": true,
"sideGenerationCompleted": true,
"threadSpawned": true,
"threadRejected": true,
"threadTerminated": true,
"invokingTool": true,
"threadState": true
},
"mediaIdleTimeout": "<string>"
},
"telnyx": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>",
"urgency": "URGENCY_UNSPECIFIED"
}
}
},
"plivo": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>",
"urgency": "URGENCY_UNSPECIFIED"
}
}
},
"exotel": {
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>",
"urgency": "URGENCY_UNSPECIFIED"
}
}
},
"sip": {
"incoming": {},
"outgoing": {
"to": "<string>",
"from": "<string>",
"username": "<string>",
"password": "<string>"
}
}
},
"initialOutputMedium": "MESSAGE_MEDIUM_UNSPECIFIED",
"joinTimeout": "<string>",
"maxDuration": "<string>",
"vadSettings": {
"turnEndpointDelay": "<string>",
"minimumTurnDuration": "<string>",
"minimumInterruptionDuration": "<string>",
"frameActivationThreshold": 123
},
"recordingEnabled": true,
"firstSpeakerSettings": {
"user": {
"fallback": {
"delay": "<string>",
"text": "<string>",
"prompt": "<string>"
}
},
"agent": {
"uninterruptible": true,
"text": "<string>",
"prompt": "<string>",
"delay": "<string>"
}
},
"systemPrompt": "<string>",
"temperature": 123,
"model": "<string>",
"voice": "<string>",
"externalVoice": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": true,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": true
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": [
"<string>"
],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": true
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": true,
"deliveryMode": "DELIVERY_MODE_UNSPECIFIED",
"pronunciationDictionaryIds": [
"<string>"
]
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>",
"jsonByteEncoding": "JSON_BYTE_ENCODING_UNSPECIFIED"
}
},
"voiceOverrides": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": true,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": true
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": [
"<string>"
],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": true
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": true,
"deliveryMode": "DELIVERY_MODE_UNSPECIFIED",
"pronunciationDictionaryIds": [
"<string>"
]
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>",
"jsonByteEncoding": "JSON_BYTE_ENCODING_UNSPECIFIED"
}
},
"languageHint": "<string>",
"timeExceededMessage": "<string>",
"inactivityMessages": [
{
"duration": "<string>",
"message": "<string>",
"endBehavior": "END_BEHAVIOR_UNSPECIFIED"
}
],
"selectedTools": [
{
"toolId": "<string>",
"toolName": "<string>",
"temporaryTool": {
"modelToolName": "<string>",
"description": "<string>",
"dynamicParameters": [
{
"name": "<string>",
"location": "PARAMETER_LOCATION_UNSPECIFIED",
"schema": {},
"required": true
}
],
"staticParameters": [
{
"name": "<string>",
"location": "PARAMETER_LOCATION_UNSPECIFIED",
"value": "<unknown>"
}
],
"automaticParameters": [
{
"name": "<string>",
"location": "PARAMETER_LOCATION_UNSPECIFIED",
"knownValue": "KNOWN_PARAM_UNSPECIFIED"
}
],
"requirements": {
"httpSecurityOptions": {
"options": [
{
"requirements": {},
"ultravoxCallTokenRequirement": {
"scopes": [
"<string>"
]
}
}
]
},
"requiredParameterOverrides": [
"<string>"
]
},
"timeout": "<string>",
"precomputable": true,
"http": {
"baseUrlPattern": "<string>",
"httpMethod": "<string>"
},
"client": {},
"dataConnection": {},
"defaultReaction": "AGENT_REACTION_UNSPECIFIED",
"staticResponse": {
"responseText": "<string>"
}
},
"nameOverride": "<string>",
"descriptionOverride": "<string>",
"authTokens": {},
"parameterOverrides": {},
"transitionId": "<string>"
}
],
"dataConnection": {
"websocketUrl": "<string>",
"audioConfig": {
"sampleRate": 123,
"channelMode": "CHANNEL_MODE_UNSPECIFIED"
},
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"sideGenerationDelta": true,
"sideGenerationCompleted": true,
"threadSpawned": true,
"threadRejected": true,
"threadTerminated": true,
"invokingTool": true,
"threadState": true
},
"headers": {}
},
"contextSchema": {},
"sharedSecrets": [
"<string>"
],
"retentionPolicy": "CALL_RETENTION_POLICY_UNSPECIFIED",
"backgroundAudio": {
"audioClip": "<string>",
"volume": 123
},
"admissionPreference": "CALL_ADMISSION_PREFERENCE_UNSPECIFIED",
"mediumRestriction": {
"allowedMediums": [
"MESSAGE_MEDIUM_UNSPECIFIED"
]
},
"additionalModels": [
"<string>"
],
"triggers": [
{
"temporaryTrigger": {
"name": "<string>",
"event": {
"dataMessage": "<string>",
"timer": "<string>"
},
"condition": {
"property": "<string>",
"propertyArguments": {},
"operator": "OPERATOR_UNSPECIFIED",
"value": "<unknown>",
"conditions": "<array>"
},
"actions": [
{
"dataMessage": {},
"ternary": {
"condition": {
"property": "<string>",
"propertyArguments": {},
"operator": "OPERATOR_UNSPECIFIED",
"value": "<unknown>",
"conditions": "<array>"
},
"whenTrue": "<array>",
"whenFalse": "<array>"
},
"setLocalVariable": {
"name": "<string>",
"value": "<unknown>"
},
"incrementLocalVariable": {
"name": "<string>",
"value": 123
},
"startTimer": {
"name": "<string>",
"delay": "<string>"
},
"cancelTimer": {
"name": "<string>"
}
}
],
"localVariables": {}
},
"triggerId": "<string>",
"triggerName": "<string>"
}
],
"transcriptionSettings": {
"prompts": [
"<string>"
],
"includeAgentContext": true
}
}
}