Skip to content

Pricing and multipliers

Three billing methods (per token, per request including per-image billing, and billing expressions); the actual price is the model price times the group multiplier. Plus pre-deduction and settlement, top-ups, statements and invoices.

CodaAPI charges your account balance by actual usage; if the console offers subscription plans, see Top up below. How much each request costs depends on two things: the model price and the group multiplier of the group your key is in. The specific numbers change with the back-end configuration, so Model Square and the price list are always the source of truth. This page covers the rules only.

How the price is calculated

actual price = model price × group multiplier
  • Model price: each model's own price, calculated with one of the billing methods in the next section.
  • Group multiplier: set by the group your key is in. The same model can have different multipliers in different groups, and so different prices. See Groups for what groups are and how to choose one.

An example: a token-billed model has an input price of A and an output price of B (per 1 million tokens), and your key's group has a multiplier of R. A request with X input tokens and Y output tokens is charged:

(X × A + Y × B) ÷ 1,000,000 × R

When you read prices in Model Square:

  • With no group selected, Model Square shows each model's price in the group with the lowest multiplier among the groups you can use. That isn't necessarily the price your key pays.
  • Choose your key's group under the Groups filter on the left to see the price your key actually pays.
  • Open a model, and its Pricing by Group section lists its multiplier and price in each group.

The price list works the same way: by default it uses the group with the lowest multiplier, and you can choose a group to view.

Billing methods

Each model uses one of the three methods below. Model Square labels them Token-based, Per Request and Dynamic Pricing:

Method Applies to How it's calculated
Per token Chat, Responses, embeddings, and some image models Input and output are priced separately, and output usually costs more than input. Many models also have prices for cache reads (input that hits the cache) and cache writes (input written to the cache); those tokens are charged at their own price instead of the ordinary input price. The four parts are added up and multiplied by the group multiplier
Per request Some image and video models, and other models priced per request One fixed price per request, times the group multiplier, regardless of the token count. When an image generation request creates several images (the n parameter), it is billed per image: price per request × number of images × group multiplier
Billing expression Some chat, image and speech synthesis models The price is defined by a billing expression. The most common kind is tiered by context length: once the total input passes a certain length, the whole request is charged at another tier's prices. Some expressions also price image output and similar parts separately. The price the expression gives is multiplied by the group multiplier as well

The full per-token calculation:

(ordinary input tokens × input price
 + cache-read tokens × cache-read price
 + cache-write tokens × cache-write price
 + output tokens × output price) × group multiplier

A few notes:

  • Token counts are whatever the upstream returns. A reasoning model's "thinking" counts as output tokens, and multimodal input such as images and files is converted to input tokens.
  • Asynchronous tasks such as video generation are priced per request, and for some models the price is multiplied by factors for parameters in the request such as duration and resolution.
  • When you use built-in tools such as web search through the Responses API, some tools are charged separately per call, also multiplied by the group multiplier.
  • For models billed by expression, a rough estimate from a single unit price may not match the actual charge. Model Square and the detail in the usage logs are the source of truth.
  • If a streaming request is cut off midway, the part already generated is still billed.

Pre-deduction and settlement

A request is charged in two steps:

  1. Pre-deduction: before the request is sent, part of the balance is deducted based on an estimate. If the balance can't cover the pre-deduction, the request is rejected outright with 403, and the error message says the user quota is insufficient or there isn't enough quota to pre-consume (the exact wording depends on the language of the error). A key with its own quota cap whose remaining quota can't cover the pre-deduction also gets 403.
  2. Settlement: when the request completes, it is settled by actual usage, refunding any excess or charging any shortfall. If the request fails and produces no usage, the pre-deducted amount is refunded.

So when only a little balance is left, a single large request can fail because the pre-deduction isn't covered, even if it would not actually use that much. See Error codes for every insufficient-quota message.

Top up

Top up in the console under Personal → Wallet (open it directly):

  • Online top-up: choose or enter an amount under Add Funds, then pick a Payment Method to pay. The payment methods you can use are whatever the page shows. After payment the balance updates, and top-up records are in Order History.
  • Redemption code: if you have a code, enter it under Have a Code? and click Redeem.
  • Subscription plans: if the page shows Subscription Plans, you can buy by plan. The quota, validity period and applicable models of a plan are as the plan description says.

The wallet page shows your Current Balance. The currency unit used to display balances and prices is whatever the console shows.

Payments are completed on the third-party payment platform shown on the page.

Statements and invoices

  • Per-request detail: General → Usage Logs (open it directly) lists the time, key, model, input and output tokens and charge of each request. Open a row to see the multiplier used for that request. You can filter by time, model and key.
  • Task detail: asynchronous tasks such as video generation are in Task Logs (open it directly), and Midjourney drawing is in Drawing Logs (open it directly).
  • Usage overview: General → Overview (open it directly) summarizes usage and spending over time.
  • Invoices: the console has no self-service invoicing yet. If you need an invoice, or have questions about business purchasing or payment methods, contact us.

Control your spending

  • Set a quota cap on an API key: turn off Unlimited Quota in the key settings and enter a quota. When it's used up, that key stops, and your account balance isn't affected.
  • Use a separate key for each application and filter the usage logs by key to see how much each application spent.
  • Use model limits to allow a key to call only cheaper models.

If a charge doesn't match what you expected, first check the FAQ. If you still have questions, contact us.

Updated