Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api-reference/chat-completions.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ WWW-Authenticate: X402 requirements="<same value>"
}
```

**How the quote is computed.** Estimated input tokens at the model's input rate, plus **10% of `max_tokens`** at the output rate — most calls use a small fraction of their ceiling. Per-token chat carries **no platform margin** (list price, since 2026-08-07); the quote is floored at $0.001 and then the flat **$0.001 per-request transaction fee** is added. `amount` is in micro-USDC (6 decimals). The settled amount is the signed amount — there is no post-hoc refund when the model uses fewer tokens, so set `max_tokens` to what you need. Prompts at or above a model's long-context threshold re-price the whole request at that model's long-context rates.
**How the quote is computed.** Estimated input tokens at the model's input rate, plus **50% of `max_tokens`** at the output rate. Per-token chat carries **no platform margin** (list price, since 2026-08-07); the quote is floored at $0.001 and then the flat **$0.001 per-request transaction fee** is added. `amount` is in micro-USDC (6 decimals). The settled amount is the signed amount — there is no post-hoc refund when the model uses fewer tokens, so set `max_tokens` to what you need. Prompts at or above a model's long-context threshold re-price the whole request at that model's long-context rates.

### Payment rejected (402 with a `code`)

Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/responses.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ All paid OpenAI models: GPT-5.x (including `-pro` tiers), o-series, and the code

Identical to Chat Completions: send the request without payment, receive a `402` with a USDC quote, sign the x402 authorization, and resend with the `PAYMENT-SIGNATURE` header. The [SDKs](../getting-started/sdk-developers.md) handle this automatically.

The quote is estimated input tokens plus **10% of `max_output_tokens`** at the model's list rates (per-token chat carries no platform margin), floored at $0.001, plus the flat **$0.001 transaction fee** — so the smallest possible charge is $0.002. The `402` body uses the OpenAI error envelope:
The quote is estimated input tokens plus **50% of `max_output_tokens`** at the model's list rates (per-token chat carries no platform margin), floored at $0.001, plus the flat **$0.001 transaction fee** — so the smallest possible charge is $0.002. The `402` body uses the OpenAI error envelope:

```json
{
Expand Down
9 changes: 8 additions & 1 deletion docs/resources/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ description: All notable changes to BlockRun — gateway endpoints, model lineup

All notable changes to BlockRun, newest first — gateway endpoints, model lineup, pricing, and SDK releases.

## [2026-10-30]

### Changed — Pay-per-call chat quotes half of `max_tokens` as output
- A pay-per-call chat request is charged before it runs: its input plus **half** of its `max_tokens` as output. The charge is still fixed up front and settled as quoted, so set `max_tokens` to what you need: a lower `max_tokens` is a lower price.
- GPT-6 `reasoning_effort` no longer raises the price on top of this: every effort is quoted at half of `max_tokens`, which is above what the measured effort factors came to.
- Applies on blockrun.ai to `/v1/chat/completions`, `/v1/messages`, `/v1/responses` and native Gemini. Metered API-key billing (user.blockrun.ai, api.blockrun.ai) bills actual usage and is unaffected.

## [2026-10-25]

### Added — Kimi K3.1 Pro
Expand All @@ -17,7 +24,7 @@ All notable changes to BlockRun, newest first — gateway endpoints, model lineu
## [2026-10-10]

### Changed — GPT-6 calls are priced by reasoning effort
- A pay-per-call chat request is charged before it runs: its input plus a tenth of its `max_tokens` as output. On GPT-6, higher `reasoning_effort` spends more reasoning, which bills as output; measured on GPT-6.1 Sol, `high` ran up to 2.3x the output of `medium`, `xhigh` up to 2.5x, `max` up to 4.4x.
- A pay-per-call chat request is charged before it runs: its input plus a share of its `max_tokens` as output. On GPT-6, higher `reasoning_effort` spends more reasoning, which bills as output; measured on GPT-6.1 Sol, `high` ran up to 2.3x the output of `medium`, `xhigh` up to 2.5x, `max` up to 4.4x.
- On every GPT-6 model the output share of the quote now scales with the effort requested: **2.5x at `high`, 3x at `xhigh`, 4.5x at `max`**, never past `max_tokens`. No effort, `low` and `medium` are charged exactly as before. On plain chat, where `max` is served as `xhigh`, it is charged as `xhigh`.
- This applies to `/v1/chat/completions` and `/v1/responses`. Metered API-key billing (user.blockrun.ai, api.blockrun.ai) bills actual usage and is unaffected.

Expand Down
2 changes: 1 addition & 1 deletion docs/x402/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ When you make a request without payment, the server returns HTTP 402 with:

The requirements are base64-encoded in three equivalent headers — `PAYMENT-REQUIRED` (x402 v2), `X-Payment-Required`, and `WWW-Authenticate: X402 requirements="…"` — and the JSON body repeats the price as `price.amount` in USD, plus the challenge itself (`x402Version`, `accepts`) mirrored at the top level for clients that only read the body.

On BlockRun the price for chat is the model's list rate — estimated input tokens plus 10% of `max_tokens` output — with no platform margin, plus a flat **$0.001 transaction fee** per paid call. Media generation (image, video, music, speech) and Live Search carry a 5% margin on top of their list rate, plus the same fee.
On BlockRun the price for chat is the model's list rate — estimated input tokens plus 50% of `max_tokens` output — with no platform margin, plus a flat **$0.001 transaction fee** per paid call. Media generation (image, video, music, speech) and Live Search carry a 5% margin on top of their list rate, plus the same fee.

### Payment Authorization

Expand Down
2 changes: 1 addition & 1 deletion docs/x402/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ No. BlockRun can only claim the exact amount you authorized for a specific reque

Verification happens first and settlement only after the upstream response, so a request that fails on OUR side — the upstream returning `4xx`/`5xx`, a `504` timeout, or a JSON-RPC `-32603` internal error — is never settled, and the payment authorization is released so an honest retry verifies cleanly.

**What you do pay for is the upstream round trip, not a successful answer.** A request that reaches the provider and is rejected because of what you sent — an unknown JSON-RPC method (`-32601`), invalid params (`-32602`), a reverted `eth_call` — settles normally. We made the call and paid for it upstream; the error is the answer to the question you asked. Malformed requests we can reject locally, before contacting anyone, are always free. Async media jobs are settled when the job completes, not when it is submitted. The one thing you cannot get back is tokens the model actually generated: the settled amount for chat is the quoted amount (estimated input + 10% of `max_tokens`), whether the model used all of it or not.
**What you do pay for is the upstream round trip, not a successful answer.** A request that reaches the provider and is rejected because of what you sent — an unknown JSON-RPC method (`-32601`), invalid params (`-32602`), a reverted `eth_call` — settles normally. We made the call and paid for it upstream; the error is the answer to the question you asked. Malformed requests we can reject locally, before contacting anyone, are always free. Async media jobs are settled when the job completes, not when it is submitted. The one thing you cannot get back is tokens the model actually generated: the settled amount for chat is the quoted amount (estimated input + 50% of `max_tokens`), whether the model used all of it or not.

### Can someone replay my payment?

Expand Down
Loading