Skip to main content
POST
/
api
/
llms
Create LLM
curl --request POST \
  --url https://api.upon-ai.com/api/llms \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "workspaceId": 42,
  "display_name": "Concierge with cold transfer",
  "model": "gpt-4o-mini",
  "general_prompt": "You are the voice of UponAI. Help callers and transfer them when needed.",
  "begin_message": "Hi there! Thanks for calling.",
  "responsiveness": "fast",
  "general_tools": [
    {
      "type": "transfer_call",
      "name": "transfer_to_support",
      "description": "Transfer the caller to support when they ask for a human.",
      "transfer_destination": {
        "type": "predefined",
        "number": "+18885551212"
      },
      "transfer_option": {
        "type": "cold_transfer",
        "cold_transfer_mode": "sip_invite",
        "show_transferee_as_caller": false
      }
    }
  ]
}
'
import requests

url = "https://api.upon-ai.com/api/llms"

payload = {
"workspaceId": 42,
"display_name": "Concierge with cold transfer",
"model": "gpt-4o-mini",
"general_prompt": "You are the voice of UponAI. Help callers and transfer them when needed.",
"begin_message": "Hi there! Thanks for calling.",
"responsiveness": "fast",
"general_tools": [
{
"type": "transfer_call",
"name": "transfer_to_support",
"description": "Transfer the caller to support when they ask for a human.",
"transfer_destination": {
"type": "predefined",
"number": "+18885551212"
},
"transfer_option": {
"type": "cold_transfer",
"cold_transfer_mode": "sip_invite",
"show_transferee_as_caller": False
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspaceId: 42,
display_name: 'Concierge with cold transfer',
model: 'gpt-4o-mini',
general_prompt: 'You are the voice of UponAI. Help callers and transfer them when needed.',
begin_message: 'Hi there! Thanks for calling.',
responsiveness: 'fast',
general_tools: [
{
type: 'transfer_call',
name: 'transfer_to_support',
description: 'Transfer the caller to support when they ask for a human.',
transfer_destination: {type: 'predefined', number: '+18885551212'},
transfer_option: {
type: 'cold_transfer',
cold_transfer_mode: 'sip_invite',
show_transferee_as_caller: false
}
}
]
})
};

fetch('https://api.upon-ai.com/api/llms', 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.upon-ai.com/api/llms",
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([
'workspaceId' => 42,
'display_name' => 'Concierge with cold transfer',
'model' => 'gpt-4o-mini',
'general_prompt' => 'You are the voice of UponAI. Help callers and transfer them when needed.',
'begin_message' => 'Hi there! Thanks for calling.',
'responsiveness' => 'fast',
'general_tools' => [
[
'type' => 'transfer_call',
'name' => 'transfer_to_support',
'description' => 'Transfer the caller to support when they ask for a human.',
'transfer_destination' => [
'type' => 'predefined',
'number' => '+18885551212'
],
'transfer_option' => [
'type' => 'cold_transfer',
'cold_transfer_mode' => 'sip_invite',
'show_transferee_as_caller' => false
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$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.upon-ai.com/api/llms"

payload := strings.NewReader("{\n \"workspaceId\": 42,\n \"display_name\": \"Concierge with cold transfer\",\n \"model\": \"gpt-4o-mini\",\n \"general_prompt\": \"You are the voice of UponAI. Help callers and transfer them when needed.\",\n \"begin_message\": \"Hi there! Thanks for calling.\",\n \"responsiveness\": \"fast\",\n \"general_tools\": [\n {\n \"type\": \"transfer_call\",\n \"name\": \"transfer_to_support\",\n \"description\": \"Transfer the caller to support when they ask for a human.\",\n \"transfer_destination\": {\n \"type\": \"predefined\",\n \"number\": \"+18885551212\"\n },\n \"transfer_option\": {\n \"type\": \"cold_transfer\",\n \"cold_transfer_mode\": \"sip_invite\",\n \"show_transferee_as_caller\": false\n }\n }\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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.upon-ai.com/api/llms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspaceId\": 42,\n \"display_name\": \"Concierge with cold transfer\",\n \"model\": \"gpt-4o-mini\",\n \"general_prompt\": \"You are the voice of UponAI. Help callers and transfer them when needed.\",\n \"begin_message\": \"Hi there! Thanks for calling.\",\n \"responsiveness\": \"fast\",\n \"general_tools\": [\n {\n \"type\": \"transfer_call\",\n \"name\": \"transfer_to_support\",\n \"description\": \"Transfer the caller to support when they ask for a human.\",\n \"transfer_destination\": {\n \"type\": \"predefined\",\n \"number\": \"+18885551212\"\n },\n \"transfer_option\": {\n \"type\": \"cold_transfer\",\n \"cold_transfer_mode\": \"sip_invite\",\n \"show_transferee_as_caller\": false\n }\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.upon-ai.com/api/llms")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspaceId\": 42,\n \"display_name\": \"Concierge with cold transfer\",\n \"model\": \"gpt-4o-mini\",\n \"general_prompt\": \"You are the voice of UponAI. Help callers and transfer them when needed.\",\n \"begin_message\": \"Hi there! Thanks for calling.\",\n \"responsiveness\": \"fast\",\n \"general_tools\": [\n {\n \"type\": \"transfer_call\",\n \"name\": \"transfer_to_support\",\n \"description\": \"Transfer the caller to support when they ask for a human.\",\n \"transfer_destination\": {\n \"type\": \"predefined\",\n \"number\": \"+18885551212\"\n },\n \"transfer_option\": {\n \"type\": \"cold_transfer\",\n \"cold_transfer_mode\": \"sip_invite\",\n \"show_transferee_as_caller\": false\n }\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "llm_id": "llm_1ab234cde567fgh",
  "display_name": "Concierge v2",
  "version": 1,
  "model": "gpt-4o-mini",
  "general_prompt": "You are the voice of UponAI...",
  "begin_message": "Hi there! Thanks for calling UponAI.",
  "updated_at": "2025-02-08T17:21:34.000Z"
}

Authorizations

Authorization
string
header
required

Generate tokens from your profile settings at app.uponai.com.

Body

application/json
workspaceId
integer
required
display_name
string
required
model
string
general_prompt
string
begin_message
string | null
responsiveness
string
general_tools
object[]

Response

201 - application/json

Newly created LLM configuration.

llm_id
string
required
display_name
string
required
version
integer
required
model
string
general_prompt
string | null
begin_message
string | null
responsiveness
string | null
general_tools
object[]
updated_at
string<date-time> | null