Document the per-1,000-request price denomination - #13
Merged
Conversation
Every static discovery offer now publishes its maximum twice: `maxUsd` for one request and `maxPer1kUsd` for 1,000 of them, with `failoverMaxPer1kUsd` as the twin of `failoverMaxUsd`. Lane-level `pricing` objects carry `maxPer1kUsd` too. The docs enumerated only the per-request half, so a reader building against discovery could not find the field AnyAPI quotes customers in. Per 1,000 requests is the customer-facing standard because most of the catalog costs a fraction of a cent per call. Each page that lists the discovery pricing fields now also states that adapters read the published per-1k figure rather than multiplying `maxUsd`, which drifts in floating point, that `baseUsd` and `perUnitUsd` have no per-1k twin, and that amounts naming what a specific call costs stay per request. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The worked examples showed maxUsd 0.003 where production publishes 0.0009, and a failover ceiling of 0.003 where production publishes 0.0036. The per-1k figures added alongside were internally consistent with the stale number, so the page taught the right rule with the wrong price. Verified against GET /catalog today: reddit.search is $0.0009 per request, $0.90/1k req, failover ceiling $0.0036 and $3.60/1k req. The run_api costUsd example follows the same price.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The gateway publishes every static discovery maximum in two denominations. The docs enumerated only the per-request half, so a reader building against discovery could not find the field AnyAPI actually quotes customers in.
pricing.from.maxUsdpricing.from.maxPer1kUsdpricing.failoverMaxUsdpricing.failoverMaxPer1kUsdLane-level
pricingobjects carrymaxPer1kUsdtoo.Pages
index.mdx- new### Every static price in two denominationssubsection under Pricing: the field table above, per 1,000 requests as the quoting denomination and why, read the published field rather than multiplying,baseUsd/perUnitUsdhave no per-1k twin, and per-call amounts (maxCostUsd/minCostUsd,costUsd, wallet balance) stay per request.quickstart.mdx- the "Find an API" discovery-fields paragraph now names both denominations and the same five rules in short form.mcp-server.mdx- thesearch_apisandget_apiworked-example JSON now carrymaxPer1kUsdandfailoverMaxPer1kUsd(including on the lane object). The paragraph after them explains both denominations, the quoting standard, the float-drift warning, and thatcostUsdfromrun_apiandbalanceUsdfromget_balancestay per request.cli.mdx- the static-discovery-pricing paragraph listsmaxPer1kUsdin both the flat and linear field sets and namespricing.failoverMaxPer1kUsd; a following paragraph carries the quoting rule and theanyapi balanceper-request boundary.sdks.mdx- the gateway-published-facts section gains the two denominations, the quoting standard, and the no-per-1k-twin boundary.n8n.mdx- the gateway/node responsibilities section gains the same field pair and the read-do-not-scale rule.agent-skills.mdx- "check the per-request USD price" is now "check its published USD price", the only line implying per-request was the customer-facing quoting convention.Not changed
openapi.jsonand the generated API Reference. That snapshot is dispatched on gateway deploy and is never hand-edited. Its per-SKU descriptions already quote per 1,000 requests.pagination.mdx(referencespricingandcostUsdwithout enumerating fields; both statements remain correct),agent-payments.mdxandapi-keys.mdx(per-request actuals, which stay per request by contract), andsell/*(operator list price is already stated per 1,000 requests).Gate
bash scripts/check-agent-contract.shalso passes:agent contract guard: ok (docs root is schema-first; universal field claims absent).🤖 Generated with Claude Code