Skip to main content
@ai-billing/core
@ai-billing/core / createV4BillingMiddleware

Function: createV4BillingMiddleware()

createV4BillingMiddleware<TTags>(options): LanguageModelV4Middleware
Defined in: packages/core/src/ai-sdk/language-model-middleware/v4/language-model-v4-base-billing-middleware.ts:49 Creates a billing middleware for the Language Model V4 API.

Type Parameters

TTags

TTags extends JSONObject = JSONObject The shape of the tags object, extending DefaultTags.

Parameters

options

BillingMiddlewareV4Options<TTags> Billing options; see BillingMiddlewareV4Options.

Returns

LanguageModelV4Middleware The billing middleware.
Last modified on October 29, 2026