I not too long ago coated TypesafeAI’s JEV in TDS (hyperlink on the finish). JEV makes quick choices, similar to classifying content material or selecting the following step in a workflow, and returns typed solutions that software program can use instantly. The accompanying possibilities assist an software determine whether or not to behave on a solution or go it to an individual for overview.
The web went a bit loopy over JEV, so it was no shock to see rival merchandise seem after its launch. Among the many most distinguished was the Selections API that OpenAI previewed at its current DevDay and made accessible as a public beta shortly after.
On this article, I’ll have a look at the brand new API, tips on how to get it, and a few sensible use-case examples, and I’ll let you already know whether or not I believe it’s a JEV killer or whether or not TypesafeAI can sleep soundly at night time.
The background to JEV-like fashions
Suppose you run a web based store. A buyer writes to say that their keyboard arrived with three damaged keys and asks for a substitute. Earlier than anybody replies, your software must determine which crew ought to deal with the message.
You may ask a language mannequin to categorise it and return JSON. However the software solely wants a class and sufficient data to determine whether or not to belief that class. That course of may be comparatively gradual and dear if it needed to deal with 1000s of requests.
OpenAI’s Selections API offers that operation its personal endpoint. Moreover, OpenAI claims its Selections API could make choices as much as ten instances quicker than GPT-6 Luna, the LLM that Selections relies on, via the Responses API. To discover the way it works, we’ll stroll via three Python examples and evaluate OpenAI’s method with TypesafeAI’s JEV mannequin.
One main benefit of the Selections API over JEV is that it will probably deal with photos. We’ll see an instance of that later.
What the OpenAI Selections API returns
A request provides a mannequin, some enter and a listing of questions. The present beta helps the gpt-6-luna LLM. Questions share the enter, which might comprise textual content, photos or each.
There are three query sorts:
These fields are outlined within the SDK’s response sorts. A predicate doesn’t return a Boolean: your code chooses the brink that turns its chance into an motion.
The API returns solutions in query order. It might probably additionally refuse particular person questions, so examine a solution’s kind earlier than studying its different fields.
Defining the accessible solutions is a part of designing the appliance. Suppose your selections are solely billing and supply, however the buyer asks about opening hours. Neither response is acceptable, however including a normal class offers the system a wise place to route that request. Take a look at the classes in opposition to actual buyer messages, together with requests that don’t match any of them.
With the Selections API, you select from three query sorts: predicate, selection and rating. Every returns an outlined reply format, together with possibilities. If it is advisable to extract an bill quantity, a buyer identify and a listing of bought objects into your personal JSON construction, use Structured Outputs with the Responses API.
When to make use of the Selections API and what it prices
A help system processing hundreds of messages could solely want a queue identify earlier than passing every request to the fitting crew. The Responses API can produce that reply, however the Selections API gives a devoted interface for questions with outlined solutions: a sure/no chance, a selection from a listing or a rating in opposition to a rubric.
You ship these inquiries to /v1/choices and use the returned solutions in your software logic. That makes it a helpful choice for routing messages, deciding on a search index or selecting an agent’s subsequent motion from a permitted listing.
It additionally has separate pricing. At launch, OpenAI lists $0.10 per million enter tokens, with no costs for output tokens, cache reads, or cache writes. Lengthy-context multipliers and regional processing premiums nonetheless apply.
As a easy calculation, a million requests averaging 1,000 billable enter tokens would price $100 at that base fee. Embody the questions and their descriptions when estimating enter measurement.
A activity that wants a written rationalization or an extracted object with arbitrary fields nonetheless wants a technology interface. It doesn’t make sense to squeeze an bill extraction downside into twenty classification questions simply because the endpoint is quick.
Equally, preserve easy guidelines in Python. If precedence relies upon solely on an order complete exceeding £500, for instance, evaluate the quantity instantly in Python code itself. A mannequin turns into helpful when the enter expresses one thing your guidelines can’t simply recognise, similar to a buyer describing the identical fault in a number of alternative ways. Even then, the additional community name should save sufficient downstream work to justify its latency.
Arrange Python with the API
The official openai-python repository added Selections help in model 3.26.0. Set up that model in your setting:
You’ll want an OpenAI API key. For those who don’t have already got one, it is advisable to be sure to have registered with OpenAI and added a fee technique with some credit score to your account. Afterwards, go to https://platform.openai.com/dwelling. On the left facet of the display, you’ll see an API keys hyperlink. Click on on that and observe the directions to create a brand new secret key.
Set the OPENAI_API_KEY setting variable to your API key. Try this in PowerShell like this:
Every instance under is an entire, standalone Python program with its personal imports and shopper setup.
The SDK implementation exposes shopper.choices.create() and sends the request to the /v1/choices endpoint. That is the shopper implementation; inference runs on OpenAI’s service.
Save every program utilizing the filename proven in its part, then run it instantly with Python. The three information work independently. Every program makes a billable API request if you run it.
Code instance 1: Routing a help request
Our store has three specialist queues and a normal queue for something that doesn’t match. Create a file named decisions_route.py and add this code.
The (appropriate) output to my query a couple of damaged keyboard was:
Once I requested a special query within the code,
I acquired this output, which is appropriate once more.
The selection objects comprise values and descriptions, as specified within the SDK’s request sorts. Descriptions allow us to distinguish broken items from a supply that by no means arrived.
The 0.8 threshold is illustrative. It isn’t an OpenAI advice, and it doesn’t set up an 80% success fee. Begin with messages folks have already labeled, and measure errors at a number of thresholds earlier than you determine in your threshold.
Code Instance 2: Verify a doc for lacking data
Suppose workers write return directions in a number of codecs. We wish to flag directions that omit both a deadline or a postal deal with. Create the file decisions_document.py with this content material.
My output was:
The wording is essential. Being advised to request an deal with isn’t the identical as being given one. A seek for the phrase deal with would miss that distinction.
Each questions can share one request as a result of neither will depend on the opposite’s reply. If a later query wants an earlier outcome, make one other request after inspecting that outcome.
This checks whether or not data seems within the textual content. Checking whether or not an deal with exists or whether or not a deadline matches your corporation guidelines wants separate validation.
Code Instance 3: Examine a product {photograph}
Our final instance makes use of three photos of a parcel, one closely broken, one with slight harm and the opposite utterly undamaged. We’ll see if the mannequin can distinguish between broken/undamaged. Listed below are the photographs I used. All had been in .PNG format.



