@blockrun/clawrouter 0.12.245 → 0.12.247
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 +11 -11
- package/dist/cli.js +189 -70
- package/dist/index.d.ts +16 -3
- package/dist/index.js +189 -70
- package/dist/router/index.js +48 -33
- package/docs/anthropic-cost-savings.md +1 -1
- package/docs/anthropic-third-party-harness-changes.md +2 -2
- package/docs/clawrouter-cuts-llm-api-costs-500x.md +1 -1
- package/docs/clawrouter-vs-openrouter-llm-routing-comparison.md +3 -3
- package/docs/configuration.md +2 -9
- package/docs/image-generation.md +34 -23
- package/package.json +3 -3
- package/scripts/reinstall.sh +1 -1
- package/skills/clawrouter/SKILL.md +5 -5
- package/skills/imagegen/SKILL.md +9 -7
|
@@ -222,7 +222,7 @@ OpenRouter doesn't always pass through provider-specific features correctly. Ima
|
|
|
222
222
|
|
|
223
223
|
**Direct provider routing.** ClawRouter routes through BlockRun's API directly to providers — not through a second aggregator. One hop, not two. Provider-specific features work because there's no middleman translating them.
|
|
224
224
|
|
|
225
|
-

|
|
226
226
|
|
|
227
227
|
---
|
|
228
228
|
|
|
@@ -240,7 +240,7 @@ When new models launch, OpenRouter's catalog lags. Users configure a model that
|
|
|
240
240
|
|
|
241
241
|
### How ClawRouter Solves This
|
|
242
242
|
|
|
243
|
-
ClawRouter maintains a curated catalog of <!-- br:models.chatVisible -->
|
|
243
|
+
ClawRouter maintains a curated catalog of <!-- br:models.chatVisible -->71<!-- /br:models.chatVisible --> models across 9 providers (including 9 free models), updated with each release. Delisted models have automatic redirect aliases:
|
|
244
244
|
|
|
245
245
|
```typescript
|
|
246
246
|
// Delisted models redirect automatically
|
|
@@ -268,7 +268,7 @@ No silent drops. No stale catalog. Models are benchmarked for speed, quality, an
|
|
|
268
268
|
| **Rate limits** | Per-key, shared | Per-wallet, independent |
|
|
269
269
|
| **Vision support** | Images sometimes dropped | Auto-detected, vision-only fallback |
|
|
270
270
|
| **Tool calling** | Silent failures with some models | Flag-based filtering, guaranteed support |
|
|
271
|
-
| **Model catalog** | Laggy, silent drops | Curated <!-- br:models.chatVisible -->
|
|
271
|
+
| **Model catalog** | Laggy, silent drops | Curated <!-- br:models.chatVisible -->71<!-- /br:models.chatVisible --> models, redirect aliases |
|
|
272
272
|
| **Budget control** | Monthly invoice | Per-session cap (`maxCostPerRun`) |
|
|
273
273
|
| **Setup** | Create account, paste key | Agent generates wallet, auto-configured |
|
|
274
274
|
| **Average cost** | $25/M tokens (Opus direct) | auto-routed = **<!-- br:savings.autoVsBaselinePct -->88<!-- /br:savings.autoVsBaselinePct -->% savings** |
|
package/docs/configuration.md
CHANGED
|
@@ -158,17 +158,10 @@ Response (dual-chain):
|
|
|
158
158
|
|
|
159
159
|
```bash
|
|
160
160
|
/wallet solana # Switch to Solana USDC payments
|
|
161
|
-
/wallet base # Switch
|
|
161
|
+
/wallet base # Switch to Base (EVM) USDC payments
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
```bash
|
|
167
|
-
/chain solana
|
|
168
|
-
/chain base
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
The selected chain is persisted across gateway restarts.
|
|
164
|
+
The selected chain is persisted across gateway restarts (in `~/.openclaw/blockrun/payment-chain`). New installs default to **Solana** (persisted when the wallet is first generated); existing installs without a saved selection stay on **Base**, where their funds already live. The `CLAWROUTER_PAYMENT_CHAIN` environment variable (`solana` or `base`) overrides the persisted selection.
|
|
172
165
|
|
|
173
166
|
### Switch Wallets
|
|
174
167
|
|
package/docs/image-generation.md
CHANGED
|
@@ -51,16 +51,22 @@ The returned URL is a publicly hosted image, ready to use in Telegram, Discord,
|
|
|
51
51
|
|
|
52
52
|
## Models & Pricing
|
|
53
53
|
|
|
54
|
-
| Model ID
|
|
55
|
-
|
|
|
56
|
-
| `google/nano-banana`
|
|
57
|
-
| `google/nano-banana-
|
|
58
|
-
| `
|
|
59
|
-
| `openai/gpt-image-1`
|
|
60
|
-
| `
|
|
54
|
+
| Model ID | Shorthand | Price | Sizes | Provider |
|
|
55
|
+
| ---------------------------- | ------------------ | ------------------- | ---------------------------------------------------------------------------------- | --------------------- |
|
|
56
|
+
| `google/nano-banana` | `nano-banana` | $0.05/image | 1024×1024 | Google Gemini Flash |
|
|
57
|
+
| `google/nano-banana-2` | `banana-2` | $0.09/image | 1024×1024 | Google Nano Banana 2 |
|
|
58
|
+
| `google/nano-banana-pro` | `banana-pro` | $0.10–$0.15/image | 1024×1024, 2048×2048, 4096×4096 | Google Gemini Pro |
|
|
59
|
+
| `openai/gpt-image-1` | `gpt-image` | $0.02–$0.04/image | 1024×1024, 1536×1024, 1024×1536 | OpenAI GPT Image 1 |
|
|
60
|
+
| `openai/gpt-image-2` | `gpt-image-2` | $0.06–$0.12/image | 1024×1024, 1536×1024, 1024×1536 | OpenAI GPT Image 2 |
|
|
61
|
+
| `bytedance/seedream-5-pro` | `seedream` | $0.045–$0.09/image | 1024×1024, 1280×720, 2048×1024, 2048×2048, 2304×1728, 1728×2304, 2848×1600, 1600×2848 | ByteDance Seedream 5 |
|
|
62
|
+
| `xai/grok-imagine-image` | `grok-imagine` | $0.02/image | 1024×1024 | xAI Grok Imagine |
|
|
63
|
+
| `xai/grok-imagine-image-pro` | `grok-imagine-pro` | $0.07/image | 1024×1024 | xAI Grok Imagine Pro |
|
|
64
|
+
| `zai/cogview-4` | `cogview` | $0.015–$0.02/image | 512×512, 768×768, 1024×1024, 768×1344, 1344×768, 1440×1440 | Zhipu CogView-4 |
|
|
61
65
|
|
|
62
66
|
Default model: `google/nano-banana`.
|
|
63
67
|
|
|
68
|
+
> `openai/dall-e-3` was delisted upstream on 2026-05-25 and `black-forest/flux-1.1-pro` is no longer served; the legacy `dall-e-3` / `dalle` shorthands now route to `openai/gpt-image-2`. The gateway validates `size` per model **before** payment — sizes outside the lists above return an error and cost nothing. Slow models (notably `gpt-image-2`) can take longer than 30s; the proxy transparently polls the job for up to 5 minutes and still returns a single blocking response.
|
|
69
|
+
|
|
64
70
|
---
|
|
65
71
|
|
|
66
72
|
## API Reference
|
|
@@ -85,7 +91,7 @@ OpenAI-compatible endpoint. Route via ClawRouter proxy (`http://localhost:8402`)
|
|
|
85
91
|
created: number; // Unix timestamp
|
|
86
92
|
data: Array<{
|
|
87
93
|
url: string; // Publicly hosted image URL
|
|
88
|
-
revised_prompt?: string; // Model's rewritten prompt (
|
|
94
|
+
revised_prompt?: string; // Model's rewritten prompt (when the model provides one)
|
|
89
95
|
}>;
|
|
90
96
|
}
|
|
91
97
|
```
|
|
@@ -146,13 +152,13 @@ curl -X POST http://localhost:8402/v1/images/generations \
|
|
|
146
152
|
"n": 1
|
|
147
153
|
}'
|
|
148
154
|
|
|
149
|
-
#
|
|
155
|
+
# GPT Image 2 with landscape size ($0.12 — slow model, the proxy polls for you)
|
|
150
156
|
curl -X POST http://localhost:8402/v1/images/generations \
|
|
151
157
|
-H "Content-Type: application/json" \
|
|
152
158
|
-d '{
|
|
153
|
-
"model": "openai/
|
|
159
|
+
"model": "openai/gpt-image-2",
|
|
154
160
|
"prompt": "a serene Japanese garden in autumn",
|
|
155
|
-
"size": "
|
|
161
|
+
"size": "1536x1024",
|
|
156
162
|
"n": 1
|
|
157
163
|
}'
|
|
158
164
|
```
|
|
@@ -233,9 +239,9 @@ const response = await fetch(`${proxy.baseUrl}/v1/images/generations`, {
|
|
|
233
239
|
method: "POST",
|
|
234
240
|
headers: { "Content-Type": "application/json" },
|
|
235
241
|
body: JSON.stringify({
|
|
236
|
-
model: "
|
|
242
|
+
model: "bytedance/seedream-5-pro",
|
|
237
243
|
prompt: "a serene Japanese garden in autumn",
|
|
238
|
-
size: "
|
|
244
|
+
size: "2048x1024",
|
|
239
245
|
n: 1,
|
|
240
246
|
}),
|
|
241
247
|
});
|
|
@@ -335,7 +341,7 @@ When using ClawRouter with OpenClaw, generate and edit images directly from any
|
|
|
335
341
|
|
|
336
342
|
```
|
|
337
343
|
/cr-imagegen a dog dancing on the beach
|
|
338
|
-
/cr-imagegen --model
|
|
344
|
+
/cr-imagegen --model gpt-image-2 a futuristic city at sunset
|
|
339
345
|
/cr-imagegen --model banana-pro --size 2048x2048 mountain landscape
|
|
340
346
|
```
|
|
341
347
|
|
|
@@ -363,13 +369,18 @@ When using ClawRouter with OpenClaw, generate and edit images directly from any
|
|
|
363
369
|
|
|
364
370
|
### Model shorthands
|
|
365
371
|
|
|
366
|
-
| Shorthand
|
|
367
|
-
|
|
|
368
|
-
| `nano-banana`
|
|
369
|
-
| `banana-
|
|
370
|
-
| `
|
|
371
|
-
| `gpt-image`
|
|
372
|
-
| `
|
|
372
|
+
| Shorthand | Full ID |
|
|
373
|
+
| ------------------------------------ | ---------------------------- |
|
|
374
|
+
| `nano-banana`, `banana` | `google/nano-banana` |
|
|
375
|
+
| `banana-2`, `nano-banana-2` | `google/nano-banana-2` |
|
|
376
|
+
| `banana-pro`, `nano-banana-pro` | `google/nano-banana-pro` |
|
|
377
|
+
| `gpt-image`, `gpt-image-1` | `openai/gpt-image-1` |
|
|
378
|
+
| `gpt-image-2` | `openai/gpt-image-2` |
|
|
379
|
+
| `seedream` | `bytedance/seedream-5-pro` |
|
|
380
|
+
| `grok-imagine` | `xai/grok-imagine-image` |
|
|
381
|
+
| `grok-imagine-pro` | `xai/grok-imagine-image-pro` |
|
|
382
|
+
| `cogview` | `zai/cogview-4` |
|
|
383
|
+
| `dall-e-3`, `dalle3`, `dalle` (legacy) | `openai/gpt-image-2` |
|
|
373
384
|
|
|
374
385
|
---
|
|
375
386
|
|
|
@@ -377,6 +388,6 @@ When using ClawRouter with OpenClaw, generate and edit images directly from any
|
|
|
377
388
|
|
|
378
389
|
- **Local image caching** — All images (generated and edited) are cached locally at `~/.openclaw/blockrun/images/` and served via `http://localhost:8402/images/`. Both base64 data URIs and HTTP URLs from upstream are downloaded and replaced with localhost URLs.
|
|
379
390
|
- **Payment** — Each image costs the listed price in USDC, deducted from your wallet via x402. Make sure your wallet is funded before generating or editing.
|
|
380
|
-
- **
|
|
381
|
-
- **Size limits** —
|
|
391
|
+
- **Content policy** — OpenAI image models (GPT Image 1/2) apply OpenAI's content policy. Use `nano-banana` or `grok-imagine` for more flexibility with generation.
|
|
392
|
+
- **Size limits** — The gateway validates `size` per model before payment; a size outside the model's list returns an error and costs nothing. Check the table above before setting `--size`.
|
|
382
393
|
- **Image editing** — The `/v1/images/image2image` endpoint currently supports `openai/gpt-image-1` (default). The `image` and `mask` fields accept local file paths (`~/photo.png`, `/abs/path.png`), HTTP/HTTPS URLs, or base64 data URIs. ClawRouter handles file reading and URL downloading automatically. Supported formats: PNG, JPG/JPEG, WebP.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockrun/clawrouter",
|
|
3
|
-
"version": "0.12.
|
|
4
|
-
"description": "Smart LLM router — save 88% on inference costs.
|
|
3
|
+
"version": "0.12.247",
|
|
4
|
+
"description": "Smart LLM router — save 88% on inference costs. 71 models (5 free), one wallet, x402 micropayments.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
|
-
"@blockrun/router-core": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/
|
|
113
|
+
"@blockrun/router-core": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/d7bc10ce184b3daa40bcc115b523fd629d847a52",
|
|
114
114
|
"@eslint/js": "^10.0.1",
|
|
115
115
|
"eslint": "^10.2.0",
|
|
116
116
|
"openclaw": "^2026.7.2-beta.7",
|
package/scripts/reinstall.sh
CHANGED
|
@@ -899,7 +899,7 @@ echo " /exclude add <model> → block a model from routing"
|
|
|
899
899
|
echo ""
|
|
900
900
|
echo "Image generation:"
|
|
901
901
|
echo " /imagegen <prompt> # default: nano-banana"
|
|
902
|
-
echo " /imagegen --model
|
|
902
|
+
echo " /imagegen --model gpt-image-2 <prompt> # GPT Image 2"
|
|
903
903
|
echo " /imagegen --model gpt-image <prompt> # GPT Image 1"
|
|
904
904
|
echo ""
|
|
905
905
|
echo "CLI commands:"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: clawrouter
|
|
3
|
-
description: Hosted-gateway LLM router — save 88% on inference costs. A local proxy that forwards each request to the blockrun.ai gateway, which routes to the cheapest capable model across
|
|
3
|
+
description: Hosted-gateway LLM router — save 88% on inference costs. A local proxy that forwards each request to the blockrun.ai gateway, which routes to the cheapest capable model across 71 models from OpenAI, Anthropic, Google, DeepSeek, xAI, NVIDIA, and more. 5 free NVIDIA models included. Also exposes realtime market data (global stocks, crypto, FX, commodities), Twitter/X intelligence, prediction-market data across Polymarket, Kalshi, Limitless, Opinion, Predict.Fun, dFlow + UMA oracle resolution + wallet identity & clustering, phone-number intelligence (carrier + SIM-swap fraud detection) plus AI-powered outbound voice calls (Twilio + Bland.ai), AND the Surf unified crypto data API (84 endpoints — CEX/DEX, on-chain SQL over 80+ ClickHouse tables, 100M+ labeled wallets, prediction markets, social/CT mindshare, news, VC fund intel) as built-in agent tools. Not a local-inference tool — prompts are sent to the blockrun.ai gateway.
|
|
4
4
|
triggers:
|
|
5
5
|
- "clawrouter"
|
|
6
6
|
- "claw router"
|
|
@@ -53,7 +53,7 @@ metadata:
|
|
|
53
53
|
|
|
54
54
|
# ClawRouter
|
|
55
55
|
|
|
56
|
-
Hosted-gateway LLM router that saves <!-- br:savings.autoVsBaselinePct -->88<!-- /br:savings.autoVsBaselinePct -->% on inference costs by forwarding each request to the blockrun.ai gateway, which picks the cheapest model capable of handling it across <!-- br:models.chatVisible -->
|
|
56
|
+
Hosted-gateway LLM router that saves <!-- br:savings.autoVsBaselinePct -->88<!-- /br:savings.autoVsBaselinePct -->% on inference costs by forwarding each request to the blockrun.ai gateway, which picks the cheapest model capable of handling it across <!-- br:models.chatVisible -->71<!-- /br:models.chatVisible --> models from 9 providers (<!-- br:models.free -->5<!-- /br:models.free --> free NVIDIA models). All billing flows through one USDC wallet; you do not hold provider API keys.
|
|
57
57
|
|
|
58
58
|
**This is not a local-inference tool.** ClawRouter is a thin local proxy. Your prompts are sent over HTTPS to the blockrun.ai gateway for model execution. If your workload requires inference that never leaves your machine, use a local runtime like Ollama — ClawRouter is not the right tool for that use case.
|
|
59
59
|
|
|
@@ -85,7 +85,7 @@ ClawRouter does **not** collect or forward third-party provider API keys. You do
|
|
|
85
85
|
| ----------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
86
86
|
| `walletKey` | Yes | EVM private key used to sign USDC micropayments via x402. **Auto-generated locally on first run** — no user input required. Never transmitted over the network; only detached payment signatures are sent. |
|
|
87
87
|
| `solanaKey` | Yes | Solana keypair (BIP-44 `m/44'/501'/0'/0'`). Auto-derived from the same local mnemonic via `@scure/bip32` + `@scure/bip39`. |
|
|
88
|
-
| `gateway` | No | Gateway URL. Defaults: `https://blockrun.ai/api` (
|
|
88
|
+
| `gateway` | No | Gateway URL. Defaults: `https://sol.blockrun.ai/api` (Solana, default chain for new installs) · `https://blockrun.ai/api` (Base, default for pre-existing installs). |
|
|
89
89
|
| `routing` | No | Optional override of the default four-tier router. |
|
|
90
90
|
|
|
91
91
|
**How and where keys are stored:**
|
|
@@ -141,7 +141,7 @@ Rules handle ~~80% of requests in <1ms. Only ambiguous queries hit the LLM class
|
|
|
141
141
|
|
|
142
142
|
## Available Models
|
|
143
143
|
|
|
144
|
-
<!-- br:models.chatVisible -->
|
|
144
|
+
<!-- br:models.chatVisible -->71<!-- /br:models.chatVisible --> models including: gpt-5.6-terra [balanced, stable default], gpt-5.6-sol [flagship], gpt-5.6-luna [cost-efficient], gpt-5.6-sol/terra/luna-pro [pro reasoning tiers], gpt-5.5, gpt-5.5-pro [max compute], chat-latest [ChatGPT Instant], gpt-5.4, gpt-4o, o3, claude-fable-5, claude-opus-5 [Anthropic flagship, 1M ctx], claude-opus-4.8, claude-opus-4.7, claude-opus-4.5, claude-sonnet-5, claude-sonnet-4.6, gemini-3.1-pro, gemini-3.6-flash, gemini-3.5-flash-lite, gemini-2.5-flash, deepseek-v4-pro, deepseek-chat, grok-4.5, grok-4.3, grok-build-0.1, kimi-k3 [1M ctx flagship], kimi-k2.7, qwen3.7-max [Qwen flagship, 1M ctx], qwen3.7-plus, qwen3.7-flash, hy3 [Tencent], mimo [Xiaomi MiMo-V2.5 Pro, 1M ctx], and 5 free NVIDIA models (nemotron-3-nano-omni-30b-a3b-reasoning [vision], mistral-nemotron, step-3.7-flash, nemotron-nano-9b-v2, nemotron-nano-12b-v2-vl [vision]).
|
|
145
145
|
|
|
146
146
|
## Built-in Agent Tools
|
|
147
147
|
|
|
@@ -164,7 +164,7 @@ Realtime prices and historical OHLC across every asset class. The agent should c
|
|
|
164
164
|
|
|
165
165
|
| Tool | Purpose | Price |
|
|
166
166
|
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- |
|
|
167
|
-
| `blockrun_image_generation` |
|
|
167
|
+
| `blockrun_image_generation` | 9 image models — GPT Image 1/2, Nano Banana / 2 / Pro, Seedream 5 Pro, Grok Imagine / Pro, CogView-4 | $0.015–$0.15 / image |
|
|
168
168
|
| `blockrun_image_edit` | Edit / inpaint existing image (openai/gpt-image-1) | $0.02–$0.04 / image |
|
|
169
169
|
| `blockrun_video_generation` | Grok Imagine + ByteDance Seedance (1.5-pro / 2.0-fast / 2.0) at 720p with synced audio (t2v default), 5–10s, + OpenAI Sora 2 via Azure (`azure/sora-2`, 4/8/12s, t2v + i2v, rejects human faces in reference images). Seedance is token-priced upstream (~20,256 tokens/sec at the 720p+audio default — 2× the prior 480p rate); `image_url` (image-to-video) costs the same as t2v since 2026-06-01. Seedance 2.0 variants accept optional `real_face_asset_id` (`ta_…`) for BytePlus RealFace character-consistency — mutually exclusive with `image_url`. | $0.05/s (Grok); $0.10/s (Sora 2); Seedance ~$0.46–$1.49 per 5s clip |
|
|
170
170
|
|
package/skills/imagegen/SKILL.md
CHANGED
|
@@ -57,8 +57,9 @@ Display inline: ``
|
|
|
57
57
|
|
|
58
58
|
| Alias | Full ID | Price | Sizes | Best for |
|
|
59
59
|
| ------------------ | ---------------------------- | ------------ | ------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
60
|
-
| `nano-banana` | `google/nano-banana` | $0.05 | 1024×1024
|
|
61
|
-
| `banana-
|
|
60
|
+
| `nano-banana` | `google/nano-banana` | $0.05 | 1024×1024 | Default — fast, cheap, good quality |
|
|
61
|
+
| `banana-2` | `google/nano-banana-2` | $0.09 | 1024×1024 | Gemini 3.1 Flash imagegen — sharper than nano-banana at 1K |
|
|
62
|
+
| `banana-pro` | `google/nano-banana-pro` | $0.10–$0.15 | 1024×1024, 2048×2048, 4096×4096 | High-res, large format |
|
|
62
63
|
| `gpt-image` | `openai/gpt-image-1` | $0.02–$0.04 | 1024×1024, 1536×1024, 1024×1536 | Budget option; supports editing |
|
|
63
64
|
| `gpt-image-2` | `openai/gpt-image-2` | $0.06–$0.12 | 1024×1024, 1536×1024, 1024×1536 | Photorealistic, reasoning-driven, text rendering (slow — proxy polls up to 5min); legacy `dalle` alias routes here |
|
|
64
65
|
| `seedream` | `bytedance/seedream-5-pro` | $0.045–$0.09 | up to 2848×1600 / 2304×1728 | Flagship quality, reference-image support |
|
|
@@ -79,10 +80,11 @@ Display inline: ``
|
|
|
79
80
|
|
|
80
81
|
**Choosing a size:**
|
|
81
82
|
|
|
82
|
-
- Default: `1024x1024`
|
|
83
|
-
- Portrait: `
|
|
84
|
-
- Landscape: `1536x1024` (gpt-image / gpt-image-2) or `
|
|
85
|
-
- High-res: `2048x2048`
|
|
83
|
+
- Default: `1024x1024` (the only size every model accepts)
|
|
84
|
+
- Portrait: `1024x1536` (gpt-image / gpt-image-2) or `1728x2304` (seedream)
|
|
85
|
+
- Landscape: `1536x1024` (gpt-image / gpt-image-2), `1344x768` (cogview), or `2048x1024` / `1280x720` (seedream)
|
|
86
|
+
- High-res: `2048x2048` / `4096x4096` with `banana-pro`; `2848x1600` with `seedream`
|
|
87
|
+
- The gateway validates size per model BEFORE payment and rejects unknown ones — do not invent sizes outside each model's list above
|
|
86
88
|
|
|
87
89
|
---
|
|
88
90
|
|
|
@@ -123,7 +125,7 @@ Response is identical to generation:
|
|
|
123
125
|
→ POST to `/v1/images/generations`, model `nano-banana`, prompt as given.
|
|
124
126
|
|
|
125
127
|
**User:** Generate a high-res portrait of a samurai
|
|
126
|
-
→ POST to `/v1/images/generations`, model `
|
|
128
|
+
→ POST to `/v1/images/generations`, model `seedream`, size `1728x2304`.
|
|
127
129
|
|
|
128
130
|
**User:** Edit this photo to add a sunset background: https://example.com/portrait.jpg
|
|
129
131
|
→ POST to `/v1/images/image2image`, model `gpt-image`, image = the URL, prompt = "add a warm sunset background".
|