Get access and keep the key server-side

Use the official console to check your account access and obtain an API key. This site cannot issue keys or approve accounts. The launch announcement described early access; current availability is determined by TypeSafe.

Store the key in an environment variable named TYPESAFE_API_KEY. Do not put it in a public browser bundle or paste it into a shared example. The request below is for a terminal or a server.

Ask one clear question

Start by detecting whether a message explicitly asks to cancel a subscription. This is a bounded yes/no judgment, so it fits a Noul question. The following is an original example based on the documented HTTP interface.

EXAMPLE
curl https://api.typesafe.ai/v1/systemone \
  --request POST \
  --header "Authorization: Bearer $TYPESAFE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "jev-latest",
    "state": {
      "message": "Please end my monthly plan after this billing period."
    },
    "questions": {
      "cancellation": {
        "type": "noul",
        "instructions": "Does the message explicitly request cancellation of a subscription?"
      }
    }
  }'

This guide does not execute the request. It illustrates the documented contract and does not promise a particular returned probability.

Read the result before taking action

The corresponding answer lives under answers.cancellation; a Noul answer contains noul, a number between zero and one. The response also identifies the model that served the request. See the official quick start for a complete response example.

A high value can flag the message for a cancellation workflow. It should not, by itself, cancel an account. Your application still needs to identify the account, check the requester's authority and apply its normal business rules.

For an initial experiment, print the result and review it alongside the input. Add actions only after you understand the failure cases.

Make failures visible

Handle an HTTP error before trying to read an answer. Authentication problems, rate limits and timeouts are different conditions. Do not quietly replace an unavailable model response with a confident default.

A useful first fallback is to leave the item unclassified and retry or review it later. Once you move to an SDK, check its retry behavior to avoid wrapping it in another uncontrolled retry loop.

Expand one dimension at a time

Add a department selection as a Choice question, or an ordered urgency rubric as a Score. Keep independent questions explicit. If a later question depends on an earlier answer, put that dependency in your application flow rather than assuming questions in the same call see each other's results.

Continue with Choice, Score or Noul?, or use the TypeScript and Python examples.