ASKWITHAI_API_KEY.
TypeScript SDK (@askwithai/sdk)
@askwithai/sdk provides a typed client, Zod-validated decisions with createDecision, receipt formatting, and a faux server (@askwithai/sdk/testing) for fast local tests.
Direct client call
Typed decisions with Zod
UsecreateDecision to validate answers at runtime and get full TypeScript inference:
What is an idempotencyKey?
A unique ID you attach to a request (like an
order_id). If your app retries the same call after a network hiccup, AskWithAI returns the original decision instead of running the models twice.The askwithai CLI
The askwithai command ships with @askwithai/sdk and covers the full Decision API from your terminal or CI pipeline.
Decision API (HTTP)
Call any runtime from Python, Go, Ruby, or any HTTP client using a Bearer token.POST /v1/decide/{owner}/{runtime}
Reporting real outcomes
Send real-world results toPOST /v1/decisions/{id}/outcome once a decision’s outcome is known: