Eine Entscheidung treffen
Bewerte typisierte Fragen anhand des Anwendungszustands mit unterstützten Entscheidungsmodellen.
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>'}],
models: ['anthropic/claude-sonnet-5-5', 'google/gemini-2.5-flash'],
provider_options: {typesafe: {long_context: true}},
safety_identifier: '<string>',
meta: false,
echo_upstream_request: true,
debug: {
enabled: true,
return_upstream_request: true,
return_upstream_response: true,
trace: true
},
provider: {
order: ['<string>'],
only: ['<string>'],
ignore: ['<string>'],
include_alpha: true,
allow_fallbacks: true,
require_parameters: true,
required_execution_region: '<string>',
required_data_region: '<string>',
require_zero_data_retention: true,
zdr: true,
enforce_distillable_text: true,
quantizations: ['<string>'],
sort: '<string>',
max_price: {prompt: 123, completion: 123, image: 123, audio: 123, request: 123},
preferred_min_throughput: 123,
preferred_max_latency: 123
},
routing: {
order: ['<string>'],
only: ['<string>'],
ignore: ['<string>'],
include_alpha: true,
allow_fallbacks: true,
require_parameters: true,
required_execution_region: '<string>',
required_data_region: '<string>',
require_zero_data_retention: true,
zdr: true,
enforce_distillable_text: true,
quantizations: ['<string>'],
sort: '<string>',
max_price: {prompt: 123, completion: 123, image: 123, audio: 123, request: 123},
preferred_min_throughput: 123,
preferred_max_latency: 123
},
metadata: {}
})
};
fetch('https://api.phaseo.app/v1/decisions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.phaseo.app/v1/decisions"
payload = {
"model": "<string>",
"input": "<string>",
"questions": [
{
"type": "predicate",
"instructions": "<string>",
"name": "<string>"
}
],
"models": ["anthropic/claude-sonnet-5-5", "google/gemini-2.5-flash"],
"provider_options": { "typesafe": { "long_context": True } },
"safety_identifier": "<string>",
"meta": False,
"echo_upstream_request": True,
"debug": {
"enabled": True,
"return_upstream_request": True,
"return_upstream_response": True,
"trace": True
},
"provider": {
"order": ["<string>"],
"only": ["<string>"],
"ignore": ["<string>"],
"include_alpha": True,
"allow_fallbacks": True,
"require_parameters": True,
"required_execution_region": "<string>",
"required_data_region": "<string>",
"require_zero_data_retention": True,
"zdr": True,
"enforce_distillable_text": True,
"quantizations": ["<string>"],
"sort": "<string>",
"max_price": {
"prompt": 123,
"completion": 123,
"image": 123,
"audio": 123,
"request": 123
},
"preferred_min_throughput": 123,
"preferred_max_latency": 123
},
"routing": {
"order": ["<string>"],
"only": ["<string>"],
"ignore": ["<string>"],
"include_alpha": True,
"allow_fallbacks": True,
"require_parameters": True,
"required_execution_region": "<string>",
"required_data_region": "<string>",
"require_zero_data_retention": True,
"zdr": True,
"enforce_distillable_text": True,
"quantizations": ["<string>"],
"sort": "<string>",
"max_price": {
"prompt": 123,
"completion": 123,
"image": 123,
"audio": 123,
"request": 123
},
"preferred_min_throughput": 123,
"preferred_max_latency": 123
},
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.phaseo.app/v1/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"questions": [
{
"type": "predicate",
"instructions": "<string>",
"name": "<string>"
}
],
"models": [
"anthropic/claude-sonnet-5-5",
"google/gemini-2.5-flash"
],
"provider_options": {
"typesafe": {
"long_context": true
}
},
"safety_identifier": "<string>",
"meta": false,
"echo_upstream_request": true,
"debug": {
"enabled": true,
"return_upstream_request": true,
"return_upstream_response": true,
"trace": true
},
"provider": {
"order": [
"<string>"
],
"only": [
"<string>"
],
"ignore": [
"<string>"
],
"include_alpha": true,
"allow_fallbacks": true,
"require_parameters": true,
"required_execution_region": "<string>",
"required_data_region": "<string>",
"require_zero_data_retention": true,
"zdr": true,
"enforce_distillable_text": true,
"quantizations": [
"<string>"
],
"sort": "<string>",
"max_price": {
"prompt": 123,
"completion": 123,
"image": 123,
"audio": 123,
"request": 123
},
"preferred_min_throughput": 123,
"preferred_max_latency": 123
},
"routing": {
"order": [
"<string>"
],
"only": [
"<string>"
],
"ignore": [
"<string>"
],
"include_alpha": true,
"allow_fallbacks": true,
"require_parameters": true,
"required_execution_region": "<string>",
"required_data_region": "<string>",
"require_zero_data_retention": true,
"zdr": true,
"enforce_distillable_text": true,
"quantizations": [
"<string>"
],
"sort": "<string>",
"max_price": {
"prompt": 123,
"completion": 123,
"image": 123,
"audio": 123,
"request": 123
},
"preferred_min_throughput": 123,
"preferred_max_latency": 123
},
"metadata": {}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.phaseo.app/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 \"models\": [\n \"anthropic/claude-sonnet-5-5\",\n \"google/gemini-2.5-flash\"\n ],\n \"provider_options\": {\n \"typesafe\": {\n \"long_context\": true\n }\n },\n \"safety_identifier\": \"<string>\",\n \"meta\": false,\n \"echo_upstream_request\": true,\n \"debug\": {\n \"enabled\": true,\n \"return_upstream_request\": true,\n \"return_upstream_response\": true,\n \"trace\": true\n },\n \"provider\": {\n \"order\": [\n \"<string>\"\n ],\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"include_alpha\": true,\n \"allow_fallbacks\": true,\n \"require_parameters\": true,\n \"required_execution_region\": \"<string>\",\n \"required_data_region\": \"<string>\",\n \"require_zero_data_retention\": true,\n \"zdr\": true,\n \"enforce_distillable_text\": true,\n \"quantizations\": [\n \"<string>\"\n ],\n \"sort\": \"<string>\",\n \"max_price\": {\n \"prompt\": 123,\n \"completion\": 123,\n \"image\": 123,\n \"audio\": 123,\n \"request\": 123\n },\n \"preferred_min_throughput\": 123,\n \"preferred_max_latency\": 123\n },\n \"routing\": {\n \"order\": [\n \"<string>\"\n ],\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"include_alpha\": true,\n \"allow_fallbacks\": true,\n \"require_parameters\": true,\n \"required_execution_region\": \"<string>\",\n \"required_data_region\": \"<string>\",\n \"require_zero_data_retention\": true,\n \"zdr\": true,\n \"enforce_distillable_text\": true,\n \"quantizations\": [\n \"<string>\"\n ],\n \"sort\": \"<string>\",\n \"max_price\": {\n \"prompt\": 123,\n \"completion\": 123,\n \"image\": 123,\n \"audio\": 123,\n \"request\": 123\n },\n \"preferred_min_throughput\": 123,\n \"preferred_max_latency\": 123\n },\n \"metadata\": {}\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.phaseo.app/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 \"models\": [\n \"anthropic/claude-sonnet-5-5\",\n \"google/gemini-2.5-flash\"\n ],\n \"provider_options\": {\n \"typesafe\": {\n \"long_context\": true\n }\n },\n \"safety_identifier\": \"<string>\",\n \"meta\": false,\n \"echo_upstream_request\": true,\n \"debug\": {\n \"enabled\": true,\n \"return_upstream_request\": true,\n \"return_upstream_response\": true,\n \"trace\": true\n },\n \"provider\": {\n \"order\": [\n \"<string>\"\n ],\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"include_alpha\": true,\n \"allow_fallbacks\": true,\n \"require_parameters\": true,\n \"required_execution_region\": \"<string>\",\n \"required_data_region\": \"<string>\",\n \"require_zero_data_retention\": true,\n \"zdr\": true,\n \"enforce_distillable_text\": true,\n \"quantizations\": [\n \"<string>\"\n ],\n \"sort\": \"<string>\",\n \"max_price\": {\n \"prompt\": 123,\n \"completion\": 123,\n \"image\": 123,\n \"audio\": 123,\n \"request\": 123\n },\n \"preferred_min_throughput\": 123,\n \"preferred_max_latency\": 123\n },\n \"routing\": {\n \"order\": [\n \"<string>\"\n ],\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"include_alpha\": true,\n \"allow_fallbacks\": true,\n \"require_parameters\": true,\n \"required_execution_region\": \"<string>\",\n \"required_data_region\": \"<string>\",\n \"require_zero_data_retention\": true,\n \"zdr\": true,\n \"enforce_distillable_text\": true,\n \"quantizations\": [\n \"<string>\"\n ],\n \"sort\": \"<string>\",\n \"max_price\": {\n \"prompt\": 123,\n \"completion\": 123,\n \"image\": 123,\n \"audio\": 123,\n \"request\": 123\n },\n \"preferred_min_throughput\": 123,\n \"preferred_max_latency\": 123\n },\n \"metadata\": {}\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.phaseo.app/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>'
]
],
'models' => [
'anthropic/claude-sonnet-5-5',
'google/gemini-2.5-flash'
],
'provider_options' => [
'typesafe' => [
'long_context' => true
]
],
'safety_identifier' => '<string>',
'meta' => false,
'echo_upstream_request' => true,
'debug' => [
'enabled' => true,
'return_upstream_request' => true,
'return_upstream_response' => true,
'trace' => true
],
'provider' => [
'order' => [
'<string>'
],
'only' => [
'<string>'
],
'ignore' => [
'<string>'
],
'include_alpha' => true,
'allow_fallbacks' => true,
'require_parameters' => true,
'required_execution_region' => '<string>',
'required_data_region' => '<string>',
'require_zero_data_retention' => true,
'zdr' => true,
'enforce_distillable_text' => true,
'quantizations' => [
'<string>'
],
'sort' => '<string>',
'max_price' => [
'prompt' => 123,
'completion' => 123,
'image' => 123,
'audio' => 123,
'request' => 123
],
'preferred_min_throughput' => 123,
'preferred_max_latency' => 123
],
'routing' => [
'order' => [
'<string>'
],
'only' => [
'<string>'
],
'ignore' => [
'<string>'
],
'include_alpha' => true,
'allow_fallbacks' => true,
'require_parameters' => true,
'required_execution_region' => '<string>',
'required_data_region' => '<string>',
'require_zero_data_retention' => true,
'zdr' => true,
'enforce_distillable_text' => true,
'quantizations' => [
'<string>'
],
'sort' => '<string>',
'max_price' => [
'prompt' => 123,
'completion' => 123,
'image' => 123,
'audio' => 123,
'request' => 123
],
'preferred_min_throughput' => 123,
'preferred_max_latency' => 123
],
'metadata' => [
]
]),
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;
}require 'uri'
require 'net/http'
url = URI("https://api.phaseo.app/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 \"models\": [\n \"anthropic/claude-sonnet-5-5\",\n \"google/gemini-2.5-flash\"\n ],\n \"provider_options\": {\n \"typesafe\": {\n \"long_context\": true\n }\n },\n \"safety_identifier\": \"<string>\",\n \"meta\": false,\n \"echo_upstream_request\": true,\n \"debug\": {\n \"enabled\": true,\n \"return_upstream_request\": true,\n \"return_upstream_response\": true,\n \"trace\": true\n },\n \"provider\": {\n \"order\": [\n \"<string>\"\n ],\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"include_alpha\": true,\n \"allow_fallbacks\": true,\n \"require_parameters\": true,\n \"required_execution_region\": \"<string>\",\n \"required_data_region\": \"<string>\",\n \"require_zero_data_retention\": true,\n \"zdr\": true,\n \"enforce_distillable_text\": true,\n \"quantizations\": [\n \"<string>\"\n ],\n \"sort\": \"<string>\",\n \"max_price\": {\n \"prompt\": 123,\n \"completion\": 123,\n \"image\": 123,\n \"audio\": 123,\n \"request\": 123\n },\n \"preferred_min_throughput\": 123,\n \"preferred_max_latency\": 123\n },\n \"routing\": {\n \"order\": [\n \"<string>\"\n ],\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"include_alpha\": true,\n \"allow_fallbacks\": true,\n \"require_parameters\": true,\n \"required_execution_region\": \"<string>\",\n \"required_data_region\": \"<string>\",\n \"require_zero_data_retention\": true,\n \"zdr\": true,\n \"enforce_distillable_text\": true,\n \"quantizations\": [\n \"<string>\"\n ],\n \"sort\": \"<string>\",\n \"max_price\": {\n \"prompt\": 123,\n \"completion\": 123,\n \"image\": 123,\n \"audio\": 123,\n \"request\": 123\n },\n \"preferred_min_throughput\": 123,\n \"preferred_max_latency\": 123\n },\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"model": "<string>",
"answers": [
{
"type": "predicate",
"name": "<string>",
"probability": 0.5
}
],
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"total_tokens": 1,
"input_tokens_details": {
"cached_tokens": 1,
"cache_write_tokens": 1
},
"output_tokens_details": {
"reasoning_tokens": 1
}
},
"request_id": "<string>",
"meta": {}
}input und ein geordnetes Array von questions an POST /v1/decisions und erhalte pro Frage eine typisierte Antwort mit Wahrscheinlichkeiten, in derselben Reihenfolge.
Eine Entscheidung treffen
Diese Anfrage stellt je eine Frage jedes Typs. Sie benötigt einen Phaseo-API-Schlüssel und eine verfügbare Route füropenai/gpt-6-luna.
curl https://api.phaseo.app/v1/decisions \
-H "Authorization: Bearer $PHASEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-6-luna",
"input": "I was charged twice for my order and I cannot log in to download the invoice.",
"questions": [
{
"type": "choice",
"name": "department",
"instructions": "Which team should handle this request?",
"choices": [
{ "value": "billing", "description": "Payments, invoices and refunds" },
{ "value": "support", "description": "Product usage and troubleshooting" }
]
},
{
"type": "predicate",
"name": "is_blocked",
"instructions": "Is the customer blocked from using the product?"
},
{
"type": "score",
"name": "urgency",
"instructions": "How urgent is this request?",
"levels": [{ "label": "low" }, { "label": "medium" }, { "label": "high" }]
}
]
}'
import Phaseo from "@phaseo/sdk";
const client = new Phaseo(); // liest PHASEO_API_KEY
const decision = await client.decisions.create({
model: "openai/gpt-6-luna",
input: "I was charged twice for my order and I cannot log in to download the invoice.",
questions: [
{
type: "choice",
name: "department",
instructions: "Which team should handle this request?",
choices: [
{ value: "billing", description: "Payments, invoices and refunds" },
{ value: "support", description: "Product usage and troubleshooting" },
],
},
{ type: "predicate", name: "is_blocked", instructions: "Is the customer blocked from using the product?" },
{
type: "score",
name: "urgency",
instructions: "How urgent is this request?",
levels: [{ label: "low" }, { label: "medium" }, { label: "high" }],
},
],
});
console.log(decision.answers);
from phaseo import Phaseo
client = Phaseo() # liest PHASEO_API_KEY
decision = client.decisions.create(
{
"model": "openai/gpt-6-luna",
"input": "I was charged twice for my order and I cannot log in to download the invoice.",
"questions": [
{
"type": "choice",
"name": "department",
"instructions": "Which team should handle this request?",
"choices": [
{"value": "billing", "description": "Payments, invoices and refunds"},
{"value": "support", "description": "Product usage and troubleshooting"},
],
},
{"type": "predicate", "name": "is_blocked", "instructions": "Is the customer blocked from using the product?"},
{
"type": "score",
"name": "urgency",
"instructions": "How urgent is this request?",
"levels": [{"label": "low"}, {"label": "medium"}, {"label": "high"}],
},
],
}
)
print(decision["answers"])
{
"model": "openai/gpt-6-luna",
"answers": [
{
"type": "choice",
"name": "department",
"choice": "billing",
"confidence": 0.89,
"probabilities": [
{ "value": "billing", "probability": 0.91 },
{ "value": "support", "probability": 0.09 }
]
},
{ "type": "predicate", "name": "is_blocked", "probability": 0.84 },
{
"type": "score",
"name": "urgency",
"score": 1.6,
"confidence": 0.7,
"probabilities": [
{ "value": 0, "label": "low", "probability": 0.05 },
{ "value": 1, "label": "medium", "probability": 0.3 },
{ "value": 2, "label": "high", "probability": 0.65 }
]
}
],
"usage": { "input_tokens": 64, "output_tokens": 0, "total_tokens": 64 }
}
Fragen formulieren
input ist ein String oder ein Array von user-Nachrichten, deren content ein String oder eine Liste von input_text-, input_image-, input_audio- und input_video-Teilen ist. name ist optional; Antworten behalten die Reihenfolge der Anfrage bei, auch bei unbenannten und wiederholten Namen.
Eine Anfrage enthält höchstens 128 Fragen, außer bei google/gemini-decision-1, das bis zu 1000 akzeptiert, bei parallel/decisions-fast, das bis zu 100 akzeptiert, und bei Clef, das bis zu 64 akzeptiert. Eine Anfrage über dem Limit des Modells gibt 400 zurück.
type | Zusätzliche Felder | Antwortfelder |
|---|---|---|
predicate | keine | probability (0–1), dass die Antwort Ja lautet |
choice | choices: value (String oder Boolean, eindeutig) und optional description | choice, confidence, probabilities pro Wert |
score | levels: label und optional description | score (wahrscheinlichkeitsgewichteter Stufenindex), confidence, probabilities pro Stufe |
box | keine; erfordert ein Bild in input | box (top, bottom, left, right), confidence |
locate | keine; erfordert einen String als input ohne Medien | spans: start, end, text, score |
type: "refusal" zurück. Welche Typen ein Modell unterstützt, steht unter Ein Modell wählen.
Bilder gehören als Data-URLs in input_image-Teile. Gehostete HTTPS-Bild-URLs funktionieren nur bei den Base-Labs-Modellen (baselabs/elephant-1, baselabs/mammoth-1 und baselabs/joey-1) und müssen auf Amazon S3, Google Cloud Storage oder Azure Blob Storage liegen. Eine Anfrage enthält höchstens 128 Bilder, die Luna akzeptiert; andere Anbieter setzen niedrigere Grenzen. Ein explizites Bild-detail und safety_identifier erfordern eine OpenAI-Route.
Das ältere state-Format verwenden
Anfragen mitstate und einer Map benannter Fragen funktionieren weiterhin und geben Antworten zurück, die nach denselben Namen geschlüsselt sind. Together Tev (together/tev1-4b-experimental) erfordert dieses Format, weil es eine Bezeichnung ohne Wahrscheinlichkeiten zurückgibt, und beantwortet nur choice-Fragen. Auch Respan Span-01 nutzt dieses Format. Mische die Formate nicht: input zusammen mit state oder images gibt 400 zurück.
state: ein String, Objekt oder Array mit den zu bewertenden Informationen.questions: bis zu 128 benannte Fragen, bei Modellen mit höherem Limit mehr. Jede setzttypeaufnoul(Ja/Nein),choiceoderscore, dazuinstructions. Auswahlfragen nehmencriteriaals Map von Option zu Beschreibung; Bewertungsfragen nehmencriteriaals Array mit mindestens zwei Stufenbeschreibungen.locate-Fragen verwenden nurinstructionsund erfordern einen String alsstateohneimages; siehe Perplexity Decider.images: bis zu vier PNG-, JPEG- oder WebP-Bilder, alsdata:-URLs oder{ "content_type", "base64" }-Objekte.model: standardmäßigtypesafe/jev-1.13.0, wenn weggelassen.
questions. choice-Antworten enthalten die gewählte Option, Wahrscheinlichkeiten und Konfidenz; noul-Antworten eine Wahrscheinlichkeit von 0–1; score-Antworten einen wahrscheinlichkeitsgewichteten Wert, eine Legende, Wahrscheinlichkeiten und Konfidenz.
Ein Modell wählen
Prüfe die Modellverfügbarkeit, bevor du eines dieser Modelle aufrufst.| Modell | Fragetypen | Eingabe | Eingabepreis pro 1M Tokens |
|---|---|---|---|
openai/gpt-6-luna | predicate, choice, score | Text, bis zu 128 Bilder | Siehe Modellseite |
typesafe/jev-1.13.0, typesafe/jev-1.14.0 | alle drei, gemischt in einer Anfrage; box bei 1.14 | Text, PNG-/JPEG-Bilder | $0.042 (Jev 1.13) |
cloudflare/clef, cloudflare/clef-flash | alle drei | Text, bis zu 4 Bilder | $0.24 / $0.038 |
cloudflare/clef-omni | alle drei | Text, Bilder, Audio, Video | $0.15 |
google/gemini-decision-1 | predicate, choice, score; bis zu 1000 pro Anfrage | Text, Bilder, Audio, Video | $0.10 |
liquid-ai/d1:free | alle drei | Siehe Modellseite | Kostenlos während des Early Access |
liquid-ai/d1, liquid-ai/d1.1, liquid-ai/d1-ultra | alle drei | Text, Bilder | $0.02 / $0.02 / $0.042 |
liquid-ai/d1.2, liquid-ai/d1.2-ultra | alle drei, dazu text, number, date, spans, boxes und Mehrfachauswahl im älteren Format | Text, Bilder, Audio | $0.02 / $0.042 |
perplexity/pplx-decider-v1.3, perplexity/pplx-decider-flash-v1.3 | alle drei, dazu locate | Text, Base64-Bilder | $0.02 / $0.01 |
inception/mercury-decide | predicate, choice, score | Text oder JSON | $0.02 (Aktion) |
microsoft/microsoft-decision-1 | predicate, choice, score | Text oder JSON | $0.042 |
respan/span-01:free, respan/span-01 | nur noul (älteres Format) | Gesprächsausschnitt | Kostenlos (Lite) / $0.02 |
together/tev1-4b-experimental | nur choice (älteres Format) | Text | Siehe Modellseite |
TypeSafe Jev
Verwendetypesafe/jev-1.13.0 für Jev 1.13 oder typesafe/jev-latest, um der neuesten Jev-Version zu folgen. Die Upstream-Semantik der Fragen findest du in der API-Referenz von TypeSafe.
Auf unterstützenden TypeSafe-Routen akzeptieren Jev 1.13 und 1.14 eingebettete PNG- oder JPEG-Bilder über input_image oder das ältere Feld images. Phaseo erstellt die Bild-Assets für TypeSafe und aktiviert die Bildunterstützung automatisch. Bilder müssen die Bildgrenzen von TypeSafe einhalten: höchstens 16 MiB pro Bild, 256 bis 1568 Pixel pro Seite und mindestens 78.400 Pixel insgesamt. TypeSafe prüft Abmessungen und Kodierung und skaliert abgelehnte Bilder nicht. Der zugeordnete Upstream-JSON-Body ist auf 32 MiB begrenzt. Bild-Tokens kosten den normalen Eingabepreis.
box (auf unterstützenden Routen wie Jev 1.14) erfordert ein Bild, nimmt keine Kriterien und gibt einen Begrenzungsrahmen samt Konfidenz zurück. Seine Kanten reichen von 0 bis 1, gemessen von der oberen linken Ecke. Box gibt immer ein Rechteck zurück, kombiniere es daher mit einer predicate-Frage zur Anwesenheit, wenn das Ziel fehlen kann. Beziehe dich beim älteren Feld images auf images[0], bei geordneter Eingabe auf das erste Bild oder [Image 0]. Siehe den Box-Vertrag.
Setze provider_options.typesafe.long_context auf true, um die Kontextgrenzen pro Anfrage und pro Frage auf 262k Tokens anzuheben, statt der Standardwerte von 64k pro Anfrage und 32k pro Frage. Langer Kontext kostet pro Token gleich viel. Bilder, Box und langer Kontext sind experimentelle Upstream-Funktionen.
{
"model": "typesafe/jev-1.14.0",
"input": [{
"role": "user",
"content": [{ "type": "input_image", "image_url": "data:image/png;base64,<base64 image bytes>" }]
}],
"questions": [
{ "type": "predicate", "name": "visible", "instructions": "Is there a mug in the first image?" },
{ "type": "box", "name": "mug", "instructions": "The mug in the first image" }
],
"provider_options": { "typesafe": { "long_context": true } }
}
Cloudflare Clef und Clef Flash
cloudflare/clef und cloudflare/clef-flash laufen auf Cloudflare Workers AI. Clef hat ein Kontextfenster von 65.536 Tokens, Clef Flash von 24.576 Tokens.
{
"model": "cloudflare/clef-flash",
"state": "Inspect the attached product photo.",
"images": [{ "content_type": "image/png", "base64": "<base64 image bytes>" }],
"questions": {
"damaged": { "type": "noul", "instructions": "Is the product visibly damaged?" }
}
}
images akzeptiert auch einen String data:image/png;base64,.... Clef akzeptiert bis zu vier PNG-, JPEG- oder WebP-Bilder mit jeweils höchstens 4 MiB und 16 Megapixeln, insgesamt höchstens 8 MiB dekodierter Bilddaten und einem Anfrage-Body von 13 MiB. Externe URLs werden nicht unterstützt, und Cloudflare prüft Bildformate und Abmessungen. Modelle ohne Bildunterstützung lehnen Bildanfragen ab.
Clef akzeptiert höchstens 64 Fragen mit IDs aus bis zu 100 Buchstaben, Ziffern, Unterstrichen, Punkten oder Bindestrichen. Auswahlfragen benötigen 2–255 Optionen und Bewertungsfragen 2–10 Stufen. Siehe die Clef-Dokumentation von Cloudflare.
Cloudflare Clef Omni
cloudflare/clef-omni akzeptiert Text, Bilder, Audio und Video. Audio- und Videoteile sind Phaseo-Erweiterungen des Eingabeformats; OpenAI-Routen akzeptieren nur Text und Bilder. Ersetze die Platzhalter-Audiobytes und die Video-URL durch deine eigenen Medien, bevor du dieses Beispiel sendest.
{
"model": "cloudflare/clef-omni",
"input": [{
"role": "user",
"content": [
{ "type": "input_text", "text": "Review the recording and clip." },
{ "type": "input_audio", "input_audio": { "data": "<base64 WAV bytes>", "format": "wav" } },
{ "type": "input_video", "video_url": { "url": "https://media.example.com/clip.mp4" } }
]
}],
"questions": [{ "type": "predicate", "name": "safe", "instructions": "Is the equipment operating safely?" }]
}
input_audio.data mit format: "wav" oder "mp3" oder als input_audio.url mit einer öffentlichen HTTPS-URL oder einer eingebetteten Audio-Data-URL. input_video.video_url nimmt einen String oder { "url": "..." } mit einer öffentlichen HTTPS-URL oder einer eingebetteten MP4-/WebM-Data-URL. Externe Server müssen den passenden Content-Type zurückgeben. Phaseo ruft URLs mit Größenbegrenzungen sowie Prüfungen auf private Adressen und Weiterleitungen ab und bettet die Medien dann für Cloudflare ein; Anbieterzugangsdaten werden nie an den Medienserver gesendet.
| Limit | Wert |
|---|---|
| Audioclips | 4, jeweils höchstens 8 MiB und 300 Sekunden |
| Videos | 2, jeweils höchstens 16 MiB und 60 Sekunden |
| Audio und Video zusammen | 16 MiB dekodiert |
| Bilder | Dieselben Grenzen pro Bild und insgesamt wie bei Clef |
| Anfrage-Body | 37 MiB (ersetzt die 13 MiB von Clef) |
| Kontext | 64.000 Tokens |
Liquid D1.2 und D1.2 Ultra
liquid-ai/d1.2 und liquid-ai/d1.2-ultra nutzen das ältere state-Format, mit bis zu vier Bildern und bis zu acht Audioclips. Sende audio als base64-data:-URLs (WAV, MP3, FLAC, M4A oder OGG, je URL höchstens 24 MiB, also etwa 18 MiB Audio); entfernte Audio-URLs werden nicht unterstützt. Neben noul, choice und score beantworten sie diese Fragetypen:
type | Zusätzliche Felder | Antwortfelder |
|---|---|---|
text | keine | text, dazu span (Start- und Endposition in state) und found (0–1); text ist null, wenn found unter 0,5 liegt |
number | optional unit; optional range ([low, high]) und step, das range voraussetzt und den Bereich glatt teilen muss | number und unit; ohne range auch text, span und found; mit range ist number der Median und interval gleich [p10, p90] |
date | keine | date (YYYY-MM-DD), text, span, found |
spans | keine | spans (jeweils mit text, span und found), count, at_least |
boxes | optional max (1–16); braucht genau ein Bild | boxes, count, at_least |
multiple: true bei einer choice-Frage, um alle zutreffenden Optionen als choices mit probabilities je Option zu erhalten. Andere Modelle geben für diese Fragetypen 400 zurück und beantworten multiple-Fragen mit einer einzigen Option; Modelle ohne Audioeingabe ignorieren audio. liquid-ai/d1, liquid-ai/d1.1 und liquid-ai/d1-ultra nehmen Text und Bilder an und beantworten noul, choice und score.
{
"model": "liquid-ai/d1.2",
"state": "Order #4417 placed 2026-11-02 for 3 items, total $84.50. The parcel arrived broken and late.",
"questions": {
"total": { "type": "number", "instructions": "Order total in dollars", "unit": "USD" },
"placed": { "type": "date", "instructions": "When was the order placed?" },
"topics": {
"type": "choice",
"multiple": true,
"instructions": "Which problems apply?",
"criteria": { "damage": "Item damaged", "delay": "Late delivery", "billing": "Payment problem" }
}
}
}
Liquid D1 und Perplexity Decider
Liquid D1 (liquid-ai/d1:free) ist während des experimentellen Early Access kostenlos. Perplexity Decider V1.3 (perplexity/pplx-decider-v1.3 oder perplexity/pplx-decider-latest) und Decider Flash V1.3 (perplexity/pplx-decider-flash-v1.3 oder perplexity/pplx-decider-flash-latest) benötigen Perplexity-Anbieterzugangsdaten in Phaseo. Ihr Bildzustand verwendet Base64-Data-URLs im PNG-, JPEG- oder WebP-Format; externe Bild-URLs werden nicht unterstützt. Sie beantworten außerdem locate-Fragen, die die Teile eines String-input oder -state zurückgeben, die zu den instructions passen, etwa "email address". Jeder Abschnitt enthält wörtlich kopierten text, die Positionen start und end in Unicode-Codepunkten (end ist exklusiv) und einen score, bei dem höher sicherer bedeutet; spans ist leer, wenn nichts passt. Locate nimmt keine criteria und keine Bilder, Audio- oder Videodaten an und funktioniert nur bei Modellen, die es angeben; andere Modelle geben 400 zurück. Perplexity hat es mit Eingaben von bis zu 8K Tokens trainiert. Bei beiden akzeptiert eine Auswahlfrage bis zu 255 Optionen und eine Bewertungsfrage bis zu 10 Stufen.
Inception Mercury Decide
inception/mercury-decide nimmt Text oder JSON als Beleg. Auswahlfragen akzeptieren bis zu 255 Optionen und Bewertungsfragen bis zu 10 Stufen. Bilder, Streaming und Tool-Aufrufe werden nicht unterstützt. Der Eingabepreis von $0.02 ist eine 50-%-Aktion von Inception ohne veröffentlichtes Enddatum; prüfe vor der Nutzung die aktuellen Upstream-Preise.
{
"model": "inception/mercury-decide",
"input": "Please refund the duplicate charge on my account.",
"questions": [{
"type": "predicate",
"name": "billing",
"instructions": "Is this request about billing?"
}]
}
Microsoft Decision
microsoft/microsoft-decision-1 läuft auf einem Azure-Foundry-Deployment und nimmt Text oder JSON als Beleg mit bis zu 32.768 Tokens. Medien, Streaming, Tools, safety_identifier und service_tier werden nicht unterstützt. Siehe den Leitfaden von Microsoft.
{
"model": "microsoft/microsoft-decision-1",
"input": "The API returns 500 on every call.",
"questions": [{
"type": "choice",
"name": "team",
"instructions": "Which team should handle this ticket?",
"choices": [
{ "value": "engineering", "description": "Bugs, errors, and outages" },
{ "value": "support", "description": "How-to and account questions" }
]
}]
}
Respan Span-01
Span-01 verwendet das ältere Format.state muss ein Gesprächsausschnitt sein: ein input-Array vorangehender Nachrichten und eine output-Assistentennachricht. Es beantwortet nur noul-Fragen: Der noul-Wert ist die Wahrscheinlichkeit, dass das Verhalten vorliegt, und probabilities gibt außerdem die Wahrscheinlichkeiten für „nicht vorhanden“ und „nicht beobachtbar“ an.
{
"model": "respan/span-01:free",
"state": {
"input": [{ "role": "user", "content": "Please connect me to a person." }],
"output": { "role": "assistant", "content": "I will connect you to support." }
},
"questions": {
"escalation": {
"type": "noul",
"instructions": "Does the assistant offer a human handoff?"
}
}
}
{
"answers": {
"escalation": {
"type": "noul",
"noul": 0.73,
"probabilities": {
"true": 0.73,
"false": 0.25,
"not_observable": 0.02
}
}
}
}
respan/span-01:free ist das kostenlose Lite-Modell mit Tageslimit und entspricht dem Respan-Modell span-01-free. respan/span-01 entspricht span-01-pro und wird von Respan abgerechnet. Span-01 ist im Early Access: Respan muss es für deine Organisation freischalten, und du hinterlegst deinen Respan-API-Schlüssel als Respan-Anbieterzugangsdaten in Phaseo, bevor du eines der beiden Modelle aufrufst.Body
- Option 1
- Option 2
Das OpenAI-Format wird empfohlen. Das bisherige Format bleibt unterstützt. Die Antwort folgt der Anfrage; Formate nicht mischen.
Optionale, geordnete Fallback-Modelle, die nach model versucht werden. model ist erforderlich und immer das primäre Modell. Schlägt ein Versuch mit 429, 500, 502, 503 oder 504 fehl, wird der nächste Eintrag versucht; andere Fehler werden unverändert zurückgegeben. Akzeptiert bis zu 25 Modell-IDs oder Presets; Duplikate und Einträge, die model entsprechen, werden ignoriert. Jeder Versuch wird als eigene Anfrage validiert, protokolliert und abgerechnet, und das Feld model der Antwort sowie der Routing-Trace zeigen das Modell, das die Anfrage bedient hat. Streaming-Anfragen weichen nur vor dem ersten Byte aus, Video- und Musikjobs nur bei der Übermittlung. Batch-, Realtime- und Council-Anfragen lehnen models ab. Auf einer dynamischen Route festgelegte Fallbacks haben Vorrang, und phaseo/auto kann nicht mit models kombiniert werden.
1 - 25 elements1[ "anthropic/claude-sonnet-5-5", "google/gemini-2.5-flash" ]
Antwort
Antwort mit strukturierten Entscheidungen
- Option 1
- Option 2
Geordnete Antworten für input/Array; benannte Map für bisheriges state/Map.
War diese Seite hilfreich?
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>'}],
models: ['anthropic/claude-sonnet-5-5', 'google/gemini-2.5-flash'],
provider_options: {typesafe: {long_context: true}},
safety_identifier: '<string>',
meta: false,
echo_upstream_request: true,
debug: {
enabled: true,
return_upstream_request: true,
return_upstream_response: true,
trace: true
},
provider: {
order: ['<string>'],
only: ['<string>'],
ignore: ['<string>'],
include_alpha: true,
allow_fallbacks: true,
require_parameters: true,
required_execution_region: '<string>',
required_data_region: '<string>',
require_zero_data_retention: true,
zdr: true,
enforce_distillable_text: true,
quantizations: ['<string>'],
sort: '<string>',
max_price: {prompt: 123, completion: 123, image: 123, audio: 123, request: 123},
preferred_min_throughput: 123,
preferred_max_latency: 123
},
routing: {
order: ['<string>'],
only: ['<string>'],
ignore: ['<string>'],
include_alpha: true,
allow_fallbacks: true,
require_parameters: true,
required_execution_region: '<string>',
required_data_region: '<string>',
require_zero_data_retention: true,
zdr: true,
enforce_distillable_text: true,
quantizations: ['<string>'],
sort: '<string>',
max_price: {prompt: 123, completion: 123, image: 123, audio: 123, request: 123},
preferred_min_throughput: 123,
preferred_max_latency: 123
},
metadata: {}
})
};
fetch('https://api.phaseo.app/v1/decisions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.phaseo.app/v1/decisions"
payload = {
"model": "<string>",
"input": "<string>",
"questions": [
{
"type": "predicate",
"instructions": "<string>",
"name": "<string>"
}
],
"models": ["anthropic/claude-sonnet-5-5", "google/gemini-2.5-flash"],
"provider_options": { "typesafe": { "long_context": True } },
"safety_identifier": "<string>",
"meta": False,
"echo_upstream_request": True,
"debug": {
"enabled": True,
"return_upstream_request": True,
"return_upstream_response": True,
"trace": True
},
"provider": {
"order": ["<string>"],
"only": ["<string>"],
"ignore": ["<string>"],
"include_alpha": True,
"allow_fallbacks": True,
"require_parameters": True,
"required_execution_region": "<string>",
"required_data_region": "<string>",
"require_zero_data_retention": True,
"zdr": True,
"enforce_distillable_text": True,
"quantizations": ["<string>"],
"sort": "<string>",
"max_price": {
"prompt": 123,
"completion": 123,
"image": 123,
"audio": 123,
"request": 123
},
"preferred_min_throughput": 123,
"preferred_max_latency": 123
},
"routing": {
"order": ["<string>"],
"only": ["<string>"],
"ignore": ["<string>"],
"include_alpha": True,
"allow_fallbacks": True,
"require_parameters": True,
"required_execution_region": "<string>",
"required_data_region": "<string>",
"require_zero_data_retention": True,
"zdr": True,
"enforce_distillable_text": True,
"quantizations": ["<string>"],
"sort": "<string>",
"max_price": {
"prompt": 123,
"completion": 123,
"image": 123,
"audio": 123,
"request": 123
},
"preferred_min_throughput": 123,
"preferred_max_latency": 123
},
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.phaseo.app/v1/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"questions": [
{
"type": "predicate",
"instructions": "<string>",
"name": "<string>"
}
],
"models": [
"anthropic/claude-sonnet-5-5",
"google/gemini-2.5-flash"
],
"provider_options": {
"typesafe": {
"long_context": true
}
},
"safety_identifier": "<string>",
"meta": false,
"echo_upstream_request": true,
"debug": {
"enabled": true,
"return_upstream_request": true,
"return_upstream_response": true,
"trace": true
},
"provider": {
"order": [
"<string>"
],
"only": [
"<string>"
],
"ignore": [
"<string>"
],
"include_alpha": true,
"allow_fallbacks": true,
"require_parameters": true,
"required_execution_region": "<string>",
"required_data_region": "<string>",
"require_zero_data_retention": true,
"zdr": true,
"enforce_distillable_text": true,
"quantizations": [
"<string>"
],
"sort": "<string>",
"max_price": {
"prompt": 123,
"completion": 123,
"image": 123,
"audio": 123,
"request": 123
},
"preferred_min_throughput": 123,
"preferred_max_latency": 123
},
"routing": {
"order": [
"<string>"
],
"only": [
"<string>"
],
"ignore": [
"<string>"
],
"include_alpha": true,
"allow_fallbacks": true,
"require_parameters": true,
"required_execution_region": "<string>",
"required_data_region": "<string>",
"require_zero_data_retention": true,
"zdr": true,
"enforce_distillable_text": true,
"quantizations": [
"<string>"
],
"sort": "<string>",
"max_price": {
"prompt": 123,
"completion": 123,
"image": 123,
"audio": 123,
"request": 123
},
"preferred_min_throughput": 123,
"preferred_max_latency": 123
},
"metadata": {}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.phaseo.app/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 \"models\": [\n \"anthropic/claude-sonnet-5-5\",\n \"google/gemini-2.5-flash\"\n ],\n \"provider_options\": {\n \"typesafe\": {\n \"long_context\": true\n }\n },\n \"safety_identifier\": \"<string>\",\n \"meta\": false,\n \"echo_upstream_request\": true,\n \"debug\": {\n \"enabled\": true,\n \"return_upstream_request\": true,\n \"return_upstream_response\": true,\n \"trace\": true\n },\n \"provider\": {\n \"order\": [\n \"<string>\"\n ],\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"include_alpha\": true,\n \"allow_fallbacks\": true,\n \"require_parameters\": true,\n \"required_execution_region\": \"<string>\",\n \"required_data_region\": \"<string>\",\n \"require_zero_data_retention\": true,\n \"zdr\": true,\n \"enforce_distillable_text\": true,\n \"quantizations\": [\n \"<string>\"\n ],\n \"sort\": \"<string>\",\n \"max_price\": {\n \"prompt\": 123,\n \"completion\": 123,\n \"image\": 123,\n \"audio\": 123,\n \"request\": 123\n },\n \"preferred_min_throughput\": 123,\n \"preferred_max_latency\": 123\n },\n \"routing\": {\n \"order\": [\n \"<string>\"\n ],\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"include_alpha\": true,\n \"allow_fallbacks\": true,\n \"require_parameters\": true,\n \"required_execution_region\": \"<string>\",\n \"required_data_region\": \"<string>\",\n \"require_zero_data_retention\": true,\n \"zdr\": true,\n \"enforce_distillable_text\": true,\n \"quantizations\": [\n \"<string>\"\n ],\n \"sort\": \"<string>\",\n \"max_price\": {\n \"prompt\": 123,\n \"completion\": 123,\n \"image\": 123,\n \"audio\": 123,\n \"request\": 123\n },\n \"preferred_min_throughput\": 123,\n \"preferred_max_latency\": 123\n },\n \"metadata\": {}\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.phaseo.app/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 \"models\": [\n \"anthropic/claude-sonnet-5-5\",\n \"google/gemini-2.5-flash\"\n ],\n \"provider_options\": {\n \"typesafe\": {\n \"long_context\": true\n }\n },\n \"safety_identifier\": \"<string>\",\n \"meta\": false,\n \"echo_upstream_request\": true,\n \"debug\": {\n \"enabled\": true,\n \"return_upstream_request\": true,\n \"return_upstream_response\": true,\n \"trace\": true\n },\n \"provider\": {\n \"order\": [\n \"<string>\"\n ],\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"include_alpha\": true,\n \"allow_fallbacks\": true,\n \"require_parameters\": true,\n \"required_execution_region\": \"<string>\",\n \"required_data_region\": \"<string>\",\n \"require_zero_data_retention\": true,\n \"zdr\": true,\n \"enforce_distillable_text\": true,\n \"quantizations\": [\n \"<string>\"\n ],\n \"sort\": \"<string>\",\n \"max_price\": {\n \"prompt\": 123,\n \"completion\": 123,\n \"image\": 123,\n \"audio\": 123,\n \"request\": 123\n },\n \"preferred_min_throughput\": 123,\n \"preferred_max_latency\": 123\n },\n \"routing\": {\n \"order\": [\n \"<string>\"\n ],\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"include_alpha\": true,\n \"allow_fallbacks\": true,\n \"require_parameters\": true,\n \"required_execution_region\": \"<string>\",\n \"required_data_region\": \"<string>\",\n \"require_zero_data_retention\": true,\n \"zdr\": true,\n \"enforce_distillable_text\": true,\n \"quantizations\": [\n \"<string>\"\n ],\n \"sort\": \"<string>\",\n \"max_price\": {\n \"prompt\": 123,\n \"completion\": 123,\n \"image\": 123,\n \"audio\": 123,\n \"request\": 123\n },\n \"preferred_min_throughput\": 123,\n \"preferred_max_latency\": 123\n },\n \"metadata\": {}\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.phaseo.app/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>'
]
],
'models' => [
'anthropic/claude-sonnet-5-5',
'google/gemini-2.5-flash'
],
'provider_options' => [
'typesafe' => [
'long_context' => true
]
],
'safety_identifier' => '<string>',
'meta' => false,
'echo_upstream_request' => true,
'debug' => [
'enabled' => true,
'return_upstream_request' => true,
'return_upstream_response' => true,
'trace' => true
],
'provider' => [
'order' => [
'<string>'
],
'only' => [
'<string>'
],
'ignore' => [
'<string>'
],
'include_alpha' => true,
'allow_fallbacks' => true,
'require_parameters' => true,
'required_execution_region' => '<string>',
'required_data_region' => '<string>',
'require_zero_data_retention' => true,
'zdr' => true,
'enforce_distillable_text' => true,
'quantizations' => [
'<string>'
],
'sort' => '<string>',
'max_price' => [
'prompt' => 123,
'completion' => 123,
'image' => 123,
'audio' => 123,
'request' => 123
],
'preferred_min_throughput' => 123,
'preferred_max_latency' => 123
],
'routing' => [
'order' => [
'<string>'
],
'only' => [
'<string>'
],
'ignore' => [
'<string>'
],
'include_alpha' => true,
'allow_fallbacks' => true,
'require_parameters' => true,
'required_execution_region' => '<string>',
'required_data_region' => '<string>',
'require_zero_data_retention' => true,
'zdr' => true,
'enforce_distillable_text' => true,
'quantizations' => [
'<string>'
],
'sort' => '<string>',
'max_price' => [
'prompt' => 123,
'completion' => 123,
'image' => 123,
'audio' => 123,
'request' => 123
],
'preferred_min_throughput' => 123,
'preferred_max_latency' => 123
],
'metadata' => [
]
]),
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;
}require 'uri'
require 'net/http'
url = URI("https://api.phaseo.app/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 \"models\": [\n \"anthropic/claude-sonnet-5-5\",\n \"google/gemini-2.5-flash\"\n ],\n \"provider_options\": {\n \"typesafe\": {\n \"long_context\": true\n }\n },\n \"safety_identifier\": \"<string>\",\n \"meta\": false,\n \"echo_upstream_request\": true,\n \"debug\": {\n \"enabled\": true,\n \"return_upstream_request\": true,\n \"return_upstream_response\": true,\n \"trace\": true\n },\n \"provider\": {\n \"order\": [\n \"<string>\"\n ],\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"include_alpha\": true,\n \"allow_fallbacks\": true,\n \"require_parameters\": true,\n \"required_execution_region\": \"<string>\",\n \"required_data_region\": \"<string>\",\n \"require_zero_data_retention\": true,\n \"zdr\": true,\n \"enforce_distillable_text\": true,\n \"quantizations\": [\n \"<string>\"\n ],\n \"sort\": \"<string>\",\n \"max_price\": {\n \"prompt\": 123,\n \"completion\": 123,\n \"image\": 123,\n \"audio\": 123,\n \"request\": 123\n },\n \"preferred_min_throughput\": 123,\n \"preferred_max_latency\": 123\n },\n \"routing\": {\n \"order\": [\n \"<string>\"\n ],\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"include_alpha\": true,\n \"allow_fallbacks\": true,\n \"require_parameters\": true,\n \"required_execution_region\": \"<string>\",\n \"required_data_region\": \"<string>\",\n \"require_zero_data_retention\": true,\n \"zdr\": true,\n \"enforce_distillable_text\": true,\n \"quantizations\": [\n \"<string>\"\n ],\n \"sort\": \"<string>\",\n \"max_price\": {\n \"prompt\": 123,\n \"completion\": 123,\n \"image\": 123,\n \"audio\": 123,\n \"request\": 123\n },\n \"preferred_min_throughput\": 123,\n \"preferred_max_latency\": 123\n },\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"model": "<string>",
"answers": [
{
"type": "predicate",
"name": "<string>",
"probability": 0.5
}
],
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"total_tokens": 1,
"input_tokens_details": {
"cached_tokens": 1,
"cache_write_tokens": 1
},
"output_tokens_details": {
"reasoning_tokens": 1
}
},
"request_id": "<string>",
"meta": {}
}