GPT-5.6 API Cost Calculator (JS): Sol vs Terra vs Luna

Use a JavaScript GPT-5.6 API cost calculator for Sol, Terra, and Luna. Compare Standard OpenAI and OurToken input, cache, and output rates.

O
OurToken Team//19 min
GPT-5.6 API Cost Calculator (JS): Sol vs Terra vs Luna

A useful GPT-5.6 API cost calculator must do more than multiply total tokens by one price. GPT-5.6 Sol, Terra, and Luna each have four billable token categories: uncached input, cached input, cache writes, and output. Official OpenAI pricing also changes when a request contains more than 272,000 input tokens, so a calculator that ignores the long-context tier can materially understate the cost of large prompts.

This guide provides a copy-paste JavaScript calculator for all three GPT-5.6 models. It compares the current official Standard/default rates with the rates listed on OurToken, explains the long-context rule, and works through realistic chat, coding-agent, prompt-cache, and large-document scenarios.

The goal is not to declare one model universally best. Sol is positioned for complex professional work, Terra balances intelligence and cost, and Luna targets cost-sensitive high-volume workloads. The right economic choice depends on both token cost and the percentage of tasks each model completes without retries or human correction.

Pricing was verified on July 16, 2026. Model prices, context limits, processing tiers, and provider routes can change. Recheck the linked pricing pages before using these figures for a production budget.

Calculator scope: official OpenAI Standard/default processing and the listed OurToken rates. Batch, Flex, and Priority use different complete rate cards and are not supported by this calculator.

GPT-5.6 API Pricing: The Numbers the Calculator Uses

OpenAI lists GPT-5.6 prices per one million tokens. The standard short-context rates are shown below.

ModelOfficial inputOfficial cached inputOfficial cache writesOfficial output
GPT-5.6 Sol$5.00$0.50$6.25$30.00
GPT-5.6 Terra$2.50$0.25$3.125$15.00
GPT-5.6 Luna$1.00$0.10$1.25$6.00

These values come from the official OpenAI API pricing table. The individual model pages describe GPT-5.6 Sol as the frontier model for complex professional work, GPT-5.6 Terra as the model that balances intelligence and cost, and GPT-5.6 Luna as the cost-sensitive, high-volume option.

OurToken currently lists the following rates for the same model IDs:

ModelOurToken inputOurToken cached inputOurToken cache writesOurToken output
GPT-5.6 Sol$1.00$0.10$1.25$6.00
GPT-5.6 Terra$0.50$0.05$0.625$3.00
GPT-5.6 Luna$0.20$0.02$0.25$1.20

You can verify the live route details on the GPT-5.6 Sol API page, GPT-5.6 Terra API page, and GPT-5.6 Luna API page. At the time of verification, each listed OurToken rate was 20% of the corresponding official short-context rate.

The Four Token Categories Are Not Interchangeable

For a correct estimate, divide prompt usage into mutually exclusive buckets:

  1. Input tokens: new prompt tokens billed at the normal input rate.
  2. Cached input tokens: previously cached prompt tokens served at the cached-input rate.
  3. Cache-write tokens: prompt tokens written into a reusable cache and billed at the cache-write rate.
  4. Output tokens: tokens generated by the model, including billable reasoning tokens when they are included in the provider's output accounting.

Do not count the same token as both normal input and cached input. If a request contains a 100,000-token stable prefix served from cache and 10,000 new tokens, enter 100,000 as cached input and 10,000 as normal input.

The basic formula is:

request cost =
  (input tokens / 1,000,000 × input rate)
+ (cached input tokens / 1,000,000 × cached input rate)
+ (cache-write tokens / 1,000,000 × cache-write rate)
+ (output tokens / 1,000,000 × output rate)

This separation matters because the price ratios are large. Across the published GPT-5.6 rate cards, cached input costs 10% of normal input, cache writes cost 125% of normal input, and output costs six times normal input in the short-context tier.

Official Long-Context Pricing Above 272K Input Tokens

