Make your first call: HTTP, Python and JavaScript
Turn one redacted text into a typed answer and inspect usage.
Where a billable call happens
Run this code in your own terminal using your account. The website does not execute paid requests, collect credentials or sell credits. Illustrative results are not measured outputs.
Minimal HTTP request
{
"model": "jev-1.13.0",
"state": "My parcel has not arrived. Please check the delivery status.",
"questions": {
"asks_shipping": {
"type": "noul",
"instructions": "Does the customer ask about delivery or shipping?"
}
}
}
Save as request.json. With the key in your environment:
curl --fail-with-body https://api.typesafe.ai/v1/systemone \
-H "Authorization: Bearer $TYPESAFE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @request.json
On PowerShell, use the supplied Python client rather than copying Bash variable and continuation syntax. examples/jev_client.py can prompt for a key without echoing it.
Official Python SDK
Use Python 3.10 or newer. Set TYPESAFE_API_KEY, save the code as first_call.py, install the dependency, then run python first_call.py.
python -m pip install typesafe-sdk
from typesafe_sdk import Noul, TypeSafeClient
with TypeSafeClient() as client:
result = client.system_one(
model="jev-1.13.0",
state="Please check the status of my undelivered parcel.",
questions={"shipping": Noul(
instructions="Is this a request about delivery?"
)},
)
print(result.answers["shipping"].noul)
Official JavaScript SDK
Use Node.js 20 or newer. Set TYPESAFE_API_KEY, save as first-call.mjs, install the dependency, then run node first-call.mjs.
Use a Node.js server environment, not a browser console.
npm install @typesafe-ai/sdk
import { choice, TypeSafeClient } from "@typesafe-ai/sdk";
const client = new TypeSafeClient();
const result = await client.systemOne({
model: "jev-1.13.0",
state: "Please check my undelivered parcel.",
questions: { queue: choice("Which queue fits this request?", {
shipping: "Delivery questions", other: "Anything else"
}) }
});
console.log(result.answers.queue.choice);
Acceptance check
Confirm the requested question ID, answer type and valid value. Log the actual model, usage and errors. Do not hard-code an illustrative probability. Live inference was not run while producing this guide; the package includes offline request and routing tests.
Sources and verification boundary
Reviewed September 19, 2026. Documentation-based guidance, not a live API or business-performance test.
TypeSafe · HTTP API →TypeSafe · Python SDK →TypeSafe · JavaScript SDK →TypeSafe · Quick start →
