Guide /
Cheaper Model for Structured Output: Gemini Flash-Lite, GPT-5 Nano or GPT-6 Luna, by Task
Gemini 3.1 Flash-Lite and GPT-6 Luna enforce JSON Schemas at a fraction of frontier prices. A guide to which fits each job, what the schema won't catch, and what 1,000 requests really cost.
The cheaper model for structured output is Gemini 3.1 Flash-Lite if you are on Google ($0.25 per million input tokens, $1.50 output) and GPT-6 Luna if you are on OpenAI ($0.10 / $0.50), with GPT-5 nano ($0.05 / $0.40) cheaper still until OpenAI shuts it down on December 11, 2026. For the full Gemini price list, including batch rates, see Curlscape's Gemini API pricing guide. All three support native, schema-enforced structured outputs, which is why they can replace Gemini 4 Carbon or GPT-6.2 Astra for extraction and fixed-label classification. Keep the frontier model for complex interpretation and as a fallback for records that fail validation, and use ordinary code, not a model, for data that is already structured.
| Your task | Pick | Keep a frontier model? |
|---|---|---|
| Serializing structured data to JSON | Code (a JSON library) | No |
| Extracting stated fields from text | Flash-Lite or GPT-6 Luna | As fallback only |
| Classifying into fixed labels | Flash-Lite or GPT-6 Luna with an enum | As fallback only |
| Interpreting long or ambiguous documents | Frontier model, unless a small one passes your test | Yes |
The one thing to understand before choosing
Both vendors now enforce your JSON Schema during generation. OpenAI's guide says Structured Outputs "constrains completed, non-refusal model output to your supplied JSON Schema"; Google's Gemini API does the same through response_format with a schema. So the shape of the output no longer depends on model size, and that is what makes small models viable here.
The values still do. OpenAI's guide says "Structured Outputs can still contain mistakes," and Google's tells developers to "always validate values in your application" and to handle "schema-compliant but semantically incorrect outputs." Every recommendation below assumes you validate values in code and measure field accuracy on your own data, because a wrong value in valid JSON passes every automatic check.
Gemini Flash-Lite pricing and structured outputs
Google's page for gemini-3.1-flash-lite describes it as "optimized for high-frequency, lightweight tasks" and lists data extraction among its uses, with structured outputs, thinking, batch and context caching all supported. Standard pricing is $0.25 input and $1.50 output per million tokens, with output including thinking; batch is $0.125 and $0.75. Both Flash-Lite models default to minimal thinking, which Google calls "near-off," and thinking tokens are billed in full and reported in total_thought_tokens.
The successor, gemini-3.5-flash-lite, costs $0.30 / $2.50. Google lists May 7, 2027 as the earliest shutdown for 3.1 Flash-Lite, with 3.5 as its replacement, and from December 1, 2026 it is also where gemini-2.5-flash traffic will be routed automatically.
On schema support, Google enforces types, enum, required, additionalProperties, numeric ranges, date formats and array lengths, but silently strips minLength, maxLength, minProperties, maxProperties, uniqueItems and contains. Very large or deeply nested schemas can be rejected with a 400 error.
GPT-5 nano structured outputs pricing
gpt-5-nano lists Structured Outputs and batch support at $0.05 / $0.40 per million tokens ($0.025 / $0.20 in batch), but it is deprecated, and OpenAI's deprecations page sets its shutdown for December 11, 2026, with gpt-6-luna as the replacement. gpt-5.4-nano ($0.20 / $1.25) is deprecated too, shutting down April 1, 2027.
gpt-6-luna, "our most efficient model for focused, high-volume tasks" in OpenAI's words, costs $0.10 / $0.50 with Structured Outputs supported. Its reasoning effort defaults to medium, and OpenAI's reasoning guide says reasoning tokens are invisible but "billed as" output tokens. OpenAI's strict mode requires every field to be required (use a null union for optional ones), additionalProperties: false and an object root, and returns an error for unsupported keywords such as allOf or if/then/else, rather than loosening the schema.
The options side by side
| Model ID | Standard in / out per 1M | Batch in / out per 1M | Thinking or reasoning |
|---|---|---|---|
| gemini-3.1-flash-lite | $0.25 / $1.50 | $0.125 / $0.75 | Minimal |
| gemini-3.5-flash-lite | $0.30 / $2.50 | $0.15 / $1.25 | Minimal |
| gpt-5-nano (shuts Dec. 11) | $0.05 / $0.40 | $0.025 / $0.20 | Billed as output |
| gpt-6-luna | $0.10 / $0.50 | $0.05 / $0.25 | Medium |
| gemini-4-carbon (frontier) | $2.00 / $10.00, doubling Dec. 1 | $1.00 / $5.00, doubling Dec. 1 | Medium |
| gpt-6.2-astra (frontier) | $8.00 / $40.00 | $4.00 / $20.00 | Cannot be none |
Prices from Google's and OpenAI's pricing pages on November 17, 2026. Every model in the table lists structured-output support, and on all of them thinking or reasoning is billed as output.
Which to pick, by situation
Your data is already structured. If you are converting database rows, API responses or spreadsheet cells to JSON, no model is cheaper or more accurate than a JSON library. A model adds cost and a non-zero error rate to a job code does exactly.
You extract stated fields on Gemini 4 Carbon. Test gemini-3.1-flash-lite first, or gemini-3.5-flash-lite if you want the model with no announced shutdown. Carbon's price doubles on December 1, which makes the test more urgent. Keep minimal thinking unless accuracy improves measurably at a higher level, and enforce string length and uniqueness rules in your own validator, since Google strips them.
You are on OpenAI, on GPT-5 nano or a frontier model. Move to gpt-6-luna. Set reasoning effort explicitly and compare none and low against the default medium on your test set, because hidden reasoning tokens are billed as output on top of the JSON itself. Nano users have until December 11.
You classify into a fixed set of labels. Put the labels in an enum. Both APIs enforce enums, OpenAI up to 1,000 values per schema, so the model cannot return a label you did not define. What it can still do is pick the wrong one, which is what your accuracy test measures.
Your documents need real interpretation. Inferring a field that is never stated, reconciling conflicting sections or applying judgement is where a small model's mistakes move from format to meaning. Start on the frontier model, and try a small one only if it passes the same test.
You run high, steady volume on one task. A model trained on your own traffic is a third option. Parsec, a small language model lab, runs a managed loop that traces production requests, builds datasets and evaluations the customer approves, retrains and serves the model, sending low-confidence requests to a closed frontier model; it says the weights can be downloaded and that a first model takes about four weeks, without giving a baseline. Parsec publishes no price for this service and does not describe how it enforces a JSON Schema, and no structured-output accuracy figures for it have been published, so it belongs in the same test as the API models.
How to test before you switch
No published benchmark compares these models on one extraction set for schema validity, field accuracy and cost per correct record, and we have not run one. The test is yours to run, and it is small:
- Label several hundred representative inputs and hold a slice back untouched.
- Fix and record the schema, prompt, model ID and thinking or reasoning setting for each run.
- Score schema validity, per-field accuracy, complete-record accuracy and whether missing values come back as null or invented, separately.
- Log latency and the thinking or reasoning token counts each API reports; OpenAI notes the first request with a new schema is slower.
- Set the pass mark on complete-record accuracy before you look at the results.
A worked cost example
This example is hypothetical, at list prices: each request has 2,000 input tokens and 200 billed output tokens, thinking included. Per 1,000 requests that is 2 million input tokens and 200,000 output tokens.
Gemini 3.1 Flash-Lite costs 2 × $0.25 = $0.50 for input and 0.2 × $1.50 = $0.30 for output, $0.80 in all. Gemini 4 Carbon costs $4.00 + $2.00 = $6.00 today and $12.00 from December 1. GPT-6 Luna costs $0.20 + $0.10 = $0.30, and GPT-6.2 Astra $16.00 + $8.00 = $24.00. Batch halves each figure.
Now add a fallback. Suppose, hypothetically, 10 percent of Flash-Lite records fail validation and are re-run on Carbon. The cost per 1,000 becomes $0.80 + 0.1 × $6.00 = $1.40 today, or $2.00 after December 1. The small model only loses on cost if more than about 87 percent of records need escalating today (1 − 0.80 ÷ 6.00). To get cost per correct result, divide by the share of complete records that come out right: at a hypothetical 95 percent, $1.40 becomes about $1.47 per 1,000 correct records.
Reasoning can change the picture more than the price list. If Luna at its default medium effort added 800 hidden reasoning tokens to each request, a hypothetical figure, its cost would rise from $0.30 to $0.70 per 1,000, still far below Astra. And a fallback catches only errors a validator can see: a wrong value that passes every check is never re-run, which is why measured field accuracy, not the retry rate, decides the choice.
Bottom line
Use code for data that is already structured. For extraction and fixed-label classification, use Gemini 3.1 or 3.5 Flash-Lite on Google or GPT-6 Luna on OpenAI, with strict schemas, explicit thinking or reasoning settings and value checks in code; move off GPT-5 nano before December 11. Keep Gemini 4 Carbon or GPT-6.2 Astra for documents that need interpretation and as the fallback for records that fail validation, priced at Carbon's December 1 rate. Switch only after a few hundred of your own labelled examples show the cheaper model clears your accuracy bar.
Sources
- Google, Gemini 3.1 Flash-Lite model page
- Google, Gemini 3.5 Flash-Lite model page
- Google, Gemini 4 Carbon model page
- Google, Gemini Developer API pricing
- Google, Structured outputs
- Google, Thinking
- Google, Deprecations
- OpenAI, Structured model outputs
- OpenAI, Reasoning models
- OpenAI, GPT-5 nano model page
- OpenAI, GPT-5.4 nano model page
- OpenAI, GPT-6 Luna model page
- OpenAI, GPT-6.2 Astra model page
- OpenAI, API pricing
- OpenAI, Deprecations
- Parsec, Home
- Parsec, Inference
- Parsec vs routers