export type ContentPart = TextContent | ImageContentPart; export type Message = { role: 'user' | 'assistant' | 'system'; content: string | ContentPart[]; name?: string; } | { role: 'tool'; content: string; tool_call_id: string; name?: string; }; export type FunctionDescription = { description?: string; name: string; parameters: object; }; export type Tool = { type: 'function'; function: FunctionDescription; }; export type ToolChoice = 'none' | 'auto' | { type: 'function'; function: { name: string; }; }; export type ProviderPreferences = { /** List of provider slugs to try in order (e.g. ["anthropic", "openai"]) */ order?: string[]; /** default: true. Whether to allow backup providers when the primary is unavailable. */ allow_fallbacks?: boolean; /** default: false. Only use providers that support all parameters in your request. */ require_parameters?: boolean; /** default: 'allow'. Control whether to use providers that may store data. */ data_collection?: 'allow' | 'deny'; /** List of provider slugs to allow for this request. */ only?: string[]; /** List of provider slugs to skip for this request. */ ignore?: string[]; /** List of quantization levels to filter by (e.g. ["int4", "int8"]). */ quantizations?: string[]; /** Sort providers by price or throughput. (e.g. "price" or "throughput"). */ sort: string; /** The maximum pricing you want to pay for this request. */ max_price?: object; }; export type Request = { messages?: Message[] | string; prompt?: string; model?: string; /** The input to the model. Can be a string or an array of content parts. */ input?: string | Message[]; response_format?: { type: 'json_object'; }; stop?: string | string[]; stream?: boolean; max_tokens?: number; temperature?: number; tools?: Tool[]; tool_choice?: ToolChoice; seed?: number; top_p?: number; top_k?: number; frequency_penalty?: number; presence_penalty?: number; repetition_penalty?: number; logit_bias?: { [key: number]: number; }; top_logprobs: number; min_p?: number; top_a?: number; prediction?: { type: 'content'; content: string; }; transforms?: string[]; models?: string[]; route?: 'fallback'; provider?: ProviderPreferences; user?: string; }; export type TextContent = { type: 'text'; text: string; }; export type ImageContentPart = { type: 'image_url'; image_url: { url: string; }; }; export declare function getOpenRouterAllModels(): Promise; export declare function getOpenRouterFreeModels(): Promise<{ data: any; total: any; }>; export declare function getOpenRouterModelsByQuery(query: { input_modalities?: 'image' | 'text'; output_modalities?: 'text' | 'image'; q?: string; isFree?: boolean; }): Promise<{ data: any; total: any; }>; export type ChatRequest = Required>; export declare function chat(params: ChatRequest, apiKey: string): Promise; //# sourceMappingURL=openRuter-api.d.ts.map