Skip to main content
POST
/
v1
/
models
Create a new analysis model
curl --request POST \
  --url https://api.example.com/v1/models \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Customer Service Evaluation v2",
  "description": "Comprehensive evaluation model for customer service calls",
  "prompt": "Evaluate the call based on professional standards...",
  "template_variables": [
    {
      "key": "greeting_quality",
      "type": "INTEGER",
      "required": true
    },
    {
      "key": "resolution_achieved",
      "type": "BOOLEAN",
      "required": true
    }
  ],
  "transcription_prompt": "Customer service call for telecom company.",
  "summarize_call": true,
  "summarize_prompt": "Summarize the key points of this call.",
  "neurascore_template": false,
  "enabled": true
}
'
import requests

url = "https://api.example.com/v1/models"

payload = {
"name": "Customer Service Evaluation v2",
"description": "Comprehensive evaluation model for customer service calls",
"prompt": "Evaluate the call based on professional standards...",
"template_variables": [
{
"key": "greeting_quality",
"type": "INTEGER",
"required": True
},
{
"key": "resolution_achieved",
"type": "BOOLEAN",
"required": True
}
],
"transcription_prompt": "Customer service call for telecom company.",
"summarize_call": True,
"summarize_prompt": "Summarize the key points of this call.",
"neurascore_template": False,
"enabled": True
}
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({
name: 'Customer Service Evaluation v2',
description: 'Comprehensive evaluation model for customer service calls',
prompt: 'Evaluate the call based on professional standards...',
template_variables: [
{key: 'greeting_quality', type: 'INTEGER', required: true},
{key: 'resolution_achieved', type: 'BOOLEAN', required: true}
],
transcription_prompt: 'Customer service call for telecom company.',
summarize_call: true,
summarize_prompt: 'Summarize the key points of this call.',
neurascore_template: false,
enabled: true
})
};

fetch('https://api.example.com/v1/models', 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.example.com/v1/models",
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' => 'Customer Service Evaluation v2',
'description' => 'Comprehensive evaluation model for customer service calls',
'prompt' => 'Evaluate the call based on professional standards...',
'template_variables' => [
[
'key' => 'greeting_quality',
'type' => 'INTEGER',
'required' => true
],
[
'key' => 'resolution_achieved',
'type' => 'BOOLEAN',
'required' => true
]
],
'transcription_prompt' => 'Customer service call for telecom company.',
'summarize_call' => true,
'summarize_prompt' => 'Summarize the key points of this call.',
'neurascore_template' => false,
'enabled' => true
]),
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.example.com/v1/models"

payload := strings.NewReader("{\n \"name\": \"Customer Service Evaluation v2\",\n \"description\": \"Comprehensive evaluation model for customer service calls\",\n \"prompt\": \"Evaluate the call based on professional standards...\",\n \"template_variables\": [\n {\n \"key\": \"greeting_quality\",\n \"type\": \"INTEGER\",\n \"required\": true\n },\n {\n \"key\": \"resolution_achieved\",\n \"type\": \"BOOLEAN\",\n \"required\": true\n }\n ],\n \"transcription_prompt\": \"Customer service call for telecom company.\",\n \"summarize_call\": true,\n \"summarize_prompt\": \"Summarize the key points of this call.\",\n \"neurascore_template\": false,\n \"enabled\": true\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.example.com/v1/models")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer Service Evaluation v2\",\n \"description\": \"Comprehensive evaluation model for customer service calls\",\n \"prompt\": \"Evaluate the call based on professional standards...\",\n \"template_variables\": [\n {\n \"key\": \"greeting_quality\",\n \"type\": \"INTEGER\",\n \"required\": true\n },\n {\n \"key\": \"resolution_achieved\",\n \"type\": \"BOOLEAN\",\n \"required\": true\n }\n ],\n \"transcription_prompt\": \"Customer service call for telecom company.\",\n \"summarize_call\": true,\n \"summarize_prompt\": \"Summarize the key points of this call.\",\n \"neurascore_template\": false,\n \"enabled\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/models")

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 \"name\": \"Customer Service Evaluation v2\",\n \"description\": \"Comprehensive evaluation model for customer service calls\",\n \"prompt\": \"Evaluate the call based on professional standards...\",\n \"template_variables\": [\n {\n \"key\": \"greeting_quality\",\n \"type\": \"INTEGER\",\n \"required\": true\n },\n {\n \"key\": \"resolution_achieved\",\n \"type\": \"BOOLEAN\",\n \"required\": true\n }\n ],\n \"transcription_prompt\": \"Customer service call for telecom company.\",\n \"summarize_call\": true,\n \"summarize_prompt\": \"Summarize the key points of this call.\",\n \"neurascore_template\": false,\n \"enabled\": true\n}"