OpenAI states that prompts with more than 272,000 input tokens are priced at twice the input rate and 1.5 times the output rate for the full request. Applying the model pages' published multipliers to the Standard rates gives these long-context values:

ModelLong-context inputCached inputCache writesOutput
GPT-5.6 Sol$10.00$1.00$12.50$45.00
GPT-5.6 Terra$5.00$0.50$6.25$22.50
GPT-5.6 Luna$2.00$0.20$2.50$9.00

The calculator below adds normal input, cached input, and cache-write tokens to determine total prompt input. If that sum is greater than 272,000 and the selected provider is official OpenAI, it automatically switches the entire request to the long-context rate card.

There is an important route-limit difference. OpenAI's three model pages list a 1,050,000-token context window, a 922,000-token maximum input, and a 128,000-token maximum output. The current OurToken model pages list a 250,000-token context window and a 128,000-token maximum output but do not publish a separate maximum-input value. Treat those as separate route limits. Do not assume that a provider route accepts the full official context window simply because it uses the same model ID.

The calculator checks prompt input, output, and their combined context usage against the limits each provider publishes. It does not invent an OurToken long-context price that is not displayed on the model pages.

How the GPT-5.6 API Cost Calculator Works

The calculator follows a small, auditable sequence. Keeping the pricing logic outside application code makes rate updates easier and prevents different services from calculating the same workload differently.

API usage or forecast
        |
        v
Split tokens into four buckets
input | cached input | cache writes | output
        |
        v
Select provider rate card
official OpenAI | OurToken
        |
        v
Official route only: is total prompt input > 272K?
        | no                         | yes
        v                            v
short-context rates          long-context rates
        \___________________________/
                    |
                    v
Multiply tokens by per-million rates
                    |
                    v
Cost breakdown by category and model
                    |
                    v
Budget alerts, routing decisions, and forecasts

Separate Forecasting From Invoice Reconciliation

The same function can support two workflows:

  • Forecasting: enter expected token counts before launch to compare models and providers.
  • Reconciliation: feed measured token counts from API usage logs or billing exports to compare estimated and invoiced spend.

Forecasting helps choose a default model and set limits. Reconciliation catches hidden retries, unexpected output growth, cache misses, and requests that crossed the official long-context threshold.

The calculator covers model token charges under official Standard/default processing only. Paid tools, regional processing uplifts, storage, and containers may add separate charges. Batch, Flex, and Priority are different token rate cards rather than additive fees, so do not reconcile those requests with the Standard rates in this calculator.

Why Output Limits Matter

Output tokens are the most expensive token category in every GPT-5.6 short-context rate card. A request that sends 20,000 input tokens and generates 20,000 output tokens does not split cost evenly: output contributes six times as much spend per token.

That does not mean every application should aggressively truncate answers. It means maximum output settings should reflect the task. A classifier, router, or structured extractor may need hundreds of tokens, while a code-generation or research workflow may legitimately need thousands. Use task-specific output caps instead of one global maximum.

Why Cache Accounting Matters

Prompt caching can change unit economics quickly. A cache write costs 25% more than ordinary input, but each successful cache hit costs 90% less than ordinary input. Based on token rates alone, the first later reuse more than recovers the extra write premium. The OpenAI-compatible prompt caching guide covers integration patterns, while the official OpenAI prompt caching guide defines the current usage fields and cache behavior.

Real cache performance still depends on provider rules, prefix stability, expiration, and whether a request actually receives a cache hit. Track observed cached tokens rather than assuming every repeated prompt is cached.

Copy-Paste JavaScript GPT-5.6 Cost Calculator

The following calculator supports Sol, Terra, and Luna; official Standard/default and OurToken rates; raw Responses or Chat Completions usage conversion; all four token categories; and the official long-context threshold. Its default auto mode is designed for one request. For aggregate usage covering many requests, either sum per-request results or use aggregate mode with an explicit short or long official tier after checking every underlying request.

