HTTP API REFERENCE

Jev API Reference

Reference for POST /v1/systemone: authentication, state, Choice, Score and Noul questions, response fields, usage, and gateway limits.

Endpoint and authentication

Send JSON to the Best Jev AI gateway. API-key requests use Bearer authentication; keep the key on a trusted server and never expose it to a browser.

POST https://bestjevai.com/v1/systemone
Authorization: Bearer <API_KEY>
Content-Type: application/json

Request fields

A request contains a model identifier, the state shared by its questions, and a map of question IDs to typed decisions. State may be a string, object, or array. The gateway accepts 1–8 questions per request and rejects serialized request bodies over 32 KiB.

  • model — required string; use typesafe/jev-1.13 for this gateway.
  • state — decision context shared by every question.
  • questions — non-empty object keyed by IDs you choose.
  • choice — select from a criteria object of named options.
  • score — evaluate an ordered criteria array.
  • noul — estimate whether a yes/no statement is true; provide instructions and optional yes/no criteria.
{
  "model": "typesafe/jev-1.13",
  "state": "Three deployments failed and production returns 500s.",
  "questions": {
    "needs_human": {
      "type": "noul",
      "instructions": "Does this incident need immediate human review?"
    }
  }
}

Response fields

The gateway wraps provider answers and usage in data.result and reports creditsUsed for API-key requests. Choice and Score include probabilities and confidence; Noul returns a 0–1 value. Use question IDs to match answers to their request definitions.

{
  "code": 0,
  "message": "ok",
  "data": {
    "result": {
      "answers": {
        "needs_human": { "type": "noul", "noul": 0.94 }
      },
      "usage": { "input_tokens": 42, "output_tokens": 0 },
      "elapsedMs": 180
    },
    "creditsUsed": 1
  }
}

elapsedMs measures this gateway request, including validation and network time; it is not a provider-only latency measurement.

Related developer guides

Open the Playground