response = http.request(request)
puts response.read_body
{
  "id": 1,
  "client_id": "client_abc123",
  "name": "Customer Service Evaluation v2",
  "description": "Comprehensive evaluation model for customer service calls",
  "prompt": "<string>",
  "summarize_call": true,
  "neurascore_template": false,
  "enabled": true,
  "created_at": "2023-11-07T05:31:56Z",
  "created_by": "<string>",
  "template_metadata": [],
  "transcription_prompt": "Customer service call for telecom company.",
  "summarize_prompt": "Summarize the key points of this call.",
  "updated_at": "2023-11-07T05:31:56Z",
  "updated_by": "<string>"
}
{
"code": "001-001-0001",
"message": "The requested resource was not found"
}
{
"code": "001-001-0001",
"message": "The requested resource was not found"
}
{
"code": "001-001-0001",
"message": "The requested resource was not found"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body for creating or updating an analysis model

name
string
required

Unique name for this analysis model

Required string length: 1 - 255
Example:

"Customer Service Evaluation v2"

description
string
required

Detailed description of what this model evaluates

Example:

"Comprehensive evaluation model for customer service calls including greeting, problem resolution, and closing."

prompt
string
required

Analysis configuration defining evaluation criteria and scoring rules

template_variables
TemplateVariable · object[]

List of variables to extract during analysis

transcription_prompt
string
default:""

Custom prompt to guide audio transcription. Include domain-specific vocabulary, proper nouns, or context to improve accuracy.

Example:

"This is a customer service call for a telecommunications company."

summarize_call
boolean
default:false

Enable automatic call summary generation after analysis

Example:

true

summarize_prompt
string
default:""

Custom prompt for summary generation. Only used if summarize_call is true.

Example:

"Summarize the key points of this customer service call."

neurascore_template
boolean
default:false

Whether this model uses the NeuraScore scoring system

Example:

false

enabled
boolean
default:true

Whether this model is active. Disabled models are hidden from listings.

Example:

true

Response

Successful Response

Analysis model details and configuration

id
integer
required

Unique identifier for this model

Example:

1

client_id
string
required

Owner client identifier

Example:

"client_abc123"

name
string
required

Model name

Example:

"Customer Service Evaluation v2"

description
string
required

Detailed description of the model

Example:

"Comprehensive evaluation model for customer service calls"

prompt
string
required

Analysis configuration and evaluation criteria

summarize_call
boolean
required

Whether automatic summary generation is enabled

Example:

true

neurascore_template
boolean
required

Whether this model uses the NeuraScore scoring system

Example:

false

enabled
boolean
required

Whether this model is active and available for use

Example:

true

created_at
string<date-time>
required

Timestamp when model was created (UTC)

created_by
string
required

Creator identifier

template_metadata
ClientTemplateMetadata · object[]

Configured metadata fields for additional data extraction

transcription_prompt
string
default:""

Custom prompt for audio transcription

Example:

"Customer service call for telecom company."

summarize_prompt
string
default:""

Custom prompt for summary generation

Example:

"Summarize the key points of this call."

updated_at
string<date-time>

Timestamp of last update (UTC)

updated_by
string

Last updater identifier