@aaronjmars/openroutercli 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/SKILL.md +5 -1
- package/package.json +1 -1
- package/src/commands/image.js +15 -1
- package/src/commands/models.js +11 -0
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ and run `openrouter login --management`.
|
|
|
78
78
|
| **Multi-format inference** | `chat` (OpenAI), `messages` (Anthropic), `responses` (OpenAI Responses) - same auth, same flags, same JSON contract. |
|
|
79
79
|
| **Batches** | `batches {create,list,get,wait,results,delete}` - send a JSONL file of chat / responses / messages / embeddings requests as one async job at about half price. |
|
|
80
80
|
| **Embeddings + rerank + speech + video** | `embed` (text or images), `rerank`, `speech` (tone instructions, multi-speaker turns, voice references), `transcribe` (URL input, speaker labels, key terms, word timestamps), `video {create,wait,download}` (resolution, first/last frame, references, audio, extend) - async video jobs poll-until-done with `video wait <jobId>`. |
|
|
81
|
-
| **Model discovery with detail** | `models list` (filter, sort by price/context), `models show <id>` (full pricing breakdown - prompt, completion, cache r/w, reasoning, image, web search), `models endpoints <id> --sort throughput\|latency\|prompt\|completion\|uptime --best` for choosing the right provider variant. |
|
|
81
|
+
| **Model discovery with detail** | `models list` (filter, sort by price/context, `--endpoints` by API path served), `models show <id>` (full pricing breakdown - prompt, completion, cache r/w, reasoning, image, web search), `models endpoints <id> --sort throughput\|latency\|prompt\|completion\|uptime --best` for choosing the right provider variant. |
|
|
82
82
|
| **Benchmarks + rankings** | `benchmarks`, `classifications`, and `datasets {apps,daily,session-cost}` expose OpenRouter's current public benchmark and usage datasets. |
|
|
83
83
|
| **Management analytics** | `analytics meta` discovers fields; `analytics query` runs metrics/dimensions/time-range queries with a management key. |
|
|
84
84
|
| **Structured decisions** | `decisions` (alias `systemone`) calls System One for typed choice, score, and yes/no outputs, with optional image inputs (`--image`) and named image assets (`--assets`). `extract` (alias `extractions`, alpha) pulls typed fields (text, number, date, list, estimate, forecast...) out of text or attached image/PDF assets. |
|
|
@@ -131,6 +131,10 @@ openrouter chat "What is 2+2?" -m openai/gpt-4o-mini \
|
|
|
131
131
|
openrouter tools list
|
|
132
132
|
openrouter chat "What's new today?" -m openai/gpt-4o-mini --server-tool web_search
|
|
133
133
|
|
|
134
|
+
# Images: animated GIF output and markup-guided edits (gpt-image-2.6)
|
|
135
|
+
openrouter image "a spinning coin" -m openai/gpt-image-2.6-flare --format gif --frames 8 --frame-ms 100 -o coin.gif
|
|
136
|
+
openrouter image "put a hat here" -m openai/gpt-image-2.6-flare --image ./cat.png --markup ./circle.png
|
|
137
|
+
|
|
134
138
|
# Batches at about half price
|
|
135
139
|
openrouter batches create --endpoint chat -m openai/gpt-4o-mini --file reqs.jsonl --callback-url https://example.com/webhook
|
|
136
140
|
openrouter batches wait <id> && openrouter batches results <id> -o out.jsonl
|
|
@@ -139,6 +143,7 @@ openrouter batches wait <id> && openrouter batches results <id> -o out.jsonl
|
|
|
139
143
|
openrouter models --filter claude --sort prompt
|
|
140
144
|
openrouter models user --order newest
|
|
141
145
|
openrouter models user --client codex # only models a coding harness offers
|
|
146
|
+
openrouter models --endpoints /api/alpha/extractions # models served on an API path
|
|
142
147
|
openrouter models show anthropic/claude-sonnet-4.5
|
|
143
148
|
openrouter models endpoints anthropic/claude-sonnet-4.5 --sort throughput --best
|
|
144
149
|
|
package/SKILL.md
CHANGED
|
@@ -222,6 +222,9 @@ openrouter transcribe ./talk.mp3 -m elevenlabs/scribe-v2 --keyterms OpenRouter,B
|
|
|
222
222
|
# Image generation (writes image-0.png, ...): tier or exact size, reference images
|
|
223
223
|
openrouter image "a red bike on a beach" -m google/gemini-2.5-flash-image -o bike.png
|
|
224
224
|
openrouter image "same bike, at night" -m google/gemini-2.5-flash-image --image ./bike.png --resolution 2K
|
|
225
|
+
# Animated GIF (2-64 frames, 20-2000 ms each) and a markup overlay guiding an edit (openai/gpt-image-2.6-*)
|
|
226
|
+
openrouter image "a spinning coin" -m openai/gpt-image-2.6-flare --format gif --frames 8 --frame-ms 100 -o coin.gif
|
|
227
|
+
openrouter image "put a hat here" -m openai/gpt-image-2.6-flare --image ./cat.png --markup ./circle.png
|
|
225
228
|
|
|
226
229
|
# Video jobs: frames, references, audio, extend
|
|
227
230
|
openrouter video create "a sunset over mountains" -m google/veo-3 --resolution 1080p --audio
|
|
@@ -243,8 +246,9 @@ openrouter models --output-modalities image # image-OUTPUT models
|
|
|
243
246
|
openrouter models user --order newest # account-filtered models, server-side sort
|
|
244
247
|
openrouter models user --client codex # models the named harness offers (claude_code|claude_desktop|codex); honors --harness-models guardrails
|
|
245
248
|
openrouter models --supported tools # filter by capability
|
|
249
|
+
openrouter models --endpoints /api/v1/messages # only models served on these API paths (csv, all must match)
|
|
246
250
|
# Full detail for one model: pricing breakdown, architecture, supported params,
|
|
247
|
-
# reasoning config, supported voices
|
|
251
|
+
# API paths it is served on, reasoning config, supported voices
|
|
248
252
|
openrouter models show anthropic/claude-sonnet-4.5
|
|
249
253
|
|
|
250
254
|
# Supported request parameters (undocumented endpoint, may change)
|
package/package.json
CHANGED
package/src/commands/image.js
CHANGED
|
@@ -38,7 +38,12 @@ create options:
|
|
|
38
38
|
--image <url|path> Reference image for image-to-image (repeatable, max 16);
|
|
39
39
|
local files are sent as data URLs
|
|
40
40
|
--quality <q> auto | low | medium | high | xhigh | max
|
|
41
|
-
--format <fmt> png | jpeg | webp | svg
|
|
41
|
+
--format <fmt> png | jpeg | webp | svg | gif (gif = animation on models
|
|
42
|
+
that support it, e.g. openai/gpt-image-2.6-*)
|
|
43
|
+
--frames <n> Animation frames, 2-64 (gif only)
|
|
44
|
+
--frame-ms <ms> Display time per frame, 20-2000 ms (gif only)
|
|
45
|
+
--markup <url|path> Transparent PNG overlay (arrows, circles) the size of
|
|
46
|
+
the first --image, guiding where an edit applies
|
|
42
47
|
--compression <n> 0-100, webp/jpeg only
|
|
43
48
|
--background <b> auto | transparent | opaque
|
|
44
49
|
--seed <n>
|
|
@@ -120,6 +125,9 @@ export async function imageCommand(argv) {
|
|
|
120
125
|
image: { type: "string", multiple: true },
|
|
121
126
|
quality: { type: "string" },
|
|
122
127
|
format: { type: "string" },
|
|
128
|
+
frames: { type: "string" },
|
|
129
|
+
"frame-ms": { type: "string" },
|
|
130
|
+
markup: { type: "string" },
|
|
123
131
|
compression: { type: "string" },
|
|
124
132
|
background: { type: "string" },
|
|
125
133
|
seed: { type: "string" },
|
|
@@ -146,6 +154,12 @@ export async function imageCommand(argv) {
|
|
|
146
154
|
}
|
|
147
155
|
if (values.quality) body.quality = values.quality;
|
|
148
156
|
if (values.format) body.output_format = values.format;
|
|
157
|
+
if (values.frames) body.frame_count = numberOption(values.frames, "--frames");
|
|
158
|
+
if (values["frame-ms"]) body.frame_duration_ms = numberOption(values["frame-ms"], "--frame-ms");
|
|
159
|
+
if (values.markup) {
|
|
160
|
+
if (!body.input_references) throw new Error("--markup needs at least one --image to edit");
|
|
161
|
+
body.markup = { type: "image_url", image_url: { url: await mediaUrl(values.markup) } };
|
|
162
|
+
}
|
|
149
163
|
if (values.compression)
|
|
150
164
|
body.output_compression = numberOption(values.compression, "--compression");
|
|
151
165
|
if (values.background) body.background = values.background;
|
package/src/commands/models.js
CHANGED
|
@@ -50,6 +50,9 @@ Options for list:
|
|
|
50
50
|
--providers <csv> Hosting provider names
|
|
51
51
|
--distillable <true|false> Filter by distillation capability
|
|
52
52
|
--zdr Only models with ZDR endpoints
|
|
53
|
+
--endpoints <csv> Only models served on every listed API path, e.g.
|
|
54
|
+
/api/v1/messages or /api/alpha/extractions
|
|
55
|
+
(without --output-modalities: every modality)
|
|
53
56
|
--region <region> Only models with endpoints in a data region: eu | us
|
|
54
57
|
--order <sort> Server-side sort: most-popular|newest|top-weekly|
|
|
55
58
|
pricing-low-to-high|pricing-high-to-low|
|
|
@@ -96,6 +99,7 @@ function listQuery(values) {
|
|
|
96
99
|
if (values.distillable !== undefined) query.distillable = values.distillable;
|
|
97
100
|
if (values.zdr) query.zdr = "true";
|
|
98
101
|
if (values.region) query.region = values.region;
|
|
102
|
+
if (values.endpoints) query.endpoints = values.endpoints;
|
|
99
103
|
return query;
|
|
100
104
|
}
|
|
101
105
|
|
|
@@ -117,6 +121,7 @@ const LIST_OPTIONS = {
|
|
|
117
121
|
distillable: { type: "string" },
|
|
118
122
|
zdr: { type: "boolean" },
|
|
119
123
|
region: { type: "string" },
|
|
124
|
+
endpoints: { type: "string" },
|
|
120
125
|
"min-age-days": { type: "string" },
|
|
121
126
|
"max-age-days": { type: "string" },
|
|
122
127
|
"min-intelligence-index": { type: "string" },
|
|
@@ -207,6 +212,12 @@ function renderModelDetail(m) {
|
|
|
207
212
|
outln(" " + ((m.supported_parameters || []).join(", ") || "-"));
|
|
208
213
|
outln("");
|
|
209
214
|
|
|
215
|
+
if (m.endpoints && m.endpoints.length) {
|
|
216
|
+
outln(c.bold("served on"));
|
|
217
|
+
outln(" " + m.endpoints.join(", "));
|
|
218
|
+
outln("");
|
|
219
|
+
}
|
|
220
|
+
|
|
210
221
|
if (m.reasoning && Object.keys(m.reasoning).length) {
|
|
211
222
|
outln(c.bold("reasoning"));
|
|
212
223
|
for (const [k, v] of Object.entries(m.reasoning)) {
|