Back to blog

Models & comparisonsComparison

GPT-6.1 Terra vs Sol vs Luna for coding: cost per task

Terra, Sol or Luna for coding? One task priced on all three OpenAI tiers, a way to pick where to start, and when a cheaper model is enough.

By CheapTokens TeamPublished 7 min read

Cover: GPT-6.1 Terra vs Sol vs Luna, cost per coding task
On this page
  1. What the price list says
  2. One edit, then fifty of them
  3. Agent loops: the input is the bill
  4. Which tier for which task
  5. When a cheaper open-weight model is enough
  6. Replay your own tasks

Your agent session finished, the diff looks fine, and now you wonder whether the priciest tier was necessary. Short answer: start on Terra, send bulk simple steps to Luna, and pay for Sol only for the task Terra has already missed. On one identical edit (40,000 tokens in, 3,000 out) the OpenAI standard prices give $0.0055 on Luna, $0.055 on Terra and $0.11 on Sol.

What the price list says#

OpenAI’s pricing page (checked 29 October 2026, standard tier, input up to 272K tokens) lists these prices per 1M tokens:

Tier Input Cached input Output One edit: 40K in, 3K out
GPT-6 Luna (gpt-6-luna) $0.10 $0.01 $0.50 $0.0055
GPT-6.1 Terra (gpt-6.1-terra) $1.00 $0.05 $5.00 $0.055
GPT-6.1 Sol (gpt-6.1-sol) $2.00 $0.10 $10.00 $0.11

The pattern is tidy. Sol is exactly twice Terra on every column. Luna is a tenth of Terra on input and output, and a fifth on cached input. So the cost ladder is fixed, and the real question is how often a cheaper rung gets the job done.

The last column is plain arithmetic. On Terra: 40,000 × 1.00 / 1,000,000 = 0.04 for the input and 3,000 × 5.00 / 1,000,000 = 0.015 for the output, so 0.04 + 0.015 = 0.055. On Sol the same sum is 0.08 + 0.03 = 0.11, on Luna 0.004 + 0.0015 = 0.0055.

Three prices for the same edit: Luna, Terra and Sol
One edit of 40,000 tokens in and 3,000 out, OpenAI standard prices, checked 29 October 2026

One edit, then fifty of them#

Say you make 50 edits like this a day: rewrite a function, fix the tests it broke, about 40,000 tokens of files and instructions in and 3,000 tokens of patch and explanation out. A day then costs 50 × 0.055 = 2.75 dollars on Terra, 50 × 0.11 = 5.50 on Sol and 50 × 0.0055 = 0.275 on Luna.

Nobody feels $0.11 on one edit. A month of Sol at that pace is a different conversation, and it is the reason to decide the tier once per kind of task instead of once per mood.

Here is the whole calculation as a few lines you can paste and rerun with your own token counts (example prices from the table above, plug in current ones):

python
PRICES = {  # $ per 1M tokens: (input, output), OpenAI, 29 Oct 2026
    'luna': (0.10, 0.50),
    'terra': (1.00, 5.00),
    'sol': (2.00, 10.00),
}

def cost(tier, tokens_in, tokens_out):
    p_in, p_out = PRICES[tier]
    return (tokens_in * p_in + tokens_out * p_out) / 1_000_000

print(cost('terra', 40_000, 3_000))  # 0.055

Agent loops: the input is the bill#

An edit is one request. An agent is twenty of them in a row, and each step rereads the files and the history so far. Take a loop of 20 steps where every step sends about 30,000 tokens and gets about 1,000 back. That is 600,000 tokens in and 20,000 out.

On Terra: 600,000 × 1.00 / 1,000,000 = 0.60 for the input and 20,000 × 5.00 / 1,000,000 = 0.10 for the output, so 0.60 + 0.10 = 0.70 dollars. Sol doubles it to 1.40, Luna cuts it to 0.07. Look at the split: $0.60 of the $0.70 is what you send, not what the model writes. That is the opposite of how most people imagine the bill.

Caching changes the picture, if your prefix really repeats. Suppose 25,000 of the 30,000 tokens in each step are the same prefix and hit the cache: 100,000 × 1.00 / 1,000,000 = 0.10 fresh input, 500,000 × 0.05 / 1,000,000 = 0.025 cached input, plus 0.10 output, so Terra lands at 0.10 + 0.025 + 0.10 = 0.225. How that works is in what prompt caching is; why the history keeps growing is in why AI agents use so many tokens.

