How we saved $4,300 per month using OpenAI's Decisions API

Takeaways from migrating our image classifier from GPT-5.5 to OpenAI's Decisions API

Earlier this month, we realized that one of the models we were using to classify media sent by users to our agents was costing us even more than our hard reasoning models. We were using GPT-5.5 to pick which scenario an image matched before passing it to the agent. Think of it as a gateway that decides which instructions the main model gets for that media. It was 52% of our whole OpenAI bill.

Before: every image or file went to GPT-5.5. If it fit a scenario, the agent got that scenario's instructions. If not, the agent was told it can't process this. About 3.5 seconds and $0.037 per image. USER MESSAGE ImageDocumentText, if any GPT-5.5 structured output fits Agent scenario instructions no fit “Can't process this”

We realized that this was:

When OpenAI released its Decisions API (its take on decision models like TypeSafe's Jev, which make fast, structured decisions for software instead of generating conversational text), we took the initiative to use it as a gateway to decide whether the media should be passed to the model first, avoiding an expensive call. After doing some evaluations, here are the takeaways and implementation details from this migration.


The approach

The Decisions API lets you categorize or classify an input, like an image and a message, into answers you define. According to OpenAI [1], it is “up to 10x faster than GPT‑6 Luna through the Responses API”, and it only charges for input tokens.

It comes in three types:

TypeUse it whenExample
predicateOne condition decides whether to act, and you set the cutoff on its probability"Is the customer asking to talk to a human?"
choiceYou need exactly one label from a list with no order"Which issue does this screenshot show: payment error, order status, promo card, or none?"
scoreYou need a position on an ordered scale, like severity"How frustrated is the customer: calm, annoyed, or angry?"

At Semantiks, we let the customers set up scenarios for the media that their clients might send. This could be for limiting the agent from processing certain images, invoices, types of files, certain content, among others.

With the Decisions API: the user's media goes to one choice question over the company's scenarios plus none. It picks scenario_2 with a confidence score, and the agent gets that scenario's instructions for the PDF or image. User Decisions API ONE CHOICE QUESTION scenario_1 scenario_2 scenario_3 scenario_4 scenario_5 none scenario_2 picked CONFIDENCE 0.90 Agent PDF · IMAGE · …
One choice question per media message. The agent only gets the instructions for the scenario that was picked.

For this reason, since these scenarios don't follow any order, choice was a great fit, especially because the Decisions API accepts images and runs on GPT-6 Luna, which has a 1,050,000-token context window. It allowed us to pass a "none" option whenever the conditions weren't met.

Besides these two criteria, we moved forward with the Decisions API for these additional reasons:

  1. It decides before the expensive call happens. It met the scope before passing the criteria to the model, avoiding an expensive call
  2. It supports our data policies: Zero Data Retention and Private Safety Processing
  3. It met our latency goal: under 1 second (0.73 s on average in production)

Had we needed to rate media on an ordered scale, like how severe an issue is, we would have moved forward with score. But since this was more of a gateway, a single pick from the list, which still comes with a confidence, was all we needed.


Implementation

We used LangChain's middleware hook to run the decision between the human input message and the LLM node, and called the Decisions API directly inside it.

Think of a scenario where we have to decide whether an image is an invoice, a withdrawal screen, or a user profile page. For these choices, given certain conditions, the LangChain snippet would look something like this:

Python · adapted from LangChain's docs
from langchain_core.messages import HumanMessage
from langchain_openai.decisions import Choice, OpenAIDecisions

decisions = OpenAIDecisions(model="gpt-6-luna")

message = HumanMessage(content=[
    {"type": "image", "base64": image_b64, "mime_type": "image/jpeg"},
    {"type": "text", "text": "Why can't I withdraw my money?"},
])

response = decisions.invoke({
    "input": message,
    "questions": {
        "scenario": Choice(
            instructions="Pick the media scenario this image matches.",
            choices={
                "invoice": "An invoice or billing document",
                "withdrawal": "Withdraw-money screen with the amount and payout method",
                "user_profile": "User profile or account details page",
                "none": "No scenario matches",
            },
        ),
    },
})

answer = response.choices["scenario"]
print(answer.choice, answer.confidence)  # withdrawal 0.9

Additionally, LangChain's ready-made wrapper makes it super easy to set up. Plain text and images go through untouched, and anything richer, like a whole conversation or a JSON object, gets serialized for you while base64 images stay in place. Keep in mind it's still in beta.


Monitoring and evals

When migrating, we compared performance, latency, and how accurately each model matched the scenarios. In production, this classifier handles more than 120,000 images a month across our customers' scenarios. For the comparison, we replayed 50 real image turns from production on both models, with the same scenarios. The Decisions API picked the same scenario as GPT-5.5 in 100% of them, but 90% were "none", so only 10% were real matches.

GPT-5.5Decisions API
Time per decision3.5 s0.73 s
Cost per decision$0.037$0.00077
Monthly cost$4,397≈ $92

We used Datadog's Agent Observability to trace our agents and track the average latency of these models. Here we can see a comparison of the previous model against the Decisions API in our services:

Datadog LLM span for the GPT-5.5 image classifier on Nov 20: OpenAI.parseChatCompletion, 2.00 s, estimated cost 0.72 cents, 7.12k input tokens; prompt text blurred.
Before · Nov 20. GPT-5.5 classifier span: 2.00 s and 0.72¢ for one image. Prompt text blurred.
Datadog APM flame graph on Nov 26 with the agent.scenario_classifier span at 753 ms inside an agent turn; service legend, trace ID and attributes blurred.
After · Nov 26. Decisions API classifier span: 753 ms inside a production agent turn. Service names, trace ID and attributes blurred.

Takeaways

  1. Use a decision model when you need to filter whether a request should be passed to a more expensive model. Our image classifier was 52% of our OpenAI bill, and moving it to the Decisions API made each decision about 48x cheaper.
  2. Decision models are faster and less expensive: 0.73 s instead of 3.5 s per decision, and with OpenAI's Decisions API you only pay for input tokens.
  3. Use them to block domain-specific content you wouldn't want your customers to send, or wrong data you wouldn't want to process, before it ever reaches your main model.
  4. Pick the simplest answer type that does the job. Score is for ordered levels; for a gateway, a single choice was enough.

Sources

  1. OpenAI: Build more responsive apps with the Decisions API
  2. LangChain: OpenAI Decisions integration

Work with us

If you're interested in learning more about how we at Semantiks help our customers control what their agents process, like which images, files and content reach the model, please reach out to eduardo@semantiks.ai or book a meeting here! We'd be happy to hear about your use cases.