const RATE_CARDS = {
  official: {
    short: {
      "gpt-5.6-sol": {
        input: 5,
        cachedInput: 0.5,
        cacheWrite: 6.25,
        output: 30,
      },
      "gpt-5.6-terra": {
        input: 2.5,
        cachedInput: 0.25,
        cacheWrite: 3.125,
        output: 15,
      },
      "gpt-5.6-luna": {
        input: 1,
        cachedInput: 0.1,
        cacheWrite: 1.25,
        output: 6,
      },
    },
    long: {
      "gpt-5.6-sol": {
        input: 10,
        cachedInput: 1,
        cacheWrite: 12.5,
        output: 45,
      },
      "gpt-5.6-terra": {
        input: 5,
        cachedInput: 0.5,
        cacheWrite: 6.25,
        output: 22.5,
      },
      "gpt-5.6-luna": {
        input: 2,
        cachedInput: 0.2,
        cacheWrite: 2.5,
        output: 9,
      },
    },
  },
  ourtoken: {
    standard: {
      "gpt-5.6-sol": {
        input: 1,
        cachedInput: 0.1,
        cacheWrite: 1.25,
        output: 6,
      },
      "gpt-5.6-terra": {
        input: 0.5,
        cachedInput: 0.05,
        cacheWrite: 0.625,
        output: 3,
      },
      "gpt-5.6-luna": {
        input: 0.2,
        cachedInput: 0.02,
        cacheWrite: 0.25,
        output: 1.2,
      },
    },
  },
};

const OFFICIAL_LONG_CONTEXT_THRESHOLD = 272_000;
const TOKENS_PER_MILLION = 1_000_000;
const MODEL_LIMITS = {
  official: {
    contextWindow: 1_050_000,
    maxInput: 922_000,
    maxOutput: 128_000,
  },
  ourtoken: {
    contextWindow: 250_000,
    maxInput: null,
    maxOutput: 128_000,
  },
};

function normalizeTokenCount(name, value) {
  const number = Number(value);

  if (!Number.isFinite(number) || number < 0) {
    throw new Error(name + " must be a non-negative number.");
  }

  return number;
}

function usageToWorkload(usage) {
  if (!usage || typeof usage !== "object") {
    throw new Error("usage must be an API usage object.");
  }

  const usesResponsesUsage = usage.input_tokens !== undefined;
  const usesChatUsage = usage.prompt_tokens !== undefined;

  if (!usesResponsesUsage && !usesChatUsage) {
    throw new Error(
      "usage must contain input_tokens or prompt_tokens."
    );
  }

  const totalInputTokens = normalizeTokenCount(
    "totalInputTokens",
    usesResponsesUsage ? usage.input_tokens : usage.prompt_tokens
  );
  const details = usesResponsesUsage
    ? usage.input_tokens_details || {}
    : usage.prompt_tokens_details || {};
  const cachedInputTokens = normalizeTokenCount(
    "cachedInputTokens",
    details.cached_tokens ?? 0
  );
  const cacheWriteTokens = normalizeTokenCount(
    "cacheWriteTokens",
    details.cache_write_tokens ?? 0
  );
  const outputTokens = normalizeTokenCount(
    "outputTokens",
    usesResponsesUsage
      ? usage.output_tokens
      : usage.completion_tokens
  );
  const uncachedInputTokens =
    totalInputTokens - cachedInputTokens - cacheWriteTokens;

  if (uncachedInputTokens < 0) {
    throw new Error(
      "Cached and cache-write tokens cannot exceed total input tokens."
    );
  }

  return {
    uncachedInputTokens,
    cachedInputTokens,
    cacheWriteTokens,
    outputTokens,
  };
}

