Skip to main content
POST
Create Decisions

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

TypeSafe's POST /v1/systemone request body, plus minimal Eden extensions.

Unknown top-level fields are forwarded to the provider (extra="allow" via the base mixin, which also rejects connection keys).

routing (from ProviderRoutingBody) and fallbacks are declared so prepare_input reads them validated. Routing policies, router_candidates and session_id are not supported on decisions; chat, Responses and Anthropic Messages accept them.

state
required

The content to decide about: a plain string, or a JSON object / array of related context.

questions
Questions · object
required

Typed questions keyed by name: noul (yes/no probability), choice (one of the criteria keys) or score (position on the ordered criteria rubric).

model
string
required

Model identifier in 'provider/model' format, e.g. 'typesafe/jev-latest'.

tags
any

Up to 10 key/value labels recorded with this call, for filtering and grouping usage. Merged with the X-EdenAI-Tags header.

Example:
routing
ProviderRoutingPreferences · object | null

How to pick between the providers that serve the requested model. Applies when model is a model name with no provider prefix (e.g. 'gpt-5.5'); ignored for a concrete 'provider/model' id, which already names its provider, except zero_data_retention, which holds every model in the request to it. With model='@edenai' the platform chooses the model too: quality_cost steers that choice, and the provider fields apply whenever the chosen model is a provider-less name.

fallbacks
string[] | null

Decision models to try, in order, if the primary model fails. Each is a 'provider/model' id or a model name with no provider prefix. Example: ['typesafe/jev-latest'].

Maximum array length: 7
metadata
Metadata · object | null

Arbitrary metadata attached to the request.

extra_headers
Extra Headers · object | null

Additional HTTP headers forwarded to the provider API.

extra_body
Extra Body · object | null

Additional body fields forwarded to the provider API.

Response

Successful Response

TypeSafe's response (typed answers, usage, request id) + Eden cost and provider.

model
string
required
answers
Answers · object
required
usage
DecisionUsage · object
required
cost
number | null
provider
string | null
id
string | null

TypeSafe request id (x-typesafe-request-id).