Skip to main content
@ai-billing/nextjs
@ai-billing/nextjs / server / createOpenAIWithBilling

Function: createOpenAIWithBilling()

createOpenAIWithBilling(modelId): LanguageModel
Defined in: packages/nextjs/src/wrapped.ts:51 Returns an OpenAI language model wrapped with Narev pricing and Polar billing.

Parameters

modelId

string The OpenAI model ID (e.g. "gpt-4o").

Returns

LanguageModel
Last modified on October 29, 2026