function calculateGpt56Cost({
  provider = "official",
  model = "gpt-5.6-terra",
  usageMode = "request",
  officialPricingTier = "auto",
  officialServiceTier = "default",
  uncachedInputTokens = 0,
  cachedInputTokens = 0,
  cacheWriteTokens = 0,
  outputTokens = 0,
} = {}) {
  const tokens = {
    uncachedInput: normalizeTokenCount(
      "uncachedInputTokens",
      uncachedInputTokens
    ),
    cachedInput: normalizeTokenCount(
      "cachedInputTokens",
      cachedInputTokens
    ),
    cacheWrite: normalizeTokenCount(
      "cacheWriteTokens",
      cacheWriteTokens
    ),
    output: normalizeTokenCount("outputTokens", outputTokens),
  };

  const providerRateCards = RATE_CARDS[provider];

  if (!providerRateCards) {
    throw new Error("Unknown provider: " + provider);
  }

  if (!["request", "aggregate"].includes(usageMode)) {
    throw new Error("usageMode must be request or aggregate.");
  }

  if (
    provider === "official" &&
    !["auto", "short", "long"].includes(officialPricingTier)
  ) {
    throw new Error(
      "officialPricingTier must be auto, short, or long."
    );
  }

  if (
    provider === "official" &&
    officialServiceTier !== "default"
  ) {
    throw new Error(
      "This calculator supports only the official default service tier."
    );
  }

  if (
    provider === "official" &&
    usageMode === "aggregate" &&
    officialPricingTier === "auto"
  ) {
    throw new Error(
      "Aggregate official usage requires an explicit short or long tier."
    );
  }

  const promptTokens =
    tokens.uncachedInput + tokens.cachedInput + tokens.cacheWrite;
  const contextTokens = promptTokens + tokens.output;

  const usesOfficialLongContext =
    provider === "official" &&
    (officialPricingTier === "long" ||
      (officialPricingTier === "auto" &&
        promptTokens > OFFICIAL_LONG_CONTEXT_THRESHOLD));

  const tier =
    provider === "official"
      ? usesOfficialLongContext
        ? "long"
        : "short"
      : "standard";

  const rates = providerRateCards[tier][model];

  if (!rates) {
    throw new Error("Unknown model for provider: " + model);
  }

  const breakdown = {
    uncachedInput:
      (tokens.uncachedInput / TOKENS_PER_MILLION) * rates.input,
    cachedInput:
      (tokens.cachedInput / TOKENS_PER_MILLION) *
      rates.cachedInput,
    cacheWrite:
      (tokens.cacheWrite / TOKENS_PER_MILLION) *
      rates.cacheWrite,
    output:
      (tokens.output / TOKENS_PER_MILLION) * rates.output,
  };

  const total = Object.values(breakdown).reduce(
    (sum, cost) => sum + cost,
    0
  );

  const warnings = [];

  if (usageMode === "request") {
    const limits = MODEL_LIMITS[provider];
    const providerLabel =
      provider === "official" ? "Official OpenAI" : "OurToken";

    if (
      limits.maxInput !== null &&
      promptTokens > limits.maxInput
    ) {
      warnings.push(
        providerLabel +
          " prompt input exceeds the published " +
          limits.maxInput +
          "-token maximum input."
      );
    }

    if (tokens.output > limits.maxOutput) {
      warnings.push(
        providerLabel +
          " output exceeds the published " +
          limits.maxOutput +
          "-token maximum output."
      );
    }

    if (contextTokens > limits.contextWindow) {
      warnings.push(
        providerLabel +
          " prompt plus output exceeds the published " +
          limits.contextWindow +
          "-token context window."
      );
    }
  }

  if (
    provider === "official" &&
    usageMode === "request" &&
    officialPricingTier === "short" &&
    promptTokens > OFFICIAL_LONG_CONTEXT_THRESHOLD
  ) {
    warnings.push(
      "Short pricing was forced for a request above 272K input tokens."
    );
  }

  return {
    provider,
    model,
    usageMode,
    tier,
    serviceTier:
      provider === "official" ? officialServiceTier : null,
    promptTokens,
    contextTokens,
    outputTokens: tokens.output,
    ratesPerMillion: rates,
    breakdown,
    total,
    warnings,
  };
}

