Before you begin
- An HTTP client such as cURL,
fetch, or Pythonrequests. - A question with a finite set of valid answers.
Authorization header, so you can make your first request without a dashboard, account console, or credential.
Send a decision
1
Choose the model and outcomes
Pick a model identifier, write the context as
input, and write the question as instruction. Provide at least two unique choices.2
Send JSON to the decisions endpoint
Use
POST https://api.aspaslabs.com/v1/decisions with Content-Type: application/json.3
Read the typed result
A successful response contains the request ID, the model, the selected
choice, its confidence, a probabilities object, and token usage.200 OK
Request rules
The request must includemodel, input, and instruction. It must include exactly one of:
choices: an inline array containing 2–300 unique, non-empty strings.catalog: the ID of an existing catalog.
choices and catalog cannot be sent together. The model is selected in the body, not by changing the route.
The free path uses inline choices and does not require a bearer key. A catalog can be used after a protected catalog has been created with the catalog API.
What to do next
Understand the decision contract
Learn how choices, catalogs, confidence, and probabilities fit together.
Use protected catalog endpoints
Learn when a bearer key is needed for catalog creation and management.
Create a reusable catalog
Move stable choices out of individual requests and reuse them by ID.
Handle errors and retries
Implement request IDs, rate-limit backoff, and actionable error handling.