five-on-it / apps/creator/src/openrouter / OpenRouterOptions
Interface: OpenRouterOptions
Defined in: apps/creator/src/openrouter.ts:29
How to reach OpenRouter, and with which models.
Properties
apiKey
apiKey:
string
Defined in: apps/creator/src/openrouter.ts:31
The API key (never a creator's own: the platform's, OPENROUTER_API_KEY).
backoffMs?
optionalbackoffMs?:number
Defined in: apps/creator/src/openrouter.ts:43
fetch?
optionalfetch?: {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Defined in: apps/creator/src/openrouter.ts:45
The HTTP client.
Call Signature
(
input,init?):Promise<Response>
Parameters
input
URL | RequestInfo
init?
RequestInit
Returns
Promise<Response>
Call Signature
(
input,init?):Promise<Response>
Parameters
input
string | URL | Request
init?
RequestInit
Returns
Promise<Response>
models
models: readonly
string[]
Defined in: apps/creator/src/openrouter.ts:33
The models in order: the first is asked, the others are its fallbacks.
price?
optionalprice?:Price
Defined in: apps/creator/src/openrouter.ts:35
What a call costs at most, the dearest of the models (fetchPrices); a conservative guess when not known.
referer?
optionalreferer?:string
Defined in: apps/creator/src/openrouter.ts:39
The platform's address and name, which OpenRouter's dashboard shows.
retries?
optionalretries?:number
Defined in: apps/creator/src/openrouter.ts:42
How often a busy or broken provider is tried again (2 by default), and the first wait (ms).
title?
optionaltitle?:string
Defined in: apps/creator/src/openrouter.ts:40
url?
optionalurl?:string
Defined in: apps/creator/src/openrouter.ts:37
The endpoint (OpenRouter's by default).