function compareGpt56Models(workload, provider = "official") {
  return [
    "gpt-5.6-sol",
    "gpt-5.6-terra",
    "gpt-5.6-luna",
  ].map((model) => {
    const result = calculateGpt56Cost({
      ...workload,
      provider,
      model,
    });

    return {
      model,
      tier: result.tier,
      total: Number(result.total.toFixed(6)),
      uncachedInput: Number(
        result.breakdown.uncachedInput.toFixed(6)
      ),
      cachedInput: Number(
        result.breakdown.cachedInput.toFixed(6)
      ),
      cacheWrite: Number(
        result.breakdown.cacheWrite.toFixed(6)
      ),
      output: Number(result.breakdown.output.toFixed(6)),
      warning: result.warnings.join(" "),
    };
  });
}

const workload = {
  uncachedInputTokens: 20_000,
  cachedInputTokens: 80_000,
  cacheWriteTokens: 0,
  outputTokens: 8_000,
};

console.table(compareGpt56Models(workload, "official"));
console.table(compareGpt56Models(workload, "ourtoken"));

usageToWorkload() accepts the raw usage object returned by either Responses API or Chat Completions. Those APIs report total input tokens at the top level and cached or cache-write tokens inside the input details, so the helper subtracts both details before passing mutually exclusive buckets to the calculator. For official reconciliation, also pass the response's actual service_tier; the calculator rejects anything other than default instead of silently applying the wrong rate card.

const estimate = calculateGpt56Cost({
  ...usageToWorkload(response.usage),
  provider: "official",
  model: "gpt-5.6-terra",
  officialServiceTier: response.service_tier,
});

Keep rate cards in configuration rather than scattering prices across application code. When a price changes, update one object, rerun a small set of known scenarios, and deploy the rate-card change independently from routing logic.

For production use, store the rate-card version and calculation timestamp with each estimate. That gives finance and engineering teams an audit trail when current prices differ from a historical invoice.

GPT-5.6 API Cost Scenarios

The examples below use the same formula as the JavaScript calculator. They show why total tokens alone are not enough to estimate spend. The 272K rule is evaluated per request, not against an entire day or month of aggregated traffic.

Scenario 1: Cached Support or Knowledge Assistant

Assume one request contains:

  • 20,000 tokens of new user, retrieval, and instruction input
  • 80,000 cached input tokens from a reusable knowledge and policy prefix
  • 0 cache-write tokens
  • 8,000 output tokens

The request remains below the official 272K threshold.

ModelOfficial costOurToken costDifference
GPT-5.6 Sol$0.3800$0.0760$0.3040
GPT-5.6 Terra$0.1900$0.0380$0.1520
GPT-5.6 Luna$0.0760$0.0152$0.0608

For official Terra, the calculation is:

20,000 / 1M × $2.50  = $0.050
80,000 / 1M × $0.25  = $0.020
 8,000 / 1M × $15.00 = $0.120
Total                 = $0.190

The output is only 8% of the request's total tokens, but it creates about 63% of the official Terra bill. That is why controlling output length can matter more than trimming a small amount of input.

Scenario 2: Write a 100K Prefix Once and Reuse It 49 Times

Consider a 50-request workflow with:

  • a 100,000-token stable prefix
  • 10,000 new input tokens per request
  • 5,000 output tokens per request
  • one 100,000-token cache write on the first request
  • 49 later cache hits for the same 100,000-token prefix

Across all 50 requests, the calculator receives:

  • 500,000 normal input tokens
  • 4,900,000 cached input tokens
  • 100,000 cache-write tokens
  • 250,000 output tokens

Each individual request contains 110,000 prompt-input tokens, so it remains in the official short-context tier. To calculate from the aggregate totals in one function call, set usageMode to "aggregate" and officialPricingTier to "short"; otherwise, calculate each request and sum the results.

ModelOfficial totalOurToken total
GPT-5.6 Sol$13.0750$2.6150
GPT-5.6 Terra$6.5375$1.3075
GPT-5.6 Luna$2.6150$0.5230

Without caching, the same 50 calls would send 5.5 million normal input tokens and cost $35.00 on official Sol, $17.50 on official Terra, or $7.00 on official Luna. The write-once-and-reuse pattern reduces the model-token cost by about 62.6% in this scenario; it does not reduce the number of prompt tokens processed.

