Skip to main content
POST
Make structured decisions
Use POST /v1/decisions when your application needs structured answers that code can consume directly. Phaseo exposes TypeSafe’s Jev 1.13 as typesafe/jev. The request contains:
  • state: a string, object, or array containing the information to evaluate.
  • questions: a map of named questions. Each question is noul, choice, or score and must include instructions.
  • model: the Phaseo model ID. Use typesafe/jev for Jev 1.13.
Answers use the same keys as questions. choice answers include the selected option, probabilities, and confidence; noul answers include a 0–1 probability; and score answers include a probability-weighted score, legend, probabilities, and confidence. You can mix all three question types in one request. See the Quickstart for copy-pasteable cURL, JavaScript, TypeScript SDK, and Python SDK examples. Jev 1.13 is billed at $0.042 per 1M input tokens; output tokens are free. For the upstream question semantics, see TypeSafe’s API reference.

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

application/json
model
string
default:typesafe/jev
required

Canonical Phaseo model id or provider model alias.

state
required

Structured state evaluated by the model.

questions
object
required
meta
boolean
default:false
echo_upstream_request
boolean
debug
object

Gateway debug controls. These flags are never forwarded upstream.

provider
object

Provider routing preferences for gateway selection.

routing
object

Provider routing preferences for gateway selection.

metadata
object

Response

200 - application/json

Structured decisions response

model
string
answers
object
usage
object
request_id
string | null
meta
object
Last modified on September 18, 2026