Place all three photos in the identical location because the Python scripts, known as, say, undamaged.png, heavy_damage.png and slight_damage.png. Subsequent, create a file known as decisions_image.py with this code.
Photos should use inline information URLs; extraordinary internet URLs and file IDs aren’t accepted. The endpoint helps as much as 128 photos per request, and its message enter helps solely the consumer function with textual content and picture components.
Listed below are my outputs:
That final outcome shocked me. The package deal was solely barely broken, however the mannequin recognized it with excessive chance. That’s fairly spectacular, although I settle for that even slight harm might be seen and will result in a excessive rating.
Abstract: How Selections compares with JEV
JEV addresses the same programming downside to the Selections API. Its interface evaluates shared state utilizing three primitives: Noul, Selection, and Rating. Noul returns the chance of a sure/no reply, making it the closest equal to OpenAI’s predicate, which we utilized in examples 2 and three. JEV’s selection primitive is essentially the identical as OpenAI’s, which we utilized in our first instance.
The merchandise behind these interfaces differ. OpenAI exposes GPT-6 Luna via a specialised endpoint. TypeSafeAI describes JEV as a mannequin constructed for choices, with a parallel sampler and Reinforcement Studying for Calibrated Selections, or RLCD.
The sensible comparability, as of early October 2026, seems to be like this:
JEV’s listed enter token price is 58% decrease, though completely different tokenisation and request sizes have an effect on the invoice. Its present context limits are 64,000 tokens for the entire request and 32,000 for the state plus the longest query.
TypeSafeAI studies 70–500 millisecond response instances in its launch put up. Throughout my testing of the OpenAI Selections API, response instances typically bumped into a number of seconds, however I didn’t time a direct comparability between the 2 merchandise.
For each programs, Python nonetheless controls what occurs subsequent after the fashions return their outcomes. Hold arithmetic and stuck enterprise guidelines in extraordinary code, and use a generative mannequin when the duty is extra ambiguous and desires a written rationalization.
So, lastly, do I believe JEV must be fearful? No, not but, at the least. In my expertise, JEV has the benefit of velocity; Selections API has the benefit of decoding photos. However how lengthy do you assume it is going to be earlier than JEV can course of photos?
You may learn my unique TDS article on JEV right here.
