That saving is not guaranteed for every application. A changing system prompt, reordered content, expired cache, or unsupported cache pattern can reduce the actual hit rate. Measure cached tokens in production and compare them with the forecast.

Scenario 3: Monthly Coding-Agent Workload

Suppose a coding tool accumulates the following monthly usage:

  • 6 million normal input tokens
  • 18 million cached input tokens
  • 1.2 million output tokens
  • no separately metered cache writes in this simplified example

Assume every individual request remains at or below 272,000 prompt-input tokens. Because the figures below are monthly aggregates, set usageMode to "aggregate" and use the short official rate card explicitly, or sum the individual request estimates. Aggregate mode requires an explicit tier so monthly totals cannot accidentally activate long-context pricing.

ModelOfficial monthly costOurToken monthly cost
GPT-5.6 Sol$75.00$15.00
GPT-5.6 Terra$37.50$7.50
GPT-5.6 Luna$15.00$3.00

This table is useful for budgeting, but it is not enough for model selection. If Luna requires more retries, produces changes that need more review, or fails a larger share of repository tasks, its effective cost per accepted result can exceed the API estimate. Conversely, if Luna completes the target workload reliably, paying Sol rates for every request would be unnecessary.

Measure at least four values during evaluation:

  1. API cost per task
  2. task success or acceptance rate
  3. retries and correction tokens
  4. human review or repair time

The lowest token bill is valuable only when the output remains usable.

Scenario 4: A 300K Official Long-Context Request

Now assume an official OpenAI request contains 300,000 normal input tokens and 20,000 output tokens. Because prompt input is greater than 272,000, the calculator uses the long-context rate card for the full request.

ModelCorrect long-context costIncorrect short-rate estimate
GPT-5.6 Sol$3.9000$2.1000
GPT-5.6 Terra$1.9500$1.0500
GPT-5.6 Luna$0.7800$0.4200

Ignoring the threshold would make the estimate about 46.2% lower than the calculated long-context total. This is one of the largest avoidable errors in a GPT-5.6 cost spreadsheet.

Do not send the same 300K scenario to the current OurToken route based on this table. The OurToken pages currently list a 250K context window, so the request exceeds the published route limit. Check the live model page or run a controlled validation if that limit changes.

Sol vs Terra vs Luna: Choosing by Quality-Adjusted Cost

For identical token counts within the same pricing tier, the model price ratios are simple:

  • Terra costs 50% of Sol.
  • Luna costs 40% of Terra.
  • Luna costs 20% of Sol.

Those ratios apply to input, cached input, cache writes, and output on both the official short-context rate card and the listed OurToken rate card. They make financial forecasting easy, but they do not tell you whether a cheaper model can complete a specific task.

Start With the Official Positioning

Use the model positioning as a starting hypothesis:

ModelPublished positioningGood evaluation starting point
SolFrontier model for complex professional workdifficult coding, research, multi-step analysis, high-value escalations
TerraBalances intelligence and costgeneral production assistants, coding, structured workflows
LunaCost-sensitive, high-volume workloadsclassification, extraction, repetitive transformations, broad first-pass traffic

The workload examples in the final column are evaluation candidates, not guaranteed capability boundaries. Run the same representative test set against all three models before freezing a route.

Calculate Cost per Accepted Task

A more useful metric than cost per request is:

quality-adjusted cost per accepted task =
  (API spend + retry cost + human correction cost)
  / accepted tasks

Imagine 1,000 tasks where Luna costs $0.02 per request and Sol costs $0.10. If Luna completes 900 tasks acceptably and Sol completes 990, the API-only comparison favors Luna. But a decision changes when the 100 Luna failures require expensive human repair or multiple escalations.

Record the first-pass model, escalation model, total tokens across retries, final acceptance result, and review time. That data turns model routing from opinion into an economic decision.

A Practical Three-Level Routing Pattern

A reasonable initial policy is:

  1. Send high-volume, lower-risk work to Luna.
  2. Route general production reasoning and coding to Terra.
  3. Use Sol for complex work, failed lower-tier attempts, or tasks where quality has unusually high business value.

