OhMyGPT

Create decision

POST
/v1/decisions

Answers classification and scoring questions about an input with typed answers and probabilities instead of generated text. OpenAI Decisions and Gemini Decisions share this endpoint, and the shape of questions tells them apart. An array is an OpenAI Decisions request, and an object keyed by question name is a Gemini Decisions request. Each request and response follows its provider's format. Billing follows the token usage the model reports, at the prices in GET /v1/models.

Authorization

headerAuthorization<token>

Request Body

application/json
  1. body
input*|array<|||||||>

The input to evaluate for every question. Provide a text string or an ordered array of messages, function calls and outputs, or custom tool calls and outputs. Each tool output must identify a matching call by call ID.

model*string

The model to use. Only gpt-6-luna is supported.

Length0 <= length <= 1048576
prompt_cache_key?|

Partition prompt cache reuse by caller-provided key.

Length0 <= length <= 64
prompt_cache_options?|

Options for prompt caching. Supported for gpt-5.6 and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with prompt_cache_breakpoint. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set mode to explicit to disable the implicit breakpoint. The ttl defaults to 30m, which is currently the only supported value. See the prompt caching guide for current details.

questions*array<||>

Ask 1–400 questions about the input. Each question can be a predicate, choice, or score. Answers come back in the same order.

Items1 <= items <= 400
safety_identifier?|

Opaque caller-provided end-user identifier, scoped by the verified org. Match Responses' limit; this is never the authenticated user identity.

Length0 <= length <= 128

Response Body

Successful response

application/json
  1. response
answers*array<|||>

Answers in question order. Any question can return a refusal instead of an answer; other questions can still receive answers. A refusal has type: "refusal" and the question's name, or null if it was unnamed.

Items0 <= items <= 2000
model*string

The model used.

Length0 <= length
usage*

Token usage for the request.

Example Request
curl -X POST 'https://api.ohmygpt.com/v1/decisions' \  -H 'Content-Type: application/json' \  -d '{  "input": "string",  "model": "string",  "questions": [    {      "instructions": "string",      "type": "predicate"    }  ]}'
Example Response
{  "answers": [],  "model": "string",  "usage": {    "input_tokens": -2147483648,    "input_tokens_details": {      "cache_write_tokens": -2147483648,      "cached_tokens": -2147483648    },    "output_tokens": -2147483648,    "output_tokens_details": {      "reasoning_tokens": -2147483648    },    "total_tokens": -2147483648  }}

Was this page helpful?

Still stuck? Live chat · [email protected] · Telegram group