LIVE · Thursday 3 December

Cutting a $45k GPT-4o Extraction Bill 90%: Distilled 8B vs GPT-6 Luna vs Batch API, Priced

A guide to the options for high-volume structured extraction after GPT-4o's January 14, 2027 shutdown, with list prices per million documents, a worked $45,000 example and where a fine-tuned Llama 3.1 8B wins or loses.

By Surya8 min read

A $45,000-a-month GPT-4o extraction workload can be cut by about 90% in two ways: distilling GPT-4o into a fine-tuned 8B model such as Llama 3.1 8B, or moving to OpenAI's gpt-6-luna, which replaces GPT-4o when it shuts down on January 14, 2027. At list prices Luna is the cheaper of the two and needs no training; the distilled 8B is the one you own. Published benchmarks show a GPT-4o-trained 8B matching its teacher on entity extraction and falling well behind on long tables, function calls and arithmetic, so which option fits depends on what your fields demand.

First, what is changing

OpenAI's deprecations page, in a notice dated October 14, 2026, lists January 14, 2027 as the shutdown date for GPT-4o (gpt-4o-2024-08-06, gpt-4o-2024-11-20) and GPT-4o mini, with gpt-6-luna as the recommended replacement for both. Every option below is therefore a migration, not just a saving. Until then, GPT-4o is still available to score your test set and to label training data, and that window is the main reason to start now.

The options, by situation

You need savings this month and can wait a day for results. OpenAI's Batch API gives "a 50% cost discount compared to synchronous APIs" with results "within 24 hours." For GPT-4o that means $1.25 per million input tokens and $5.00 per million output instead of $2.50 and $10.00. It halves the bill with no change to accuracy, but only until January 14. Prompt caching, which bills a repeated prompt prefix at $1.25 per million and is "enabled by default," saves less on extraction because each document is new text: if instructions, schema and examples make up 1,000 of a 3,000-token input, it trims the bill by about 12%. OpenAI's pricing page lists no Batch rate for cached GPT-4o input, and neither guide mentions the other, so whether the two stack for GPT-4o is undocumented.

Your extraction is one schema of named fields from moderate-length documents. Test Luna before anything else. OpenAI's model page calls it "our most efficient model for focused, high-volume tasks," lists Structured Outputs support, and prices it at $0.10 per million input tokens and $0.50 per million output. Its reasoning effort defaults to "medium" and can be set to "none." No published study has scored Luna on structured extraction, so your own test set decides. GPT-5 nano ($0.05 in, $0.40 out) and GPT-5 mini ($0.25 in, $2.00 out) are the two other current OpenAI models to put through the same test.

Luna falls short, or you want a model no vendor can retire. This is the case for distillation. The closest published evidence is OmniStruct, an arXiv paper submitted on November 23, 2025, which trained Llama 3.1 8B Instruct on 19,819 GPT-4o-synthesised examples plus 10,000 named-entity examples relabelled by GPT-4o. The student "outperforms GPT-4o on 5 of 6 NER datasets." A Databricks community post from December 5, 2024 found that Llama 3.1 8B fine-tuned on 50 real lease contracts reached "about 70%" F1, level with a prompted 70B model's 71%, and improved "by about 5%" and then "nearly another 5%" only after synthetic examples were added. Distillation works for narrow extraction when the student gets enough well-checked data.

Your fields need arithmetic, cross-references or long tables. Expect a small student to lose. OmniStruct's 8B scored 38.7 against GPT-4o's 57.3 on the LiveSum text-to-table task, 71.8 against 84.3 on BFCL function calling and 77.2 against 95.2 on GSM8K arithmetic. Keep a frontier model on those fields, or compute them in code from fields the student extracts reliably.

You need the data and weights inside your own infrastructure. Rent GPUs and serve the student yourself. Lambda lists H100 SXM at $4.69 to $4.89 per GPU-hour by instance size, and RunPod lists $4.39 on its Secure Cloud and $1.99 for an H100 PCIe on its Community Cloud.

What each option costs

The table prices the same document profile on each option: 3,000 input tokens and 300 output tokens per document, an assumption rather than a measured workload. At GPT-4o's list prices that profile costs $10,500 per million documents, so a $45,000 bill is about 4.3 million documents a month.

Option, list price Per million documents At $45k GPT-4o volume Saving
GPT-4o, Batch API $5,250 $22,500 50%
GPT-4o mini (retires Jan. 14) $630 $2,700 94%
8B at $0.20 per million tokens $660 $2,829 94%
gpt-6-luna, answer tokens only $450 $1,929 96%
GPT-5 nano $270 $1,157 97%
2 to 4 rented H100s Billed by the hour $2,866 to $15,811 65 to 94%