The calculator below runs the same loop on CheapTokens models. Change the steps and the tokens to match your agent.

Cost calculator

The same 20-step loop on CheapTokens models

Input tokens per request: 30,000 · Output tokens per request: 1,000 · Requests per day: 20

ModelPer dayPer month
GLM-5.3-Flash$0.0128$0.384
DeepSeek-V4-Flash$0.011$0.33
MiniMax-M2.7$0.033$0.99

Which tier for which task#

One Telegram channel author, who runs AI experiments, compared Terra with Sol and Luna in Codex and published a video on 28 October 2026. His takeaway, in his own title, is that Terra is a middle tier and that is not a drawback (the post). That framing is a useful pointer: the middle rung is the default, and the other two need a reason.

The reason is usually retries. At equal token counts, two Terra attempts cost 2 × 0.055 = 0.11, which is one Sol attempt. And ten Luna attempts cost 10 × 0.0055 = 0.055, which is one Terra attempt. So if Sol is the only tier that lands a class of tasks first time, it pays for itself on those tasks. If Luna lands a class of tasks more than one time in ten, it is the cheaper way to get them, before you count the time spent reviewing misses.

Replay on Luna, default to Terra, Sol for what is left
A way to assign tiers: replay on Luna, default to Terra, escalate to Sol

Pick the situation closest to yours:

Pick your case

Which tier do you start on?

Thousands of small steps

Commit messages, classifying tickets, short code explanations. Start on Luna: the per-step cost is a tenth of Terra’s, so any miss rate that is not extreme still comes out cheaper. Move up only for the step type that keeps failing.

Daily edits and refactors

Start on Terra and stay there. It is the middle rung of the price list, and one edit at 40K in and 3K out costs $0.055. Look at Sol only after the same kind of task has failed on Terra twice.

A task Terra already missed

Try Sol once with the same prompt. At equal tokens that costs the same as the second Terra attempt would have, and you learn whether the extra tier is what the task needs.

A long agent loop

The bill is dominated by input, so first cut what each step resends and keep the prefix stable for caching. Pick the tier after that, not before.

When a cheaper open-weight model is enough#

The same edit on the three OpenAI tiers next to three CheapTokens models, with the same 40,000 tokens in and 3,000 out:

One edit, 40,000 tokens in, 3,000 out (OpenAI prices from 29 October 2026)
  • GPT-6.1 Sol$0.11
  • GPT-6.1 Terra$0.055
  • GPT-6 Luna$0.0055
  • MiniMax-M2.7$0.0025
  • GLM-5.3-Flash$0.00092
  • DeepSeek-V4-Flash$0.0009

The bars show price, not results. Whether one of these models is good enough for your edits is something you check the same way as for Luna: replay real tasks and read the diffs. If it passes, the bill drops further. For agent loops, DeepSeek-V4-Flash has a 380K context, up to 32,768 tokens in an answer and one price at any hour of the day. GLM-5.3-Flash has a 390K context and MiniMax-M2.7 a 180K one; all prices live on the pricing page, and the connection steps are in the docs.

Replay your own tasks#

The table gives you cost. Quality you find out in an afternoon: take ten tasks from your recent history, run each on Luna, then on Terra, and put the diffs side by side. The only numbers you need are in the response, in the usage field, which makes it easy to price a run exactly. With CheapTokens it looks like this:

bash
curl https://api.cheaptokens.dev/v1/chat/completions \
  -H "Authorization: Bearer $CHEAPTOKENS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "deepseek-ai/DeepSeek-V4-Flash-0731", "messages": [{"role": "user", "content": "Rename the variable x to retry_count in this function: ..."}]}'

In the JSON that comes back, usage.prompt_tokens and usage.completion_tokens are your input and output for that task. Feed them into the cost() helper above, and you have the cost per task for any model with a price. For the launch details of the new tier, see GPT-6.1 Terra API price; for the input/output split, input vs output tokens.

Quick check

You run the same task on Terra and on Sol with identical token counts. What does the price list alone tell you?

Show answer

Answer: Sol costs exactly twice as much, because every price on its row is double Terra’s

Input, cached input and output are each 2× on Sol, so the bill is 2× whatever the mix. Whether the extra money buys a better result is the part only your replay can show.