curl --request POST \
--url https://api.egp.scale.com/v4/interactions/ \
--header 'Content-Type: application/json' \
--data '
{
"application_variant_id": "<string>",
"input": {
"query": "<string>"
},
"output": {
"response": "<string>",
"context": [
{
"text": "<string>",
"score": 123
}
]
},
"start_timestamp": "2023-11-07T05:31:56Z",
"thread_id": "<string>",
"duration_ms": 0,
"operation_status": "SUCCESS",
"operation_metadata": {},
"trace_spans": [
{
"node_id": "<string>",
"start_timestamp": "2023-11-07T05:31:56Z",
"operation_status": "SUCCESS",
"end_timestamp": "2023-11-07T05:31:56Z",
"operation_input": {},
"operation_output": {},
"operation_metadata": {},
"duration_ms": 0,
"account_id": "<string>"
}
]
}
'import requests
url = "https://api.egp.scale.com/v4/interactions/"
payload = {
"application_variant_id": "<string>",
"input": { "query": "<string>" },
"output": {
"response": "<string>",
"context": [
{
"text": "<string>",
"score": 123
}
]
},
"start_timestamp": "2023-11-07T05:31:56Z",
"thread_id": "<string>",
"duration_ms": 0,
"operation_status": "SUCCESS",
"operation_metadata": {},
"trace_spans": [
{
"node_id": "<string>",
"start_timestamp": "2023-11-07T05:31:56Z",
"operation_status": "SUCCESS",
"end_timestamp": "2023-11-07T05:31:56Z",
"operation_input": {},
"operation_output": {},
"operation_metadata": {},
"duration_ms": 0,
"account_id": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
application_variant_id: '<string>',
input: {query: '<string>'},
output: {response: '<string>', context: [{text: '<string>', score: 123}]},
start_timestamp: '2023-11-07T05:31:56Z',
thread_id: '<string>',
duration_ms: 0,
operation_status: 'SUCCESS',
operation_metadata: {},
trace_spans: [
{
node_id: '<string>',
start_timestamp: '2023-11-07T05:31:56Z',
operation_status: 'SUCCESS',
end_timestamp: '2023-11-07T05:31:56Z',
operation_input: {},
operation_output: {},
operation_metadata: {},
duration_ms: 0,
account_id: '<string>'
}
]
})
};
fetch('https://api.egp.scale.com/v4/interactions/', 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.egp.scale.com/v4/interactions/",
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([
'application_variant_id' => '<string>',
'input' => [
'query' => '<string>'
],
'output' => [
'response' => '<string>',
'context' => [
[
'text' => '<string>',
'score' => 123
]
]
],
'start_timestamp' => '2023-11-07T05:31:56Z',
'thread_id' => '<string>',
'duration_ms' => 0,
'operation_status' => 'SUCCESS',
'operation_metadata' => [
],
'trace_spans' => [
[
'node_id' => '<string>',
'start_timestamp' => '2023-11-07T05:31:56Z',
'operation_status' => 'SUCCESS',
'end_timestamp' => '2023-11-07T05:31:56Z',
'operation_input' => [
],
'operation_output' => [
],
'operation_metadata' => [
],
'duration_ms' => 0,
'account_id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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.egp.scale.com/v4/interactions/"
payload := strings.NewReader("{\n \"application_variant_id\": \"<string>\",\n \"input\": {\n \"query\": \"<string>\"\n },\n \"output\": {\n \"response\": \"<string>\",\n \"context\": [\n {\n \"text\": \"<string>\",\n \"score\": 123\n }\n ]\n },\n \"start_timestamp\": \"2023-11-07T05:31:56Z\",\n \"thread_id\": \"<string>\",\n \"duration_ms\": 0,\n \"operation_status\": \"SUCCESS\",\n \"operation_metadata\": {},\n \"trace_spans\": [\n {\n \"node_id\": \"<string>\",\n \"start_timestamp\": \"2023-11-07T05:31:56Z\",\n \"operation_status\": \"SUCCESS\",\n \"end_timestamp\": \"2023-11-07T05:31:56Z\",\n \"operation_input\": {},\n \"operation_output\": {},\n \"operation_metadata\": {},\n \"duration_ms\": 0,\n \"account_id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.egp.scale.com/v4/interactions/")
.header("Content-Type", "application/json")
.body("{\n \"application_variant_id\": \"<string>\",\n \"input\": {\n \"query\": \"<string>\"\n },\n \"output\": {\n \"response\": \"<string>\",\n \"context\": [\n {\n \"text\": \"<string>\",\n \"score\": 123\n }\n ]\n },\n \"start_timestamp\": \"2023-11-07T05:31:56Z\",\n \"thread_id\": \"<string>\",\n \"duration_ms\": 0,\n \"operation_status\": \"SUCCESS\",\n \"operation_metadata\": {},\n \"trace_spans\": [\n {\n \"node_id\": \"<string>\",\n \"start_timestamp\": \"2023-11-07T05:31:56Z\",\n \"operation_status\": \"SUCCESS\",\n \"end_timestamp\": \"2023-11-07T05:31:56Z\",\n \"operation_input\": {},\n \"operation_output\": {},\n \"operation_metadata\": {},\n \"duration_ms\": 0,\n \"account_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/interactions/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"application_variant_id\": \"<string>\",\n \"input\": {\n \"query\": \"<string>\"\n },\n \"output\": {\n \"response\": \"<string>\",\n \"context\": [\n {\n \"text\": \"<string>\",\n \"score\": 123\n }\n ]\n },\n \"start_timestamp\": \"2023-11-07T05:31:56Z\",\n \"thread_id\": \"<string>\",\n \"duration_ms\": 0,\n \"operation_status\": \"SUCCESS\",\n \"operation_metadata\": {},\n \"trace_spans\": [\n {\n \"node_id\": \"<string>\",\n \"start_timestamp\": \"2023-11-07T05:31:56Z\",\n \"operation_status\": \"SUCCESS\",\n \"end_timestamp\": \"2023-11-07T05:31:56Z\",\n \"operation_input\": {},\n \"operation_output\": {},\n \"operation_metadata\": {},\n \"duration_ms\": 0,\n \"account_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"application_variant_id": "<string>",
"input": {
"query": "<string>"
},
"output": {
"response": "<string>",
"context": [
{
"text": "<string>",
"score": 123
}
]
},
"start_timestamp": "2023-11-07T05:31:56Z",
"id": "<string>",
"thread_id": "<string>",
"duration_ms": 0,
"operation_status": "SUCCESS",
"operation_metadata": {},
"trace_spans": [
{
"node_id": "<string>",
"operation_type": "COMPLETION",
"start_timestamp": "2023-11-07T05:31:56Z",
"id": "<string>",
"application_interaction_id": "<string>",
"operation_status": "SUCCESS",
"end_timestamp": "2023-11-07T05:31:56Z",
"operation_input": {},
"operation_output": {},
"operation_metadata": {},
"duration_ms": 0,
"account_id": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Create Application Interaction
curl --request POST \
--url https://api.egp.scale.com/v4/interactions/ \
--header 'Content-Type: application/json' \
--data '
{
"application_variant_id": "<string>",
"input": {
"query": "<string>"
},
"output": {
"response": "<string>",
"context": [
{
"text": "<string>",
"score": 123
}
]
},
"start_timestamp": "2023-11-07T05:31:56Z",
"thread_id": "<string>",
"duration_ms": 0,
"operation_status": "SUCCESS",
"operation_metadata": {},
"trace_spans": [
{
"node_id": "<string>",
"start_timestamp": "2023-11-07T05:31:56Z",
"operation_status": "SUCCESS",
"end_timestamp": "2023-11-07T05:31:56Z",
"operation_input": {},
"operation_output": {},
"operation_metadata": {},
"duration_ms": 0,
"account_id": "<string>"
}
]
}
'import requests
url = "https://api.egp.scale.com/v4/interactions/"
payload = {
"application_variant_id": "<string>",
"input": { "query": "<string>" },
"output": {
"response": "<string>",
"context": [
{
"text": "<string>",
"score": 123
}
]
},
"start_timestamp": "2023-11-07T05:31:56Z",
"thread_id": "<string>",
"duration_ms": 0,
"operation_status": "SUCCESS",
"operation_metadata": {},
"trace_spans": [
{
"node_id": "<string>",
"start_timestamp": "2023-11-07T05:31:56Z",
"operation_status": "SUCCESS",
"end_timestamp": "2023-11-07T05:31:56Z",
"operation_input": {},
"operation_output": {},
"operation_metadata": {},
"duration_ms": 0,
"account_id": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
application_variant_id: '<string>',
input: {query: '<string>'},
output: {response: '<string>', context: [{text: '<string>', score: 123}]},
start_timestamp: '2023-11-07T05:31:56Z',
thread_id: '<string>',
duration_ms: 0,
operation_status: 'SUCCESS',
operation_metadata: {},
trace_spans: [
{
node_id: '<string>',
start_timestamp: '2023-11-07T05:31:56Z',
operation_status: 'SUCCESS',
end_timestamp: '2023-11-07T05:31:56Z',
operation_input: {},
operation_output: {},
operation_metadata: {},
duration_ms: 0,
account_id: '<string>'
}
]
})
};
fetch('https://api.egp.scale.com/v4/interactions/', 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.egp.scale.com/v4/interactions/",
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([
'application_variant_id' => '<string>',
'input' => [
'query' => '<string>'
],
'output' => [
'response' => '<string>',
'context' => [
[
'text' => '<string>',
'score' => 123
]
]
],
'start_timestamp' => '2023-11-07T05:31:56Z',
'thread_id' => '<string>',
'duration_ms' => 0,
'operation_status' => 'SUCCESS',
'operation_metadata' => [
],
'trace_spans' => [
[
'node_id' => '<string>',
'start_timestamp' => '2023-11-07T05:31:56Z',
'operation_status' => 'SUCCESS',
'end_timestamp' => '2023-11-07T05:31:56Z',
'operation_input' => [
],
'operation_output' => [
],
'operation_metadata' => [
],
'duration_ms' => 0,
'account_id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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.egp.scale.com/v4/interactions/"
payload := strings.NewReader("{\n \"application_variant_id\": \"<string>\",\n \"input\": {\n \"query\": \"<string>\"\n },\n \"output\": {\n \"response\": \"<string>\",\n \"context\": [\n {\n \"text\": \"<string>\",\n \"score\": 123\n }\n ]\n },\n \"start_timestamp\": \"2023-11-07T05:31:56Z\",\n \"thread_id\": \"<string>\",\n \"duration_ms\": 0,\n \"operation_status\": \"SUCCESS\",\n \"operation_metadata\": {},\n \"trace_spans\": [\n {\n \"node_id\": \"<string>\",\n \"start_timestamp\": \"2023-11-07T05:31:56Z\",\n \"operation_status\": \"SUCCESS\",\n \"end_timestamp\": \"2023-11-07T05:31:56Z\",\n \"operation_input\": {},\n \"operation_output\": {},\n \"operation_metadata\": {},\n \"duration_ms\": 0,\n \"account_id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.egp.scale.com/v4/interactions/")
.header("Content-Type", "application/json")
.body("{\n \"application_variant_id\": \"<string>\",\n \"input\": {\n \"query\": \"<string>\"\n },\n \"output\": {\n \"response\": \"<string>\",\n \"context\": [\n {\n \"text\": \"<string>\",\n \"score\": 123\n }\n ]\n },\n \"start_timestamp\": \"2023-11-07T05:31:56Z\",\n \"thread_id\": \"<string>\",\n \"duration_ms\": 0,\n \"operation_status\": \"SUCCESS\",\n \"operation_metadata\": {},\n \"trace_spans\": [\n {\n \"node_id\": \"<string>\",\n \"start_timestamp\": \"2023-11-07T05:31:56Z\",\n \"operation_status\": \"SUCCESS\",\n \"end_timestamp\": \"2023-11-07T05:31:56Z\",\n \"operation_input\": {},\n \"operation_output\": {},\n \"operation_metadata\": {},\n \"duration_ms\": 0,\n \"account_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/interactions/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"application_variant_id\": \"<string>\",\n \"input\": {\n \"query\": \"<string>\"\n },\n \"output\": {\n \"response\": \"<string>\",\n \"context\": [\n {\n \"text\": \"<string>\",\n \"score\": 123\n }\n ]\n },\n \"start_timestamp\": \"2023-11-07T05:31:56Z\",\n \"thread_id\": \"<string>\",\n \"duration_ms\": 0,\n \"operation_status\": \"SUCCESS\",\n \"operation_metadata\": {},\n \"trace_spans\": [\n {\n \"node_id\": \"<string>\",\n \"start_timestamp\": \"2023-11-07T05:31:56Z\",\n \"operation_status\": \"SUCCESS\",\n \"end_timestamp\": \"2023-11-07T05:31:56Z\",\n \"operation_input\": {},\n \"operation_output\": {},\n \"operation_metadata\": {},\n \"duration_ms\": 0,\n \"account_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"application_variant_id": "<string>",
"input": {
"query": "<string>"
},
"output": {
"response": "<string>",
"context": [
{
"text": "<string>",
"score": 123
}
]
},
"start_timestamp": "2023-11-07T05:31:56Z",
"id": "<string>",
"thread_id": "<string>",
"duration_ms": 0,
"operation_status": "SUCCESS",
"operation_metadata": {},
"trace_spans": [
{
"node_id": "<string>",
"operation_type": "COMPLETION",
"start_timestamp": "2023-11-07T05:31:56Z",
"id": "<string>",
"application_interaction_id": "<string>",
"operation_status": "SUCCESS",
"end_timestamp": "2023-11-07T05:31:56Z",
"operation_input": {},
"operation_output": {},
"operation_metadata": {},
"duration_ms": 0,
"account_id": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
Represents an interaction performed with an application, including input, output, and associated metadata.
Identifier for the application variant that performed this interaction.
The input data for the interaction.
Show child attributes
Show child attributes
The output data from the interaction.
Show child attributes
Show child attributes
Timestamp marking the start of the interaction.
Optional UUID identifying the conversation thread associated with the interaction.The interaction will be associated with the thread if the id represents an existing thread.If the thread with the specified id is not found, a new thread will be created.
Duration of the interaction in milliseconds.
The outcome status of the interaction.
SUCCESS, ERROR Optional metadata related to the operation, including custom or predefined keys.
List of trace spans associated with the interaction.These spans provide insight into the individual steps taken by nodes involved in generating the output.
Show child attributes
Show child attributes
Response
Successful Response
Model representing an interaction entity.
Identifier for the application variant that performed this interaction.
The input data for the interaction.
Show child attributes
Show child attributes
The output data from the interaction.
Show child attributes
Show child attributes
Timestamp marking the start of the interaction.
Unique identifier for the interaction.
Optional UUID identifying the conversation thread associated with the interaction.The interaction will be associated with the thread if the id represents an existing thread.If the thread with the specified id is not found, a new thread will be created.
Duration of the interaction in milliseconds.
The outcome status of the interaction.
SUCCESS, ERROR Optional metadata related to the operation, including custom or predefined keys.
List of trace span entities associated with the interaction.
Show child attributes
Show child attributes

