Document inference-id billing request IDs - #50
Merged
Merged
Conversation
Adds a per-request costs section to the usage reporting guide (the inference-id response header on /v1/chat/completions and /v1/messages, the UUIDv5 derivation from the response body id, the x-request-id pitfall, and /v1/billing/costs zero-for-unknown semantics), and updates the checked-in OpenAPI entries for /v1/billing/costs to match the new upstream annotations so the reference page is correct before the next sync.
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.
Companion to nearai/cloud-api#978 (fixes nearai/cloud-api#969).
inference-idresponse header on/v1/chat/completionsand/v1/messages, its UUIDv5 derivation from the response bodyid, thex-request-idpitfall, a curl walkthrough, and thecostNanoUsd: 0+warningsemantics ofPOST /v1/billing/costs.api-reference/openapi.json: the/v1/billing/costsentries updated to byte-match the new upstream utoipa annotations (endpoint description,requestIdsdescription, new optionalwarningresponse field), so the reference page is correct now and the nextscripts/sync-openapi.pyrun is a no-op for these entries.Note: the guide documents the
inference-idheader on/v1/messages, which ships with cloud-api#978 — merge that first (the chat-completions half is already live).