Create decision (Jev format)
POST/systemone
Preview. The same decision models in the System One format of TypeSafe Jev (POST /v1/systemone), for callers and tools migrating from Jev: state is any JSON value, questions is an object keyed by your own ids, and the question types are noul (yes or no), choice and score, with the options or levels in criteria. The answers come back under the same ids. Add "calibration": "raw" to get uncalibrated probabilities.
A question the model service cannot read is refused with HTTP 422, as Jev does; the error body is the same error object as on every other route. Access, billing (input tokens only), limits and the other errors are the same as on Create decision. See the Decisions guide.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 413
- 422
- 429
- 500
- 503
One answer per question, under the question's id.
The body is not a JSON object, or model is missing.
Missing or invalid API key.
The key is valid but cannot use the decision API (permission_denied). For now only Serenity Edge API keys can; keys from a Serenity Star account cannot yet.
The model is not a decision model (model_not_found), or the route is not enabled yet and answers like an unknown path.
The request body is larger than the gateway accepts (4 MB, or 12 MiB on orion-compass-flash and d3; request_too_large).
The model service refused the questions or the state: an unknown question type, invalid criteria, too many options, images the model cannot read, or a state longer than the model's context (code: context_length_exceeded). The message says what to fix.
Rate limit exceeded, or the service is temporarily at capacity for this model. Wait for the number of seconds in the Retry-After header before retrying.
Response Headers
Seconds to wait before retrying.
Unexpected server error: the model service returned an unexpected response (upstream_error), the request got no answer within 600 seconds (timeout), or an error in the gateway. Retry with backoff.
The model service is temporarily unavailable (upstream_unavailable). Retry later and check the status page at https://status.serenityedge.ai.