The 8B row uses Fireworks' serverless rate for base models between 4 billion and 16 billion parameters, which applies "uniformly to input and output." Serving your own fine-tune is a different matter at both hosts that publish 8B prices. Fireworks bills serverless LoRAs per token only in a preview it opens on request, and its docs don't state the rate. Together says serverless LoRA inference "has been discontinued," so a fine-tune runs on a dedicated endpoint at $5.49 per H100 per hour, billed "even when idle": about $7,900 for two GPUs over a 720-hour month. The GPU row spans RunPod's cheapest H100 to Together's dedicated endpoints. The workload averages about 5,460 tokens a second; how many H100s it needs with headroom for peaks has not been measured.

The Luna row counts only the 300 tokens of each answer. How many tokens Luna's reasoning adds on extraction at each effort setting has not been measured.

A worked example: $45,000 a month, distilled

Here is the full cost of the distillation route on the same assumptions, with every input shown.

  • Labels. 20,000 GPT-4o labels through the Batch API at $0.00525 per document: about $105. Teams that log production outputs already have them.
  • Training. 20,000 documents of 3,300 tokens for three epochs is 198 million training tokens. Together lists Llama 3.1 8B SFT at $0.34 to $0.38 per million: $67 to $75.
  • Test set. 500 to 2,000 documents with fields checked by your staff. The cost is people's time, which depends on the documents, and it is the largest one-time cost.
  • Serving. About $2,829 a month at a $0.20 per-million rate, or $2,866 to $15,811 on two to four rented H100s.
  • Fallback. Outputs that fail validation go back to a frontier model. At 5% fallback to GPT-4o the monthly bill is about $5,080, an 89% saving; at 10% it is about $7,330, or 84%. After January 14, with Luna as the fallback, 10% adds about $190 a month.

The one-time costs come to a few hundred dollars plus staff time, recovered within days at this volume. What share of real extraction traffic fails validation and falls back has not been measured in any published study, and it is the number that decides whether the saving lands nearer 84% or 94%.

Three things that can sink a distillation

The teacher's mistakes. A student trained only on GPT-4o's answers learns GPT-4o's errors. To beat its teacher, as the Databricks rounds and OmniStruct's entity results suggest is possible, it needs labels a person has checked or corrected.

The licence on the labels. OpenAI's Services Agreement (version dated January 1, 2026) says the customer "owns all Output" but bars using it "to develop artificial intelligence models that compete with OpenAI's products and services," except under a Permitted Exception. That exception covers models "primarily intended to categorize, classify, or organize data (e.g., embeddings or classifiers), if these models are not distributed or made commercially available to third parties." An internal extraction model may fit; a generative 8B is not the example OpenAI gives. Have counsel read your agreement first. On the base model side, Qwen3-8B is Apache 2.0, while Llama 3.1's licence requires a model built with it to start its name with "Llama" if it is distributed.

The benchmarks' limits. Predibase's LoRA Land report (May 2024) found 224 of 310 fine-tuned small models beat GPT-4, but its base models were 2024-era 2B and 7B models and GPT-4 got "simple zero or single-shot completion-style prompts." Ertas reported in March 2026 a fine-tuned 8B at 95.7% field-level F1 on 200 invoices against GPT-4o's 91.3%, without its training-set size, prompts or scoring method. No published study has compared GPT-4o, Luna and an 8B student per field on real extraction with human-checked labels, split by document length, schema count and rare cases.

Who can do the training

Together runs managed fine-tuning and lets you download a LoRA job as merged weights or the adapter alone. Fireworks' managed SFT "no longer accept[s] new jobs" apart from those created before November 9, 2026; new runs go through its Training API, billed per token or per GPU-hour, and its firectl model download command lets you take a model's files with you. Parsec, a small language model lab, runs the loop as a managed service: it traces production requests, builds datasets and evaluations the customer approves, trains with SFT or LoRA, serves the model and sends low-confidence requests to a closed frontier model. Its inference page says "Weights: Yours. Download them," and its routers page says a first model takes about four weeks, with no baseline given. It publishes no price, and its only code sample uses the Anthropic SDK.

The checklist

  1. This week, build a human-checked test set and score GPT-4o on it per field, while GPT-4o still exists.
  2. Test Luna at reasoning effort "none" and "low," and GPT-5 nano, with your current prompt and schema.
  3. If none passes, collect 20,000 GPT-4o labels through the Batch API and get the legal review started.
  4. Train LoRA students on 5,000 and 20,000 labels; keep the smallest that passes, scored per field.
  5. Validate every output against your business rules, since Structured Outputs only "constrains completed, non-refusal model output to your supplied JSON Schema," and route failures to a frontier model.
  6. Shadow the winner on live traffic for two weeks before switching.

Bottom line

For a single-schema extraction task, test gpt-6-luna first: it is the cheapest route to a 90%-plus cut and requires no training. If it misses your bar on the fields that matter, distil into an Apache 2.0 8B with corrected labels and expect an 84 to 94% saving depending on fallback. If your fields need reasoning, run a hybrid and keep a frontier model on those fields. If you are staying on GPT-4o until January, switch to the Batch API now and halve the bill.

Sources

More in Models

All Models →