GPT · Flagship · 1,050K context window
$0.1120 per call at 3,000 input / 5,000 output tokens.
Per call
$0.1120
10K calls/mo
$1,120
Cache savings
90% off input
Batch savings
50% off all
Adjust token counts, volume, and discount toggles to model your unit test generation spend. Prices verified daily against provider pricing pages.
Call GPT 5.6 Sol with the OpenAI Python SDK:
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="gpt-5.6-sol",
max_tokens=5000,
messages=[{"role": "user", "content": "Your prompt here"}]
)
# Cost: ~$0.1120 per call at standard rates
# Input: $4.00/MTok
# Output: $20.00/MTokPer-call cost for all models scoring 50+ on unit test generation benchmarks. Hover for details.
Cheapest viable option: Claude Sonnet 5 at $0.0560/call (50% less, 93/100 quality).
Test generation is the rare code task where input and output are both large: you send the function under test plus its dependencies, and get back a full suite of cases. Expect 3K in, 5K out. Because the source file rarely changes between runs, cache reads pay off faster here than in almost any other use case: the same file gets resent every time you regenerate a suite.
For GPT 5.6 Sol specifically, that means output tokens cost 5.0x more than input, at $20.00 vs $4.00 per MTok. At this use case’s 3,000/5,000 token split, output accounts for 89% of the $0.1120 per-call cost.
| Direction | $/MTok | Tokens per call |
|---|---|---|
| Input | $4.00 | 3,000 |
| Output | $20.00 | 5,000 |
Caching drops input cost from $4.00 to $0.40/MTok. For repeated system prompts, that saves $0.0108 per call.
Submit requests asynchronously and receive 50% off all token costs. This works best for offline pipelines where latency requirements are flexible.
| Monthly volume | Cost per call | Standard monthly | Cached monthly | You save with caching |
|---|---|---|---|---|
| 10,000 calls | $0.1120 | $1,120 | $1,012 | $108 |
| 50,000 calls | $0.1120 | $5,600 | $5,060 | $540 |
| 100,000 calls | $0.1120 | $11,200 | $10,120 | $1,080 |
| 500,000 calls | $0.1120 | $56,000 | $50,600 | $5,400 |
| 1,000,000 calls | $0.1120 | $112,000 | $101,200 | $10,800 |
Use GPT 5.6 Sol for unit test generation
Scores 94/100 (rank #1 of 20). Strong pick for production unit test generation workloads.
Top-ranked: Claude Fable 5 (96/100) at $0.2800/call
GPT 5.6 Sol scores by task type. Unit Test Generation highlighted.
| Task type | Confidence score | Rank out of 20 |
|---|---|---|
| Reasoning | 96/100 | #1 |
| Code Generation(current page) | 94/100 | #1 |
| Code Review | 92/100 | #2 |
| Creative Writing | 92/100 | #2 |
| Q&A | 91/100 | #1 |
| Summarization | 90/100 | #2 |
| Extraction | 88/100 | #3 |
| Classification | 86/100 | #3 |
Confidence scores are a third-party benchmark snapshot from week 29 of 2026. This snapshot is 8 weeks old, so treat the scores as directional and validate against your own evals.
8 models score 80+ on unit test generation benchmarks, sorted by input rate. Cheapest: Claude Sonnet 5 (50% less, 93/100 quality).
| Model | Provider | Input $/MTok | Output $/MTok | Quality | Per call | vs GPT |
|---|---|---|---|---|---|---|
| Claude Sonnet 5 | Claude | $2.00 | $10.00 | 93/100 | $0.0560 | 50% cheaper |
| GPT 5.6 Terra | GPT | $2.00 | $12.00 | 86/100 | $0.0660 | 41% cheaper |
| Gemini 3.1 Pro | Gemini | $2.00 | $12.00 | 86/100 | $0.0660 | 41% cheaper |
| GPT 5.4 | GPT | $2.50 | $15.00 | 84/100 | $0.0825 | 26% cheaper |
| Claude Sonnet 4.6 | Claude | $3.00 | $15.00 | 92/100 | $0.0840 | 25% cheaper |
| Claude Opus 4.8 | Claude | $5.00 | $25.00 | 95/100 | $0.1400 | 25% more |
| GPT 5.5 | GPT | $5.00 | $30.00 | 91/100 | $0.1650 | 47% more |
| Claude Fable 5 | Claude | $10.00 | $50.00 | 96/100 | $0.2800 | 150% more |
Provider
GPT
Tier
Flagship
Context
1,050K tokens
Released
Jul 2026
| Model | Tier | Input $/MTok | Output $/MTok | Context |
|---|---|---|---|---|
| GPT 5.5 | Flagship | $5.00 | $30.00 | 1,050K |
| GPT 5.4 | Mid-tier | $2.50 | $15.00 | 1,050K |
| GPT 5.6 Terra | Mid-tier | $2.00 | $12.00 | 1,050K |
| GPT 5.6 Luna | Fast / Budget | $0.20 | $1.20 | 1,050K |
You can compare GPT 5.6 Sol head-to-head against any other model on our model comparison pages, or track how pricing has changed over time on the pricing history tracker.
See how GPT 5.6 Sol costs change across different workload types.
Code Generation
$0.0880/call
SQL Generation
$0.0260/call
API Generation
$0.1320/call
Code Refactoring
$0.0960/call
Code Review
$0.0600/call
PR Review
$0.0920/call
Security Review
$0.0740/call
Bug Detection
$0.0600/call
Document Summarization
$0.0600/call
PDF Summarization
$0.0900/call
Meeting Notes
$0.0720/call
Email Summarization
$0.0220/call
Chatbot
$0.0280/call
RAG Pipeline
$0.0540/call
Customer Support Bot
$0.0320/call
FAQ Bot
$0.0220/call
Data Extraction
$0.0360/call
JSON Extraction
$0.0280/call
Invoice Parsing
$0.0200/call
Resume Parsing
$0.0260/call
Chain of Thought
$0.1120/call
Legal Analysis
$0.1200/call
Math Reasoning
$0.0660/call
Financial Analysis
$0.1120/call
Content Moderation
$0.004000/call
Sentiment Analysis
$0.004000/call
Categorization
$0.006200/call
Intent Detection
$0.003200/call
Copywriting
$0.0420/call
Blog Writing
$0.1640/call
Marketing Copy
$0.0632/call
Product Descriptions
$0.0320/call
A typical unit test generation call using GPT 5.6 Sol costs about $0.1120 per call. This estimate uses 3,000 input tokens and 5,000 output tokens at standard rates. Standard rates are $4.00 per million input tokens and $20.00 per million output tokens.
GPT 5.6 Sol scores 94 out of 100 on unit test generation benchmarks overall. It ranks #1 across all 20 models in our cross-provider registry. The highest-ranked model for this task is Claude Fable 5 from Claude. That model scores 96/100 on this task type. Confidence scores are a third-party benchmark snapshot from week 29 of 2026. This snapshot is 8 weeks old, so treat the scores as directional and validate against your own evals.
The most affordable model for unit test generation above 80/100 quality is Claude Sonnet 5. It comes from Claude at $2.00 per million input tokens. Output costs $10.00 per million tokens with a quality score of 93/100. Switching from GPT 5.6 Sol to Claude Sonnet 5 saves about 50% per API call.
Three strategies lower GPT 5.6 Sol costs for this task type effectively. Prompt caching gives a 90% discount on input tokens when reusing system prompts. The batch API gives 50% off all tokens for asynchronous processing workloads. Prompt optimization reduces token counts through more concise instructions and context windows. Combining caching with batching brings your cost from $0.1120 to about $0.005600 per call.
GPT has 4 other models alongside GPT 5.6 Sol today: GPT 5.5 at $5.00/$30.00 per million tokens (flagship), GPT 5.4 at $2.50/$15.00 per million tokens (mid-tier), GPT 5.6 Terra at $2.00/$12.00 per million tokens (mid-tier), GPT 5.6 Luna at $0.20/$1.20 per million tokens (fast / budget). The right choice depends on whether your unit test generation workload prioritizes quality, cost, or speed.
GPT 5.6 Sol supports a context window of 1,050K tokens per API call. This sets the maximum combined length of your input prompt and generated response. For unit test generation, typical calls use 3,000 input and 5,000 output tokens. That is well within this limit, leaving room for longer prompts or multi-turn conversations.
This calculator estimates costs based on published rates only. Connect your API usage to see where your money goes and which models drive your spend.