Compatibilidade com System One
Beta: Alias of POST /decisions mirroring the upstream TypeSafe path, so TypeSafe SDKs work with a base URL swap (TYPESAFE_BASE_URL=https://api.venice.ai/api).
curl --request POST \
--url https://api.venice.ai/api/v1/systemone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"state": "Help! My payouts have been failing for 3 days.",
"model": "jev-latest",
"questions": {
"is_urgent": {
"type": "noul",
"instructions": "Does this message convey urgency?"
}
}
}
'import requests
url = "https://api.venice.ai/api/v1/systemone"
payload = {
"state": "Help! My payouts have been failing for 3 days.",
"model": "jev-latest",
"questions": { "is_urgent": {
"type": "noul",
"instructions": "Does this message convey urgency?"
} }
}
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({
state: 'Help! My payouts have been failing for 3 days.',
model: 'jev-latest',
questions: {is_urgent: {type: 'noul', instructions: 'Does this message convey urgency?'}}
})
};
fetch('https://api.venice.ai/api/v1/systemone', 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.venice.ai/api/v1/systemone",
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([
'state' => 'Help! My payouts have been failing for 3 days.',
'model' => 'jev-latest',
'questions' => [
'is_urgent' => [
'type' => 'noul',
'instructions' => 'Does this message convey urgency?'
]
]
]),
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.venice.ai/api/v1/systemone"
payload := strings.NewReader("{\n \"state\": \"Help! My payouts have been failing for 3 days.\",\n \"model\": \"jev-latest\",\n \"questions\": {\n \"is_urgent\": {\n \"type\": \"noul\",\n \"instructions\": \"Does this message convey urgency?\"\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.venice.ai/api/v1/systemone")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"state\": \"Help! My payouts have been failing for 3 days.\",\n \"model\": \"jev-latest\",\n \"questions\": {\n \"is_urgent\": {\n \"type\": \"noul\",\n \"instructions\": \"Does this message convey urgency?\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venice.ai/api/v1/systemone")
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 \"state\": \"Help! My payouts have been failing for 3 days.\",\n \"model\": \"jev-latest\",\n \"questions\": {\n \"is_urgent\": {\n \"type\": \"noul\",\n \"instructions\": \"Does this message convey urgency?\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"model": "jev-latest",
"answers": {
"is_urgent": {
"type": "noul",
"noul": 0.92
}
},
"usage": {
"input_tokens": 312,
"output_tokens": 48
}
}{
"error": "<string>",
"details": {
"_errors": [],
"field": {
"_errors": [
"Field is required"
]
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Cabeçalhos
Supported compression encodings (gzip, br)
"gzip, br"
Corpo
Evaluate a state against a map of typed questions and get back structured answers, one per question.
The content to evaluate: a plain string for text, or structured data (object/array) for things like chat logs, records, or application state.
1"Help! My payouts have been failing for 3 days."
ID of the decision model to use. You can use the List models API (type=decision) to see available models, or see our Model overview for descriptions of them.
"jev-latest"
Map of typed questions, keyed by an id you choose. Answers come back under the same ids. Every question is evaluated in parallel and in isolation against the same state. Question ids are not sent to the model.
Show child attributes
Show child attributes
{
"is_urgent": {
"type": "noul",
"instructions": "Does this message convey urgency?"
}
}
Esta página foi útil?
curl --request POST \
--url https://api.venice.ai/api/v1/systemone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"state": "Help! My payouts have been failing for 3 days.",
"model": "jev-latest",
"questions": {
"is_urgent": {
"type": "noul",
"instructions": "Does this message convey urgency?"
}
}
}
'import requests
url = "https://api.venice.ai/api/v1/systemone"
payload = {
"state": "Help! My payouts have been failing for 3 days.",
"model": "jev-latest",
"questions": { "is_urgent": {
"type": "noul",
"instructions": "Does this message convey urgency?"
} }
}
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({
state: 'Help! My payouts have been failing for 3 days.',
model: 'jev-latest',
questions: {is_urgent: {type: 'noul', instructions: 'Does this message convey urgency?'}}
})
};
fetch('https://api.venice.ai/api/v1/systemone', 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.venice.ai/api/v1/systemone",
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([
'state' => 'Help! My payouts have been failing for 3 days.',
'model' => 'jev-latest',
'questions' => [
'is_urgent' => [
'type' => 'noul',
'instructions' => 'Does this message convey urgency?'
]
]
]),
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.venice.ai/api/v1/systemone"
payload := strings.NewReader("{\n \"state\": \"Help! My payouts have been failing for 3 days.\",\n \"model\": \"jev-latest\",\n \"questions\": {\n \"is_urgent\": {\n \"type\": \"noul\",\n \"instructions\": \"Does this message convey urgency?\"\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.venice.ai/api/v1/systemone")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"state\": \"Help! My payouts have been failing for 3 days.\",\n \"model\": \"jev-latest\",\n \"questions\": {\n \"is_urgent\": {\n \"type\": \"noul\",\n \"instructions\": \"Does this message convey urgency?\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venice.ai/api/v1/systemone")
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 \"state\": \"Help! My payouts have been failing for 3 days.\",\n \"model\": \"jev-latest\",\n \"questions\": {\n \"is_urgent\": {\n \"type\": \"noul\",\n \"instructions\": \"Does this message convey urgency?\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"model": "jev-latest",
"answers": {
"is_urgent": {
"type": "noul",
"noul": 0.92
}
},
"usage": {
"input_tokens": 312,
"output_tokens": 48
}
}{
"error": "<string>",
"details": {
"_errors": [],
"field": {
"_errors": [
"Field is required"
]
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}