PublicPricing - TypeScript SDK
PublicPricing - TypeScript SDK
PublicPricing type definition
Pricing information for the model
Example Usage
1 import { PublicPricing } from "@openrouter/sdk/models"; 2 3 let value: PublicPricing = { 4 completion: "0.00006", 5 prompt: "0.00003", 6 };
Fields
| Field | Type | Required | Description |
|---|---|---|---|
audio | string | ➖ | Price in USD per audio input token |
audioOutput | string | ➖ | Price in USD per audio output token |
completion | string | ✔️ | Price in USD per token for completion (output) generation |
discount | number | ➖ | Fractional discount applied to this endpoint’s pricing; the price is multiplied by (1 - discount) (0 = no discount, 1 = free) |
image | string | ➖ | Price in USD per input image |
imageOutput | string | ➖ | Price in USD per output image |
imageToken | string | ➖ | Price in USD per image token |
inputAudioCache | string | ➖ | Price in USD per cached audio input token |
inputCacheRead | string | ➖ | Price in USD per cached input token (read) |
inputCacheWrite | string | ➖ | Price per cache-write token, in USD per token. For providers with multiple cache TTLs (e.g. Anthropic), this is the default (5-minute) cache-write rate. |
inputCacheWrite1h | string | ➖ | Price per 1-hour cache-write token, in USD per token. Only present for providers that price an extended (1-hour) cache TTL separately, such as Anthropic. |
internalReasoning | string | ➖ | Price in USD per internal reasoning token |
prompt | string | ✔️ | Price in USD per token for prompt (input) processing |
request | string | ➖ | Price in USD per request |
webSearch | string | ➖ | Price in USD per web search |