Fine-tune, distill or cache a 9k-token GPT-4o mini few-shot prompt? Cache, then move to GPT-6 Luna
With OpenAI fine-tuning closed to new users and GPT-4o mini shutting down January 14, 2027, prompt caching is the cheap answer at 5M calls a month. Distilling pays on cost only at far higher volume.
For a prompt with 40 few-shot examples, about 9,000 tokens per call and 5 million calls a month on GPT-4o mini, cache it, and move it to gpt-6-luna before GPT-4o mini shuts down on January 14, 2027. OpenAI prompt caching discounts a repeated prefix automatically (the minimum is 1,024 tokens on GPT-5.6 and later models), and on Luna a cached token costs $0.01 per million, a 90% discount, against the 50% prefix discount on gpt-4o-mini. That takes the bill from about $7,350 a month on uncached GPT-4o mini to about $1,175 to $1,419 on cached Luna. Fine-tuning is closed to new users in 2026 and ends for everyone on January 6, 2027, and distilling into an open-weight model you own beats cached Luna on cost only at roughly 14 million calls a month or more on a dedicated GPU, or on per-token serving that few providers now offer for fine-tunes.
Why this is a caching question now
A few-shot prompt is mostly the same text sent again and again. In this workload, roughly 8,500 of the 9,000 tokens are fixed instructions and examples; only about 500 tokens change per call, and the model writes about 200 back. At 5 million calls that is 42.5 billion tokens a month of identical prefix.
There are three ways to stop paying full price for that prefix. Caching keeps sending it but bills it at a discount. Fine-tuning teaches a model the examples so they can be dropped from the prompt. Distillation is the same idea with a different teacher: train a smaller model on the outputs your current setup produces, then serve that model. Two of those three doors have been narrowing all year.
OpenAI's deprecations page lays out the schedule. Since May 7, 2026, fine-tuning jobs are "not available to organizations that have not previously run fine-tuning." Since July 2, organizations that have not run inference on a fine-tuned model in the past 60 days cannot create jobs either. On January 6, 2027, "active existing customers will no longer be able to create new fine-tuning jobs." OpenAI's pricing page puts it in one line: "Fine-tuning is closed to new users."
The base model is going too. The same deprecations page, in a notice dated October 14, 2026, lists gpt-4o-mini-2024-07-18 for shutdown on January 14, 2027 and names gpt-6-luna as the replacement. Fine-tuned versions "follow the same shutdown schedule as their underlying base models." And Luna's model page lists the fine-tuning endpoint as "Not supported." Whatever you build on GPT-4o mini stops working on January 14, 58 days after November 17.
How the discount works on each model
OpenAI caches prompt prefixes automatically. Its caching guide says the minimum cacheable length "is 1,024 tokens for GPT-5.6 and later"; for older models such as GPT-4o mini it says the minimum "varies with request settings." At 8,500 fixed tokens this prompt clears either bar easily. What matters is that the prefix is byte-for-byte identical across calls, so the guide says to put stable instructions and reference material first and dynamic content "at the end rather than the beginning."
The two models price that cache differently. GPT-4o mini charges $0.15 per million input tokens and $0.075 for cached input, with "no additional cache-write charge," according to OpenAI's pricing page and caching guide. Luna charges $0.10 for input, $0.01 for cached input and $0.50 for output, but for GPT-5.6 and later, "cache writes cost 1.25x the standard, uncached input-token rate," which is $0.125 per million on Luna. Every cache miss therefore costs a little more than an uncached call would.
There is a second wrinkle on Luna. In the default implicit mode, the guide says, "OpenAI places a breakpoint at the end of the latest eligible message," and a static developer message followed by a dynamic user message "writes through the dynamic content." In plain terms, the 500 variable tokens get billed as a cache write on every call, at 1.25 times the normal rate, for a cache entry nobody will reuse. The fix is explicit-only mode: set prompt_cache_options.mode to "explicit" and put a prompt_cache_breakpoint on the last content block of the examples. "Content after the last selected breakpoint is processed at the uncached input-token rate without a cache-write charge," the guide says. One trap: the top-level instructions field cannot hold an explicit breakpoint, so the examples belong in an input_text block inside a developer message.
Keeping the cache warm at high volume
At 5 million calls a month, traffic averages about 116 requests a minute, more at peaks. OpenAI's guide says to "aim for about 15 requests per minute in total across all prefixes using each key," and warns that "traffic above 15 requests per minute can lead to overflow routing" to machines that do not hold your prefix. So spread requests across several prompt_cache_key values, at least eight at the average rate and more for peaks, assigned by a stable hash such as user or tenant ID. Keys "do not pin requests to a machine or guarantee a cache hit," so measure rather than assume: usage.input_tokens_details.cached_tokens counts billed cache reads, and cache_write_tokens counts writes. A healthy setup shows nearly all of the 8,500 prefix tokens as cached and few writes.
Retention also matters for quiet periods. On Luna the default cache lifetime is 30 minutes, with a 12-hour option at 2.5 times the input rate for writes. At this volume, traffic refreshes the cache far more often than every 30 minutes, so the default is enough.
What each option costs
The table below uses OpenAI's, Together's and Fireworks' list prices as of November 17, 2026, and the same workload for every row: 8,500 fixed tokens, 500 variable, 200 output. Ranges cover 0 to 5% of calls missing the cache.
| Option | 1M calls/month | 5M calls/month | 20M calls/month |
|---|---|---|---|
| GPT-4o mini, uncached | $1,470 | $7,350 | $29,400 |
| GPT-4o mini, cached | $833–$864 | $4,163–$4,322 | $16,650–$17,288 |
gpt-6-luna, cached, explicit breakpoint |
$235–$284 | $1,175–$1,419 | $4,700–$5,678 |
| Distilled model, per-token serving (reference rate) | $65 | $325 | $1,300 |
| Distilled model, one dedicated H100 | $3,953 | $3,953 | $3,953 |
Three assumptions sit under these numbers. The Luna row assumes 200 output tokens in total; Luna's model page says reasoning effort defaults to medium, and OpenAI's reasoning guide says reasoning tokens are "billed as output tokens," so every extra 100 reasoning tokens adds $50 per million calls. Setting effort to none, which Luna supports, keeps output at the answer itself. Left on implicit mode, the Luna row rises to $1,238 to $1,482 at 5 million calls.
The distilled rows are harder to price because shared per-token serving for a fine-tuned small model is scarce. Together's docs now say "Serverless LoRA inference (including Serverless Multi-LoRA) has been discontinued." Fireworks says LoRAs on "select base models" can be served per token, but the option is a preview "available on request" with no published price. The per-token row therefore uses Fireworks' base serverless rate for Nemotron 3.5 Lightning 30B A3B ($0.05 in, $0.20 out per million) as a reference, not a quote, on a 500-token prompt with the examples gone. The dedicated row is one Together H100 at $5.49 an hour for a 30-day month; Together's docs say dedicated inference "bills per minute per running replica, even when idle."
For completeness: a fine-tuned GPT-4o mini that drops the examples would cost about $1,950 a month at 5 million calls, at OpenAI's fine-tuned rates of $0.30 in and $1.20 out per million. That is more than cached Luna, it is open only to organizations already using fine-tuning, and it stops working on January 14.
Where distilling starts to make sense
The break-even depends on how the distilled model is served. On a dedicated GPU, the cost is flat, so it only wins once cached Luna spend passes about $3,950 a month: about 16.8 million calls with no misses, or 13.9 million at a 5% miss rate. Whether a single H100 replica carries 20 million calls a month for this workload has not been measured, and one replica gives no redundancy. At 5 million calls, a dedicated GPU costs more than three times cached Luna.
On per-token shared serving, a distilled model is cheaper at every volume on token price alone, by about $850 a month at 5 million calls on the reference rate. That saving has to pay for building the training set, the evaluation, and the engineering time to run a second provider, none of which shows up on a price page. Training itself is small: Together lists supervised fine-tuning for models up to 16B, such as Llama 3.1 8B and Qwen3.5 9B, at $0.34 or $0.38 per million tokens (its pricing page has two tables and does not say which applies to LoRA) with a $4 minimum, so 20,000 examples of 700 tokens over three epochs is about $14 to $16.
Cost is not the only reason. A distilled model that no longer carries 8,500 tokens of examples processes a much shorter prompt, and you own the weights, so the next deprecation notice does not reset your product. Together lets you download a LoRA fine-tune as merged or adapter weights, and Fireworks documents a firectl model download command. How a distilled model's quality and latency compare with Luna on a 40-example task has not been measured; that comparison is the first thing to run, not the last.
What distilling involves
The training data is the 40 examples plus logged production requests paired with good outputs. Your own inputs are yours. Outputs from GPT-4o mini are also yours under Section 4.1 of OpenAI's Services Agreement, which says the customer "owns all Output," but Section 3.3(e) bars using Output "to develop artificial intelligence models that compete with OpenAI's products and services," except for a Permitted Exception. That exception covers models "primarily intended to categorize, classify, or organize data," if they are not distributed or sold to third parties. If your 40 examples teach a classifier or a tagger kept in-house, logged outputs may fall inside it; if they teach a generative task, have counsel read the agreement before training on them, and use reviewed or corrected outputs instead.
Build the evaluation set from real traffic before training anything: a few thousand logged requests held out, scored on whatever the task needs, such as label accuracy or schema validity. OpenAI's model optimization guide makes the same point about establishing "a baseline for performance and accuracy."
Then choose where it runs. On Together you run a managed fine-tuning job and serve it on a dedicated endpoint. Fireworks has paused managed training ("Managed SFT and DPO no longer accept new jobs"), so new runs go through its Training API, where you run the loop. Parsec, which describes itself as a small language model lab, offers a managed version that traces production requests, builds datasets and evaluations the customer approves, trains with SFT or LoRA and serves the model on a shared cluster where models "run alongside other teams'," sending low-confidence requests to a closed frontier model. It says customers can download the weights and get a first post-trained model in about four weeks, a figure it gives without a baseline. It publishes no price for the service, and its only code example uses the Anthropic SDK rather than OpenAI's.
A plan for the next eight weeks
- This week: move the examples to the front of the prompt, strip timestamps and IDs from the prefix, add cache keys, and log
cached_tokens. That alone takes GPT-4o mini from about $7,350 to about $4,200 a month. - By December 1: hold out a few thousand logged requests, record GPT-4o mini's answers and scores, and agree a pass mark.
- Through mid-December: run Luna side by side on the hold-out set with explicit breakpoints and reasoning effort set to
noneandlow, and compare scores, latency and output tokens. - Late December: shift traffic to Luna in stages behind a model alias, keeping GPT-4o mini as the rollback target.
- Before January 14: finish the cutover; after that date there is no GPT-4o mini to roll back to.
- In parallel, only if Luna misses the pass mark or volume is heading past about 14 million calls: train a distilled candidate on the same evaluation set.
Bottom line
At 1 to 5 million calls a month, cache: restructure the prompt now, move to gpt-6-luna with an explicit breakpoint after the examples, and expect roughly $235 to $285 per million calls. Skip fine-tuning on OpenAI; it is closed to new users and anything trained on GPT-4o mini dies on January 14. Distill when Luna fails your quality bar, when you want weights that outlive the next deprecation, or when volume passes about 14 to 17 million calls a month and a dedicated GPU becomes cheaper than the cache. Use the Batch API for any traffic that can wait: Luna's batch rates put this workload near $118 per million calls.
Sources
- OpenAI, Deprecations: https://developers.openai.com/api/docs/deprecations
- OpenAI, API pricing: https://developers.openai.com/api/docs/pricing
- OpenAI, Prompt caching guide: https://developers.openai.com/api/docs/guides/prompt-caching
- OpenAI, GPT-6 Luna model page: https://developers.openai.com/api/docs/models/gpt-6-luna
- OpenAI, Reasoning models guide: https://developers.openai.com/api/docs/guides/reasoning
- OpenAI, Supervised fine-tuning guide: https://developers.openai.com/api/docs/guides/supervised-fine-tuning
- OpenAI, Model optimization guide: https://developers.openai.com/api/docs/guides/model-optimization
- OpenAI Services Agreement (v.010126): https://cdn.openai.com/osa/openai-services-agreement.pdf
- Together, Pricing: https://www.together.ai/pricing
- Together, Deploying and downloading fine-tuned models: https://docs.together.ai/docs/fine-tuning/deployment.md
- Together, LoRA inference: https://docs.together.ai/docs/lora-inference
- Fireworks, Pricing: https://fireworks.ai/pricing
- Fireworks, Deploying trained models: https://docs.fireworks.ai/fine-tuning/deploying-loras.md
- Fireworks, Migrate from Managed Training: https://docs.fireworks.ai/fine-tuning/migrate-from-managed-training.md
- Fireworks, firectl model download: https://docs.fireworks.ai/tools-sdks/firectl/commands/model-download.md
- Parsec, Home: https://parseclab.ai
- Parsec, Inference: https://parseclab.ai/inference/
- Parsec vs your own GPUs: https://parseclab.ai/compare/own-gpus/
- Parsec vs routers: https://parseclab.ai/compare/routers/