Openrouter
@sntxrr/openrouterv2026.06.20.1
01README
Chat completions and model catalog listing against the OpenRouter LLM gateway API
02Models
@sntxrr/openrouterv2026.06.20.1openrouter.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| apiKey | string | OpenRouter API key (sk-or-...) |
| baseUrl | string | |
| defaultModel? | string | Model slug used when a chat call doesn't override it, e.g. openai/gpt-4o-mini |
| siteUrl? | string | Sent as HTTP-Referer for OpenRouter's app rankings |
| siteName? | string | Sent as X-Title |
fn chat(messages: array, model?: string, temperature?: number, maxTokens?: number, requestId: string)
Send a chat completion request to OpenRouter
| Argument | Type | Description |
|---|---|---|
| messages | array | |
| model? | string | |
| temperature? | number | |
| maxTokens? | number | |
| requestId | string | Instance name for the stored completion — use distinct values to keep separate conversation histories |
fn listModels()
Fetch the current catalog of models available on OpenRouter
Resources
completion(infinite)— Chat completion response from OpenRouter
modelCatalog(infinite)— Snapshot of models available through OpenRouter
03Stats
A
100 / 100
Downloads
0
Archive size
6.2 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
04Platforms
05Labels