GlexirDocs
Dashboard

Get started

Pricing

You pay OpenAI's list price for every token, second of audio and embedding. There is no markup and no subscription. Discounts come as bonus credit when you add $50 or more in a single top-up.

Costs are taken from your prepaid credit balance. See Credits & billing for how credit is held, charged and topped up.

Check what a request cost

Every response reports its usage and the service tier that served it. Glexir bills exactly that usage at that tier.

import Glexir from "@glexir/sdk";

const glexir = new Glexir({ apiKey: process.env.GLEXIR_API_KEY });

const response = await glexir.responses.create({
  model: "gpt-5.4-mini",
  input: "Name three prime numbers.",
  service_tier: "flex",
  max_output_tokens: 200,
});

// The tier that served the request. This is the tier you are billed at.
console.log(response.service_tier);

const usage = response.usage;
console.log(usage?.input_tokens, usage?.input_tokens_details.cached_tokens, usage?.output_tokens);

Model prices

Glexir price = OpenAI list price. Standard tier.

Text models, per 1M tokens

ModelInputCached inputOutput
gpt-6-astra$10.00$1.00$50.00
gpt-6.1-sol$2.00$0.10$10.00
gpt-6-sol$2.00$0.20$10.00
gpt-6-luna$0.10$0.01$0.50
gpt-5.6-sol$4.00$0.40$20.00
gpt-5.6-terra$2.00$0.20$12.00
gpt-5.6-luna$0.20$0.02$1.20
gpt-5.5$5.00$0.50$30.00
gpt-5.4$2.50$0.25$15.00
gpt-5.4-mini$0.75$0.075$4.50

Requests with more than 272,000 input tokens are billed at long-context rates, which this table does not show.

Embeddings, per 1M input tokens

ModelInput
text-embedding-3-small$0.02
text-embedding-3-large$0.13

Transcription, per minute of audio

ModelAudio
gpt-transcribe$0.0045

The prices above are the standard tier for requests up to the long-context threshold. The sections below cover the other tiers, long context and caching. The full price book lists every rate.

Volume discounts

A single top-up of $50 or more earns bonus credit on top of what you pay. Usage is still billed at list price; the bonus is extra credit to spend. Paying P at discount d gives you P / (1 - d) of usage.

Single top-upDiscountExample
Under $50NonePay $25, get $25 of usage
$50 or more10%Pay $50, get $55.55 of usage
$1,000 or more30%Pay $1,000, get $1,428.57 of usage
$6,000 or more40%Pay $6,000, get $10,000 of usage
$11,000 or more45%Pay $11,000, get $20,000 of usage
You payBonus creditUsage you get
$100$11.11$111.11
$500$55.55$555.55
$2,000$857.14$2,857.14
  • The discount is set by the size of one top-up, before tax. Two $500 top-ups do not add up to the $1,000 tier.
  • Auto recharge top-ups earn the bonus too, by the same rule.
  • Bonus credit is spent before purchased credit, cannot be refunded, and expires with the top-up that earned it.
  • Your trust tier caps the size of a single top-up, so the larger bonus tiers need a higher trust tier. A tier above every trust tier's cap is only available by arrangement with Glexir. See Top-up limits.

Details are in Volume bonus credit.

Service tiers

Set service_tier on a Responses or Chat Completions request to choose how OpenAI processes it. Each tier has its own price, as a multiple of standard:

Service tierInputOutputText models
Standard standard1x1xAll
Batch batch0.5x0.5xAll
Flex flex0.5x0.5xAll
Fast fast2x2xAll
Ultrafast ultrafast6x6xgpt-6-astra, gpt-6.1-sol
  • Standard is the default. auto, default and scale all bill as standard.
  • Batch applies to every request in a batch. You don't set it per request.
  • Flex is cheaper and slower. It can fail with 429 when OpenAI has no capacity. A failed request is not charged.
  • Fast is also accepted as priority. Both bill as fast.
  • Ultrafast exists only for the models listed.

Your trust tier decides which service tiers you can request. Tier 0 and 1 accounts can use standard, flex and batch; fast needs tier 2 and ultrafast needs tier 3. Asking for a tier you can't use returns 403 with code tier_not_allowed and param: "service_tier". See Trust tiers.

