five-on-it / apps/creator/src/openrouter / fetchPrices
Function: fetchPrices()
fetchPrices(
models,options?):Promise<Price>
Defined in: apps/creator/src/openrouter.ts:74
The prices of the models a call may land on (the first and its fallbacks), read from OpenRouter's models endpoint: the dearest of each (USD a token in and out, and a request), so a call's bound holds whichever answers. Throws when OpenRouter cannot be asked or does not list one of them (a model renamed or retired: the runner does not start on it).
Parameters
models
readonly string[]
options?
fetch?
{(input, init?): Promise<Response>; (input, init?): Promise<Response>; }
url?
string
Returns
Promise<Price>