curl https://router.requesty.ai/v1/decisions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_REQUESTY_API_KEY" \
-d '{
"model": "openai/gpt-6-luna",
"state": "The dragon heist in this fantasy novel had me hooked, but the ending dragged a little.",
"questions": {
"positive": {
"type": "noul",
"instructions": "The review is positive."
},
"genre": {
"type": "choice",
"instructions": "Which genre is the book?",
"criteria": {
"fantasy": "Magic, myth or invented worlds",
"mystery": "A crime or puzzle to solve",
"romance": "A love story"
}
},
"rating": {
"type": "score",
"instructions": "How much did the reviewer enjoy the book?",
"criteria": ["Hated it", "Disliked it", "Neutral", "Liked it", "Loved it"]
}
}
}'
import httpx
response = httpx.post(
"https://router.requesty.ai/v1/decisions",
headers={"Authorization": "Bearer YOUR_REQUESTY_API_KEY"},
json={
"model": "openai/gpt-6-luna",
"state": "The dragon heist in this fantasy novel had me hooked, but the ending dragged a little.",
"questions": {
"positive": {"type": "noul", "instructions": "The review is positive."},
},
},
)
answer = response.json()["answers"]["positive"]
if answer["type"] == "refusal":
print("The model declined to answer")
else:
print(answer["noul"])
const response = await fetch("https://router.requesty.ai/v1/decisions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.REQUESTY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "openai/gpt-6-luna",
state: "The dragon heist in this fantasy novel had me hooked, but the ending dragged a little.",
questions: {
positive: { type: "noul", instructions: "The review is positive." },
},
}),
});
const { answers } = await response.json();
const answer = answers.positive;
console.log(answer.type === "refusal" ? "The model declined to answer" : answer.noul);
{
"answers": {
"genre": {
"type": "choice",
"choice": "fantasy",
"confidence": 1,
"probabilities": {
"fantasy": 1,
"mystery": 0,
"romance": 0
}
},
"positive": {
"type": "noul",
"noul": 0.73
},
"rating": {
"type": "score",
"score": 3.1,
"confidence": 0.87,
"probabilities": [
{ "value": 0, "probability": 0.01 },
{ "value": 1, "probability": 0 },
{ "value": 2, "probability": 0 },
{ "value": 3, "probability": 0.86 },
{ "value": 4, "probability": 0.13 }
]
}
},
"id": "rqsty-dcsn-15e2efde-f7c6-49cb-92ae-c763b1b16193",
"model": "gpt-6-luna",
"provider": "openai",
"usage": {
"input_tokens": 424,
"output_tokens": 0
}
}
{
"answers": {
"positive": {
"type": "refusal"
}
},
"id": "rqsty-dcsn-75924058-d3b3-471a-b19c-4e003550bcc7",
"model": "gpt-6-luna",
"provider": "openai",
"usage": {
"input_tokens": 5,
"output_tokens": 0
}
}
Create Decision
Ask typed questions about a piece of content and get a calibrated answer for each one.
POST
/
v1
/
decisions
curl https://router.requesty.ai/v1/decisions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_REQUESTY_API_KEY" \
-d '{
"model": "openai/gpt-6-luna",
"state": "The dragon heist in this fantasy novel had me hooked, but the ending dragged a little.",
"questions": {
"positive": {
"type": "noul",
"instructions": "The review is positive."
},
"genre": {
"type": "choice",
"instructions": "Which genre is the book?",
"criteria": {
"fantasy": "Magic, myth or invented worlds",
"mystery": "A crime or puzzle to solve",
"romance": "A love story"
}
},
"rating": {
"type": "score",
"instructions": "How much did the reviewer enjoy the book?",
"criteria": ["Hated it", "Disliked it", "Neutral", "Liked it", "Loved it"]
}
}
}'
import httpx
response = httpx.post(
"https://router.requesty.ai/v1/decisions",
headers={"Authorization": "Bearer YOUR_REQUESTY_API_KEY"},
json={
"model": "openai/gpt-6-luna",
"state": "The dragon heist in this fantasy novel had me hooked, but the ending dragged a little.",
"questions": {
"positive": {"type": "noul", "instructions": "The review is positive."},
},
},
)
answer = response.json()["answers"]["positive"]
if answer["type"] == "refusal":
print("The model declined to answer")
else:
print(answer["noul"])
const response = await fetch("https://router.requesty.ai/v1/decisions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.REQUESTY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "openai/gpt-6-luna",
state: "The dragon heist in this fantasy novel had me hooked, but the ending dragged a little.",
questions: {
positive: { type: "noul", instructions: "The review is positive." },
},
}),
});
const { answers } = await response.json();
const answer = answers.positive;
console.log(answer.type === "refusal" ? "The model declined to answer" : answer.noul);
{
"answers": {
"genre": {
"type": "choice",
"choice": "fantasy",
"confidence": 1,
"probabilities": {
"fantasy": 1,
"mystery": 0,
"romance": 0
}
},
"positive": {
"type": "noul",
"noul": 0.73
},
"rating": {
"type": "score",
"score": 3.1,
"confidence": 0.87,
"probabilities": [
{ "value": 0, "probability": 0.01 },
{ "value": 1, "probability": 0 },
{ "value": 2, "probability": 0 },
{ "value": 3, "probability": 0.86 },
{ "value": 4, "probability": 0.13 }
]
}
},
"id": "rqsty-dcsn-15e2efde-f7c6-49cb-92ae-c763b1b16193",
"model": "gpt-6-luna",
"provider": "openai",
"usage": {
"input_tokens": 424,
"output_tokens": 0
}
}
{
"answers": {
"positive": {
"type": "refusal"
}
},
"id": "rqsty-dcsn-75924058-d3b3-471a-b19c-4e003550bcc7",
"model": "gpt-6-luna",
"provider": "openai",
"usage": {
"input_tokens": 5,
"output_tokens": 0
}
}
curl https://router.requesty.ai/v1/decisions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_REQUESTY_API_KEY" \
-d '{
"model": "openai/gpt-6-luna",
"state": "The dragon heist in this fantasy novel had me hooked, but the ending dragged a little.",
"questions": {
"positive": {
"type": "noul",
"instructions": "The review is positive."
},
"genre": {
"type": "choice",
"instructions": "Which genre is the book?",
"criteria": {
"fantasy": "Magic, myth or invented worlds",
"mystery": "A crime or puzzle to solve",
"romance": "A love story"
}
},
"rating": {
"type": "score",
"instructions": "How much did the reviewer enjoy the book?",
"criteria": ["Hated it", "Disliked it", "Neutral", "Liked it", "Loved it"]
}
}
}'
import httpx
response = httpx.post(
"https://router.requesty.ai/v1/decisions",
headers={"Authorization": "Bearer YOUR_REQUESTY_API_KEY"},
json={
"model": "openai/gpt-6-luna",
"state": "The dragon heist in this fantasy novel had me hooked, but the ending dragged a little.",
"questions": {
"positive": {"type": "noul", "instructions": "The review is positive."},
},
},
)
answer = response.json()["answers"]["positive"]
if answer["type"] == "refusal":
print("The model declined to answer")
else:
print(answer["noul"])
const response = await fetch("https://router.requesty.ai/v1/decisions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.REQUESTY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "openai/gpt-6-luna",
state: "The dragon heist in this fantasy novel had me hooked, but the ending dragged a little.",
questions: {
positive: { type: "noul", instructions: "The review is positive." },
},
}),
});
const { answers } = await response.json();
const answer = answers.positive;
console.log(answer.type === "refusal" ? "The model declined to answer" : answer.noul);
{
"answers": {
"genre": {
"type": "choice",
"choice": "fantasy",
"confidence": 1,
"probabilities": {
"fantasy": 1,
"mystery": 0,
"romance": 0
}
},
"positive": {
"type": "noul",
"noul": 0.73
},
"rating": {
"type": "score",
"score": 3.1,
"confidence": 0.87,
"probabilities": [
{ "value": 0, "probability": 0.01 },
{ "value": 1, "probability": 0 },
{ "value": 2, "probability": 0 },
{ "value": 3, "probability": 0.86 },
{ "value": 4, "probability": 0.13 }
]
}
},
"id": "rqsty-dcsn-15e2efde-f7c6-49cb-92ae-c763b1b16193",
"model": "gpt-6-luna",
"provider": "openai",
"usage": {
"input_tokens": 424,
"output_tokens": 0
}
}
{
"answers": {
"positive": {
"type": "refusal"
}
},
"id": "rqsty-dcsn-75924058-d3b3-471a-b19c-4e003550bcc7",
"model": "gpt-6-luna",
"provider": "openai",
"usage": {
"input_tokens": 5,
"output_tokens": 0
}
}
/v1/models/decision. See Decisions for the question types.
Every answer has a type. A model can decline a question and return {"type": "refusal"} for it, so check type before reading the value. See OpenAI’s Decisions guide.
Responses are not streamed.
Images
cloudflare/clef and openai/gpt-6-luna also look at images. Send them in images as base64 data URLs. Remote image URLs are rejected.
curl https://router.requesty.ai/v1/decisions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_REQUESTY_API_KEY" \
-d '{
"model": "openai/gpt-6-luna",
"state": "Listing title: Red leather armchair",
"images": ["data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD..."],
"questions": {
"matches_title": {
"type": "noul",
"instructions": "The photo shows the item in the title."
},
"color": {
"type": "choice",
"instructions": "What is the main colour in the photo?",
"criteria": {
"red": "Red",
"green": "Green",
"blue": "Blue"
}
}
}
}'
{
"answers": {
"color": {
"type": "choice",
"choice": "red",
"confidence": 0.99,
"probabilities": {
"blue": 0,
"green": 0.01,
"red": 0.99
}
},
"matches_title": {
"type": "noul",
"noul": 0.52
}
},
"id": "rqsty-dcsn-b57050ea-7298-4d59-a0b0-ffc87db60fe8",
"model": "gpt-6-luna",
"provider": "openai",
"usage": {
"input_tokens": 287,
"output_tokens": 0
}
}
Authorizations
API key for authentication
Body
application/json
A decision model ID from /v1/models/decision.
Example:
"openai/gpt-6-luna"
The content to evaluate: a string, an object or an array.
Map of question ID to question. Each ID gets one entry in answers.
Show child attributes
Show child attributes
Base64 image data URLs (data:image/...;base64,...). Only for models that accept images (cloudflare/clef, openai/gpt-6-luna). Remote URLs are rejected.
Last modified on October 8, 2026
Was this page helpful?