curl --request POST \
--url https://api.opper.ai/v3/compat/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "<string>",
"model": "gpt-6-luna",
"questions": [
{
"instructions": "<string>",
"type": "predicate",
"name": "<string>"
}
]
}
'import requests
url = "https://api.opper.ai/v3/compat/decisions"
payload = {
"input": "<string>",
"model": "gpt-6-luna",
"questions": [
{
"instructions": "<string>",
"type": "predicate",
"name": "<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({
input: '<string>',
model: 'gpt-6-luna',
questions: [{instructions: '<string>', type: 'predicate', name: '<string>'}]
})
};
fetch('https://api.opper.ai/v3/compat/decisions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"answers": [
{
"probability": 0.5,
"type": "predicate",
"name": "<string>"
}
],
"model": "<string>",
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"total_tokens": 1
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}Decisions
OpenAI Decisions-compatible synchronous evaluation. Send model, input (a string, or user messages with input_text and inline base64 input_image parts) and typed questions (predicate, choice, score); answers come back in question order with probabilities and confidence; a question the model declines comes back as a refusal answer. A bare model name is OpenAI’s, e.g. gpt-6-luna, which is called natively and answers with OpenAI’s body unchanged. Other decision models are addressed by their full catalog ID, e.g. typesafe/jev-latest, opper/kev-4b or greenpt/metis (list available endpoints with GET /v3/models?type=evaluation); those are reached by translation to System One and accept text input only, except empiriolabs/aplomb-1, which takes the images too. GreenPT Metis receives all 1–32 questions together in one upstream request. Translation preserves question order, probabilities and confidence, but joins text-message boundaries and does not expose native impact, score legends or additional answer metadata; use the System One endpoint for the native contract. Billed on input tokens. Uses a project-scoped Opper API key, Comply policies and provider entitlements. Cost and generation ID are returned in headers. Streaming is unsupported.
curl --request POST \
--url https://api.opper.ai/v3/compat/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "<string>",
"model": "gpt-6-luna",
"questions": [
{
"instructions": "<string>",
"type": "predicate",
"name": "<string>"
}
]
}
'import requests
url = "https://api.opper.ai/v3/compat/decisions"
payload = {
"input": "<string>",
"model": "gpt-6-luna",
"questions": [
{
"instructions": "<string>",
"type": "predicate",
"name": "<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({
input: '<string>',
model: 'gpt-6-luna',
questions: [{instructions: '<string>', type: 'predicate', name: '<string>'}]
})
};
fetch('https://api.opper.ai/v3/compat/decisions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"answers": [
{
"probability": 0.5,
"type": "predicate",
"name": "<string>"
}
],
"model": "<string>",
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"total_tokens": 1
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}Authorizations
API key authentication. Pass your API key as a Bearer token.
Headers
Function name for tracing and project-level guardrail function-scope filtering.
Parent span ID for distributed tracing context.
Comma-separated key:value usage-attribution tags (e.g. tenant:acme,project:demo, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); opper.-prefixed keys and session_id are reserved. Malformed values return 400.
Body
1"gpt-6-luna"
1- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Accepted for compatibility with OpenAI's API, then dropped: Opper neither forwards nor stores it. Requests to OpenAI carry Opper's own identifier for your project.