IronStratum

POST /v1/hf/billing

Hugging Face provider settlement batch lookup

HF's documented settlement protocol (verified 2026-08-21): a batch of request ids, answered with one entry per id with a known in-window cost. Dedicated channel-hf env key only — any other valid key is 403 channel_key_required. Idempotent on the append-only ledger. Unknown-yet ids are omitted (HF retries on its next run) and ids past the ~30-minute settlement horizon are omitted (HF has given up) — omission, not an error code, is this protocol's unknown/expired model. Nothing known → {"requests":null}. A malformed body is 400 invalid_json; an absent or non-array requestIds field is 400 invalid_param (house taxonomy, pre-existing codes). This URL is registered with HF at application.

Request

Request body fields for queryHfBillingBatch
Field Type Required Description
requestIds array of string yes The x-request-id values the gateway stamped on the routed requests.

Responses

200 One entry per known in-window request id.

200 response fields for queryHfBillingBatch
Field Type Required Description
requests array of object no The JSON null literal (not []) when no id is answerable.

400 400

400 response fields for queryHfBillingBatch
Field Type Required Description
error object yes —

401 401

401 response fields for queryHfBillingBatch
Field Type Required Description
error object yes —

403 403

403 response fields for queryHfBillingBatch
Field Type Required Description
error object yes —

500 500

500 response fields for queryHfBillingBatch
Field Type Required Description
error object yes —

Example

curl -X POST https://api.ironstratum.com/v1/hf/billing \
  -H "Authorization: Bearer $IRONSTRATUM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"requestIds":["<requestIds>"]}'

All operations · interactive reference · openapi.yaml