OpenAI decision evaluation
curl --request POST \
--url https://api.tikway.ai/v1/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"questions": [
{
"type": "predicate",
"instructions": "<string>",
"name": "<string>"
}
],
"prompt_cache_key": "<string>",
"prompt_cache_options": {
"ttl": "30m"
},
"safety_identifier": "<string>"
}
'import requests
url = "https://api.tikway.ai/v1/decisions"
payload = {
"model": "<string>",
"input": "<string>",
"questions": [
{
"type": "predicate",
"instructions": "<string>",
"name": "<string>"
}
],
"prompt_cache_key": "<string>",
"prompt_cache_options": { "ttl": "30m" },
"safety_identifier": "<string>"
}
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({
model: '<string>',
input: '<string>',
questions: [{type: 'predicate', instructions: '<string>', name: '<string>'}],
prompt_cache_key: '<string>',
prompt_cache_options: {ttl: '30m'},
safety_identifier: '<string>'
})
};
fetch('https://api.tikway.ai/v1/decisions', 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.tikway.ai/v1/decisions",
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([
'model' => '<string>',
'input' => '<string>',
'questions' => [
[
'type' => 'predicate',
'instructions' => '<string>',
'name' => '<string>'
]
],
'prompt_cache_key' => '<string>',
'prompt_cache_options' => [
'ttl' => '30m'
],
'safety_identifier' => '<string>'
]),
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.tikway.ai/v1/decisions"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"questions\": [\n {\n \"type\": \"predicate\",\n \"instructions\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"prompt_cache_key\": \"<string>\",\n \"prompt_cache_options\": {\n \"ttl\": \"30m\"\n },\n \"safety_identifier\": \"<string>\"\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.tikway.ai/v1/decisions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"questions\": [\n {\n \"type\": \"predicate\",\n \"instructions\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"prompt_cache_key\": \"<string>\",\n \"prompt_cache_options\": {\n \"ttl\": \"30m\"\n },\n \"safety_identifier\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tikway.ai/v1/decisions")
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 \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"questions\": [\n {\n \"type\": \"predicate\",\n \"instructions\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"prompt_cache_key\": \"<string>\",\n \"prompt_cache_options\": {\n \"ttl\": \"30m\"\n },\n \"safety_identifier\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"model": "<string>",
"answers": [
{
"type": "predicate",
"name": "<string>",
"probability": 0.5
}
],
"usage": {
"prompt_tokens": 1,
"total_tokens": 1,
"completion_tokens": 1,
"prompt_tokens_details": {},
"completion_tokens_details": {}
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}OpenAI
OpenAI decision evaluation
OpenAI decision evaluation through the Tikway gateway.
POST
https://api.tikway.ai
/
v1
/
decisions
OpenAI decision evaluation
curl --request POST \
--url https://api.tikway.ai/v1/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"questions": [
{
"type": "predicate",
"instructions": "<string>",
"name": "<string>"
}
],
"prompt_cache_key": "<string>",
"prompt_cache_options": {
"ttl": "30m"
},
"safety_identifier": "<string>"
}
'import requests
url = "https://api.tikway.ai/v1/decisions"
payload = {
"model": "<string>",
"input": "<string>",
"questions": [
{
"type": "predicate",
"instructions": "<string>",
"name": "<string>"
}
],
"prompt_cache_key": "<string>",
"prompt_cache_options": { "ttl": "30m" },
"safety_identifier": "<string>"
}
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({
model: '<string>',
input: '<string>',
questions: [{type: 'predicate', instructions: '<string>', name: '<string>'}],
prompt_cache_key: '<string>',
prompt_cache_options: {ttl: '30m'},
safety_identifier: '<string>'
})
};
fetch('https://api.tikway.ai/v1/decisions', 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.tikway.ai/v1/decisions",
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([
'model' => '<string>',
'input' => '<string>',
'questions' => [
[
'type' => 'predicate',
'instructions' => '<string>',
'name' => '<string>'
]
],
'prompt_cache_key' => '<string>',
'prompt_cache_options' => [
'ttl' => '30m'
],
'safety_identifier' => '<string>'
]),
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.tikway.ai/v1/decisions"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"questions\": [\n {\n \"type\": \"predicate\",\n \"instructions\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"prompt_cache_key\": \"<string>\",\n \"prompt_cache_options\": {\n \"ttl\": \"30m\"\n },\n \"safety_identifier\": \"<string>\"\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.tikway.ai/v1/decisions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"questions\": [\n {\n \"type\": \"predicate\",\n \"instructions\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"prompt_cache_key\": \"<string>\",\n \"prompt_cache_options\": {\n \"ttl\": \"30m\"\n },\n \"safety_identifier\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tikway.ai/v1/decisions")
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 \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"questions\": [\n {\n \"type\": \"predicate\",\n \"instructions\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"prompt_cache_key\": \"<string>\",\n \"prompt_cache_options\": {\n \"ttl\": \"30m\"\n },\n \"safety_identifier\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"model": "<string>",
"answers": [
{
"type": "predicate",
"name": "<string>",
"probability": 0.5
}
],
"usage": {
"prompt_tokens": 1,
"total_tokens": 1,
"completion_tokens": 1,
"prompt_tokens_details": {},
"completion_tokens_details": {}
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Model ID or configured alias.
Minimum string length:
1Text or input to process.
Maximum string length:
64Maximum string length:
128Response
Successful response