The tier OpenAI reports is the tier you pay

Glexir bills the service_tier in the response, not the one you asked for. If you request auto and OpenAI serves the request at standard, you pay standard. If OpenAI reports a tier the model has no price for, the request is billed at standard.

Your hold (the credit reserved before the request runs) is sized at the tier you asked for. auto is sized at standard.

Long context

When a request has more than 272,000 input tokens, the whole request is billed at long-context rates, not just the tokens past the threshold. The multipliers apply on top of the service tier:

Token classAbove 272,000 input tokens
Input2x
Cached input2x
Cache writes2x
Output1.5x

The threshold is checked against the request's total input_tokens, cached tokens included. A long-context batch request costs the batch rate times these multipliers.

Prompt caching

OpenAI caches repeated prompt prefixes. Cached input tokens cost much less than uncached input. Newer models also charge for writing to the cache: a 30-minute write and a 12-hour write each have their own rate. On older models a cache write costs the same as uncached input.

ModelInputCached inputCache write (30 min)Cache write (12 h)
gpt-6-astra$10.00$1.00$12.50$25.00
gpt-6.1-sol$2.00$0.10$2.50$5.00
gpt-6-sol$2.00$0.20$2.50$5.00
gpt-6-luna$0.10$0.01$0.125$0.25
gpt-5.6-sol$4.00$0.40$5.00$10.00
gpt-5.6-terra$2.00$0.20$2.50$5.00
gpt-5.6-luna$0.20$0.02$0.25$0.50
gpt-5.5$5.00$0.50$5.00$5.00
gpt-5.4$2.50$0.25$2.50$2.50
gpt-5.4-mini$0.75$0.075$0.75$0.75

Glexir splits a request's input_tokens into classes and bills each at its rate:

ClassUsage field (Responses)Usage field (Chat Completions)
Cached inputinput_tokens_details.cached_tokensprompt_tokens_details.cached_tokens
Cache writesinput_tokens_details.cache_write_tokensprompt_tokens_details.cache_write_tokens
12-hour writesinput_tokens_details.cache_write_tokens_details.ttl_12h_tokensprompt_tokens_details.cache_write_tokens_details.ttl_12h_tokens
Uncached inputinput_tokens minus cached tokens minus cache writesprompt_tokens minus cached tokens minus cache writes

Cache writes not reported as 12-hour writes are billed at the 30-minute rate.

Reasoning tokens are part of output_tokens. They are billed once, as output.

Embeddings

Embeddings are billed per input token, from usage.prompt_tokens in the response. Embedding requests in a batch cost half.

ModelStandardBatch
text-embedding-3-small$0.02$0.01
text-embedding-3-large$0.13$0.065
TypeScript
import Glexir from "@glexir/sdk";

const glexir = new Glexir();

const result = await glexir.embeddings.create({
  model: "text-embedding-3-small",
  input: ["first document", "second document"],
});

console.log(result.usage.prompt_tokens); // tokens billed

Transcription

Transcription is billed per second of audio, at the per-minute price in the table above divided by 60.

  • The billed duration is usage.seconds from OpenAI, rounded up to a whole second, with a minimum of one second.
  • If OpenAI returns no usage, Glexir measures the audio file, or estimates its length from its size, and bills that.
TypeScript
import { readFile } from "node:fs/promises";
import Glexir, { toFile } from "@glexir/sdk";

const glexir = new Glexir();

const transcript = await glexir.audio.transcriptions.create({
  model: "gpt-transcribe",
  file: await toFile(await readFile("meeting.mp3"), "meeting.mp3"),
});

console.log(transcript.text);

Dated model snapshots

OpenAI sometimes reports a dated snapshot, such as gpt-5.4-mini-2026-03-17, for a request you made with the alias gpt-5.4-mini. Glexir bills the snapshot at the alias's rates. Send the alias model IDs listed above in your requests.

Models not in the price book are rejected before they reach OpenAI, with 403 and code model_not_priced.

How costs are calculated

All money in Glexir is stored in nano-USD: billionths of a dollar. Rates are stored per 1 million units. For each token class, the cost is:

