Single-Question Decision
POST https://api.bipkit.io/api/v1/decideAuthorization: Bearer bpk_live_YOUR_API_KEYContent-Type: application/jsonRequired Scope: evaluate:run
Use POST /api/v1/decide when you only need a single categorical classification without constructing a multi-dimensional evaluations map.
Request Body Parameters
Section titled “Request Body Parameters”| Field | Type | Required | Description |
|---|---|---|---|
state |
string |
Yes | Text or context to classify. |
choices |
array |
Yes | Candidate objects ({ "id": "...", "label": "..." }). |
engine |
string |
No | "bip-instant" or "bip-cascade". |
top_k |
integer |
No | Maximum ranked candidates to return in decisions. |
Example Request
Section titled “Example Request”import { Bipkit } from "@bipware-org/bipkit";
const bipkit = new Bipkit();
const decision = await bipkit.decide({ state: "Can you refund my subscription? I was billed twice.", choices: [ { id: "billing", label: "Billing & Subscriptions" }, { id: "tech_support", label: "Technical Support" }, { id: "general", label: "General Inquiry" }, ], engine: "bip-instant", top_k: 3,});
console.log(decision.top_choice, decision.uncertainty_entropy);from bipkit import Bipkit
client = Bipkit()
decision = client.decide( state="Can you refund my subscription? I was billed twice.", choices=[ {"id": "billing", "label": "Billing & Subscriptions"}, {"id": "tech_support", "label": "Technical Support"}, {"id": "general", "label": "General Inquiry"}, ], engine="bip-instant", top_k=3,)
print(decision.top_choice, decision.uncertainty_entropy)topK := 3res, err := client.Decide(ctx, bipkit.DecisionRequest{ State: "Can you refund my subscription? I was billed twice.", Choices: []any{ bipkit.Candidate{ID: "billing", Label: "Billing & Subscriptions"}, bipkit.Candidate{ID: "tech_support", Label: "Technical Support"}, bipkit.Candidate{ID: "general", Label: "General Inquiry"}, }, Engine: "bip-instant", TopK: &topK,})use bipkit::{Candidate, DecisionRequest};use serde_json::json;
let decision = client .decide(&DecisionRequest { state: "Can you refund my subscription? I was billed twice.".into(), choices: vec![ json!(Candidate { id: "billing".into(), label: Some("Billing & Subscriptions".into()), description: None }), json!(Candidate { id: "tech_support".into(), label: Some("Technical Support".into()), description: None }), json!(Candidate { id: "general".into(), label: Some("General Inquiry".into()), description: None }), ], engine: Some("bip-instant".into()), top_k: Some(3), temperature: None, }) .await?;curl -X POST https://api.bipkit.io/api/v1/decide \ -H "Authorization: Bearer bpk_live_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "state": "Can you refund my subscription? I was billed twice.", "choices": [ { "id": "billing", "label": "Billing & Subscriptions" }, { "id": "tech_support", "label": "Technical Support" }, { "id": "general", "label": "General Inquiry" } ], "engine": "bip-instant", "top_k": 3 }'