Skip to main content
Some models don’t chat. You send them some input and a list of typed questions, and they send back a typed answer to each one, such as true or false, one choice from a list, or a score. That’s useful for routing support tickets, flagging content, or scoring urgency without parsing free-form text. ngrok.ai serves two of these APIs: You can pay with credits for both, or bring your own provider key for OpenAI or Typesafe AI.

Decisions requests

A Decisions request has an input, in the same message format as the Responses API, and an array of questions. Each question has a type (predicate, choice, or score), a name, and instructions.
The response has an answers array with one entry per question. A predicate answer has the probability that it’s true. A choice answer names the choice it picked, with a probability for each option:
The gateway forwards model, input, questions, and safety_identifier. It removes any other top-level field and names it in the Ngrok-AIG-Removed-Params response header. See OpenAI’s Decisions guide for every question type and option. "model": "ngrok/auto" also works and always picks gpt-6-luna. Any other model returns ERR_NGROK_27226, because no other model serves Decisions. When you pay with credits, OpenAI bills a decision on input tokens only, at gpt-6-luna’s input rate.

Typesafe AI requests

A System One request has a state, the text to evaluate, and a questions object that maps each question ID to a typed question.
The response maps each question ID to its answer, with a calibrated probability:
The gateway forwards model, state, and questions, and removes any other top-level field. See the Typesafe AI API reference for question types such as choice and score, and the Typesafe AI provider page for setup. Name a Jev model in the request. ngrok/auto doesn’t pick Jev models, so it returns ERR_NGROK_27227 on this endpoint.

What’s different from chat requests

Both APIs differ from Chat Completions and Messages in a few ways:
  • No streaming: A request with "stream": true returns ERR_NGROK_27228 before reaching the provider.
  • No fallback list: The gateway reads only model. Each API has a single provider, so a models list is removed rather than used.
  • POST only: Each API has a single create endpoint. Other methods and paths below it return an error.
  • Same billing model: Every request pays the processing fee. When you pay with credits, credits also cover the model cost.

Next steps

  • Typesafe AI: Set up Typesafe AI with credits or your own key
  • OpenAI: Set up OpenAI with credits or your own key
  • How it works: Read the gateway’s response headers