Output
cost in nano-USD = ceil(tokens × rate in nano-USD per 1M / 1,000,000)

The request's cost is the sum of its classes. Rounding is always up, by less than one nano-USD per class. This keeps very cheap rates, such as cached input on small models, from rounding to zero.

For example, a standard request with 12,345 input tokens, 8,192 of them cached, and 678 output tokens:

Token classTokensRate per 1MCost (nano-USD)Cost (USD)
Uncached input4,153$0.753,114,750$0.003114750
Cached input8,192$0.075614,400$0.000614400
Output678$4.503,051,000$0.003051000
Total (gpt-5.4-mini, standard)6,780,150$0.006780150

Balances in the dashboard are shown to the cent. The usage export keeps full precision.

Full price book

Every rate for every text model, at every service tier and context band, per 1M tokens. A dash means the model has no price at that tier.

gpt-6-astra
TierContextInputCached inputCache write 30 minCache write 12 hOutput
StandardUp to 272,000$10.00$1.00$12.50$25.00$50.00
StandardAbove 272,000$20.00$2.00$25.00$50.00$75.00
BatchUp to 272,000$5.00$0.50$6.25$12.50$25.00
BatchAbove 272,000$10.00$1.00$12.50$25.00$37.50
FlexUp to 272,000$5.00$0.50$6.25$12.50$25.00
FlexAbove 272,000$10.00$1.00$12.50$25.00$37.50
FastUp to 272,000$20.00$2.00$25.00$50.00$100.00
FastAbove 272,000$40.00$4.00$50.00$100.00$150.00
UltrafastUp to 272,000$60.00$6.00$75.00$150.00$300.00
UltrafastAbove 272,000$120.00$12.00$150.00$300.00$450.00
gpt-6.1-sol
TierContextInputCached inputCache write 30 minCache write 12 hOutput
StandardUp to 272,000$2.00$0.10$2.50$5.00$10.00
StandardAbove 272,000$4.00$0.20$5.00$10.00$15.00
BatchUp to 272,000$1.00$0.05$1.25$2.50$5.00
BatchAbove 272,000$2.00$0.10$2.50$5.00$7.50
FlexUp to 272,000$1.00$0.05$1.25$2.50$5.00
FlexAbove 272,000$2.00$0.10$2.50$5.00$7.50
FastUp to 272,000$4.00$0.20$5.00$10.00$20.00
FastAbove 272,000$8.00$0.40$10.00$20.00$30.00
UltrafastUp to 272,000$12.00$0.60$15.00$30.00$60.00
UltrafastAbove 272,000$24.00$1.20$30.00$60.00$90.00
gpt-6-sol
TierContextInputCached inputCache write 30 minCache write 12 hOutput
StandardUp to 272,000$2.00$0.20$2.50$5.00$10.00
StandardAbove 272,000$4.00$0.40$5.00$10.00$15.00
BatchUp to 272,000$1.00$0.10$1.25$2.50$5.00
BatchAbove 272,000$2.00$0.20$2.50$5.00$7.50
FlexUp to 272,000$1.00$0.10$1.25$2.50$5.00
FlexAbove 272,000$2.00$0.20$2.50$5.00$7.50
FastUp to 272,000$4.00$0.40$5.00$10.00$20.00
FastAbove 272,000$8.00$0.80$10.00$20.00$30.00
gpt-6-luna
TierContextInputCached inputCache write 30 minCache write 12 hOutput
StandardUp to 272,000$0.10$0.01$0.125$0.25$0.50
StandardAbove 272,000$0.20$0.02$0.25$0.50$0.75
BatchUp to 272,000$0.05$0.005$0.063$0.125$0.25
BatchAbove 272,000$0.10$0.01$0.125$0.25$0.375
FlexUp to 272,000$0.05$0.005$0.063$0.125$0.25
FlexAbove 272,000$0.10$0.01$0.125$0.25$0.375
FastUp to 272,000$0.20$0.02$0.25$0.50$1.00
FastAbove 272,000$0.40$0.04$0.50$1.00$1.50
gpt-5.6-sol
TierContextInputCached inputCache write 30 minCache write 12 hOutput
StandardUp to 272,000$4.00$0.40$5.00$10.00$20.00
StandardAbove 272,000$8.00$0.80$10.00$20.00$30.00
BatchUp to 272,000$2.00$0.20$2.50$5.00$10.00
BatchAbove 272,000$4.00$0.40$5.00$10.00$15.00
FlexUp to 272,000$2.00$0.20$2.50$5.00$10.00
FlexAbove 272,000$4.00$0.40$5.00$10.00$15.00
FastUp to 272,000$8.00$0.80$10.00$20.00$40.00
FastAbove 272,000$16.00$1.60$20.00$40.00$60.00
gpt-5.6-terra
TierContextInputCached inputCache write 30 minCache write 12 hOutput
StandardUp to 272,000$2.00$0.20$2.50$5.00$12.00
StandardAbove 272,000$4.00$0.40$5.00$10.00$18.00
BatchUp to 272,000$1.00$0.10$1.25$2.50$6.00
BatchAbove 272,000$2.00$0.20$2.50$5.00$9.00
FlexUp to 272,000$1.00$0.10$1.25$2.50$6.00
FlexAbove 272,000$2.00$0.20$2.50$5.00$9.00
FastUp to 272,000$4.00$0.40$5.00$10.00$24.00
FastAbove 272,000$8.00$0.80$10.00$20.00$36.00
gpt-5.6-luna
TierContextInputCached inputCache write 30 minCache write 12 hOutput
StandardUp to 272,000$0.20$0.02$0.25$0.50$1.20
StandardAbove 272,000$0.40$0.04$0.50$1.00$1.80
BatchUp to 272,000$0.10$0.01$0.125$0.25$0.60
BatchAbove 272,000$0.20$0.02$0.25$0.50$0.90
FlexUp to 272,000$0.10$0.01$0.125$0.25$0.60
FlexAbove 272,000$0.20$0.02$0.25$0.50$0.90
FastUp to 272,000$0.40$0.04$0.50$1.00$2.40
FastAbove 272,000$0.80$0.08$1.00$2.00$3.60
gpt-5.5
TierContextInputCached inputCache write 30 minCache write 12 hOutput
StandardUp to 272,000$5.00$0.50$5.00$5.00$30.00
StandardAbove 272,000$10.00$1.00$10.00$10.00$45.00
BatchUp to 272,000$2.50$0.25$2.50$2.50$15.00
BatchAbove 272,000$5.00$0.50$5.00$5.00$22.50
FlexUp to 272,000$2.50$0.25$2.50$2.50$15.00
FlexAbove 272,000$5.00$0.50$5.00$5.00$22.50
FastUp to 272,000$10.00$1.00$10.00$10.00$60.00
FastAbove 272,000$20.00$2.00$20.00$20.00$90.00
gpt-5.4
TierContextInputCached inputCache write 30 minCache write 12 hOutput
StandardUp to 272,000$2.50$0.25$2.50$2.50$15.00
StandardAbove 272,000$5.00$0.50$5.00$5.00$22.50
BatchUp to 272,000$1.25$0.125$1.25$1.25$7.50
BatchAbove 272,000$2.50$0.25$2.50$2.50$11.25
FlexUp to 272,000$1.25$0.125$1.25$1.25$7.50
FlexAbove 272,000$2.50$0.25$2.50$2.50$11.25
FastUp to 272,000$5.00$0.50$5.00$5.00$30.00
FastAbove 272,000$10.00$1.00$10.00$10.00$45.00
gpt-5.4-mini
TierContextInputCached inputCache write 30 minCache write 12 hOutput
StandardUp to 272,000$0.75$0.075$0.75$0.75$4.50
StandardAbove 272,000$1.50$0.15$1.50$1.50$6.75
BatchUp to 272,000$0.375$0.038$0.375$0.375$2.25
BatchAbove 272,000$0.75$0.075$0.75$0.75$3.38
FlexUp to 272,000$0.375$0.038$0.375$0.375$2.25
FlexAbove 272,000$0.75$0.075$0.75$0.75$3.38
FastUp to 272,000$1.50$0.15$1.50$1.50$9.00
FastAbove 272,000$3.00$0.30$3.00$3.00$13.50

Files and model listing are free.