English

Request billing

Read the charge associated with a media job or text request.

Request billing

Read a billing record

curl "https://api.apimodel.store/v1/records/$MODELPORT_REQUEST_ID" \
  -H "Authorization: Bearer $MODELPORT_API_KEY"

Use the media job ID or the text request ID in X-ModelPort-Request-Id. Asynchronous media responses and billing records report the original hold in reserved_usd. The record reports the final charge in charged_usd when settled. Both fields use decimal strings in USD.

The record also includes data.task_id, data.settled, and the numeric USD charge in data.credits. Asynchronous media responses and signed callbacks provide numeric USD amounts in data.reservedCredits and data.credits. Before settlement, data.credits is null.

Chat Completions, Responses, Anthropic Messages, and Embeddings expose the numeric USD charge in usage.cost.charged. On synchronous requests it matches X-ModelPort-Cost and the billing record. For streamed chat completions, set stream_options.include_usage: true. The terminal Responses event and the Anthropic message_delta carry the settled amount. Gemini native clients can look up the record by request ID.

Browser clients calling https://api.apimodel.store can read the request ID, job ID, and cost response headers.