Skip to content

Document inference-id billing request IDs - #50

Merged
PierreLeGuen merged 1 commit into
mainfrom
billing-costs-inference-id
Aug 25, 2026
Merged

PierreLeGuen merged 1 commit into
mainfrom
billing-costs-inference-id

Conversation

@PierreLeGuen

Copy link
Copy Markdown
Contributor

Companion to nearai/cloud-api#978 (fixes nearai/cloud-api#969).

  • New Per-Request Costs with an Inference API Key section in the usage reporting guide: the inference-id response header on /v1/chat/completions and /v1/messages, its UUIDv5 derivation from the response body id, the x-request-id pitfall, a curl walkthrough, and the costNanoUsd: 0 + warning semantics of POST /v1/billing/costs.
  • api-reference/openapi.json: the /v1/billing/costs entries updated to byte-match the new upstream utoipa annotations (endpoint description, requestIds description, new optional warning response field), so the reference page is correct now and the next scripts/sync-openapi.py run is a no-op for these entries.

Note: the guide documents the inference-id header on /v1/messages, which ships with cloud-api#978 — merge that first (the chat-completions half is already live).

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.
@PierreLeGuen
PierreLeGuen merged commit de98081 into main Aug 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/v1/billing/costs returns costNanoUsd 0 for completed sk_-key requests on both planes

1 participant