Decisions
Get typed answers to questions about text and image inputs.
Get typed answers to questions about text and image inputs.
Note: Currently supported only with GPT 6 Luna from the OpenAI provider.
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
Request for typed answers to questions about the input.
modelstringRequiredExample:
Decision model identifier. Currently only GPT 6 Luna from the OpenAI provider is supported.
GPT 6 Lunainputone ofRequired
Text string or a list of user messages with text and inline base64 images.
stringOptional
Other propertiesanyOptional
Responses
200
Typed answers to the requested questions.
application/json
Other propertiesanyOptional
400
Invalid request data.
402
The company has run out of AI credits. Returned when the company's budget limit has been reached.
application/json
422
Upstream validation error.
500
Server error.
post/v1/decisions
POST /v1/decisions HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 329
{
"model": "GPT 6 Luna",
"input": "I was charged twice for my order.",
"questions": [
{
"type": "choice",
"name": "department",
"instructions": "Which department should handle this complaint?",
"choices": [
{
"value": "billing",
"description": "Payments, invoices, and refunds."
},
{
"value": "technical",
"description": "Problems using the product."
}
]
}
]
}{
"answers": [
{
"type": "choice",
"name": "department",
"choice": "billing",
"probabilities": [
{
"value": "billing",
"probability": 0.95
},
{
"value": "technical",
"probability": 0.05
}
],
"confidence": 0.93
}
],
"usage": {
"input_tokens": 142,
"output_tokens": 0
}
}Last updated