This policy should be tested, not assumed. In some applications, starting directly with Terra is cheaper than paying for a failed Luna call plus a Terra retry. In others, Luna may complete most traffic and reduce blended spend substantially.

Keep the integration and test set constant while switching among the three exact model IDs. That makes quality, latency, cache behavior, and cost differences easier to attribute to the selected route.

Production Budget Controls

Add these controls around the calculator:

  • log input, cached input, cache writes, and output separately
  • alert when official prompt input approaches 272K
  • compare estimated cost with actual billing data
  • cap output by task type
  • record retries and fallback models
  • version prices with an effective date
  • verify route-specific context limits before large requests
  • include tool and regional-processing charges outside the token subtotal

For a Responses API application, convert each raw usage object with usageToWorkload(), run the calculator after the completed request, and then aggregate by user, feature, project, and model. The Responses API migration guide explains the surrounding request and response changes. Per-request estimates catch anomalies; aggregated estimates reveal which product features create most of the bill.

Conclusion

The correct GPT-5.6 API cost calculation uses four token categories, not one total-token number. It also applies OpenAI's long-context rates when prompt input exceeds 272,000 tokens and respects the context limit of the route actually being called.

Sol, Terra, and Luna maintain consistent price ratios, so the arithmetic is straightforward. The harder decision is quality-adjusted routing: use measured success, retries, and review cost to decide whether Sol's capability, Terra's balance, or Luna's lower price produces the best result for each workload.

If you want to run the calculator against the listed OurToken rates, create an API key in the OurToken dashboard, keep the Responses API integration constant, and compare the three model IDs with production-like prompts. Recheck live prices and limits before turning the estimate into a budget.

Frequently Asked Questions

How do I calculate GPT-5.6 API cost?

Multiply each token category by its own per-million rate, then add the results. Keep normal input, cached input, cache writes, and output separate. For official OpenAI requests with more than 272,000 total prompt-input tokens, use the published long-context rates for the full request.

Which GPT-5.6 model is cheapest?

GPT-5.6 Luna has the lowest listed token rates. For the same token counts, Luna costs 20% of Sol and 40% of Terra within the same rate card. The cheapest model per successful task can still differ when retries, failures, and human correction are included.

How much does GPT-5.6 cached input cost?

Official short-context cached-input prices are $0.50 per million tokens for Sol, $0.25 for Terra, and $0.10 for Luna. The verified OurToken rates are $0.10, $0.05, and $0.02 respectively. Cached input is listed at 10% of the normal input rate.

What is GPT-5.6 cache-write pricing?

Official cache-write prices are $6.25 per million tokens for Sol, $3.125 for Terra, and $1.25 for Luna in the short-context tier. OurToken lists $1.25, $0.625, and $0.25. These values equal 1.25 times the corresponding uncached input rate.

Does the 272K long-context price apply to every provider?

The 272K rule is published on OpenAI's GPT-5.6 model and pricing pages. Do not automatically apply it to another provider. Use that provider's displayed prices and route limits. The current OurToken pages list a 250K context window and do not display a separate long-context rate card.

Does this calculator include tool-call charges?

No. It estimates model token charges. Add separate costs for paid tools, regional processing, storage, containers, or other billable services. A workflow using web search or hosted code execution can have meaningful non-token charges.

Why can the invoice differ from the estimate?

Common causes include hidden retries, failed requests that still consumed tokens, cache misses, output that exceeded the forecast, long-context requests, a different processing tier, tool usage, regional processing, price changes, and rounding. Reconcile the calculator with provider usage and billing exports rather than treating a forecast as an invoice.

Can I use the calculator with the Responses API?

Yes. Pass the raw Responses API or Chat Completions usage object through usageToWorkload() before calculating. The helper converts total input and nested cache details into four mutually exclusive buckets. For official requests, also pass the response's actual service_tier; only default is supported by this rate card. If cache-write usage is not exposed by another provider, obtain it from that provider's usage logs or dashboard instead of guessing.