@blockrun/llm 2.8.0 → 2.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 +14 -2
- package/dist/index.cjs +28 -9
- package/dist/index.d.cts +29 -10
- package/dist/index.d.ts +29 -10
- package/dist/index.js +28 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -299,7 +299,8 @@ Released 2026-04-23 — first fully retrained base since GPT-4.5. 1M context, 12
|
|
|
299
299
|
### Anthropic Claude
|
|
300
300
|
| Model | Input Price | Output Price | Context | Notes |
|
|
301
301
|
|-------|-------------|--------------|---------|-------|
|
|
302
|
-
| `anthropic/claude-opus-4.
|
|
302
|
+
| `anthropic/claude-opus-4.8` | $5.00/M | $25.00/M | **1M** | Flagship — agentic coding + adaptive thinking, 128K output |
|
|
303
|
+
| `anthropic/claude-opus-4.7` | $5.00/M | $25.00/M | **1M** | Agentic coding + adaptive thinking, 128K output |
|
|
303
304
|
| `anthropic/claude-opus-4.6` | $5.00/M | $25.00/M | 200K | Hidden but still callable — kept as in-family hot-swap fallback |
|
|
304
305
|
| `anthropic/claude-opus-4.5` | $5.00/M | $25.00/M | 200K | |
|
|
305
306
|
| `anthropic/claude-opus-4` | $15.00/M | $75.00/M | 200K | |
|
|
@@ -311,6 +312,7 @@ Released 2026-04-23 — first fully retrained base since GPT-4.5. 1M context, 12
|
|
|
311
312
|
| Model | Input Price | Output Price |
|
|
312
313
|
|-------|-------------|--------------|
|
|
313
314
|
| `google/gemini-3.1-pro` | $2.00/M | $12.00/M |
|
|
315
|
+
| `google/gemini-3.5-flash` | $0.50/M | $3.00/M |
|
|
314
316
|
| `google/gemini-3.1-flash-lite` | $0.25/M | $1.50/M |
|
|
315
317
|
| `google/gemini-3-flash-preview` | $0.50/M | $3.00/M |
|
|
316
318
|
| `google/gemini-2.5-pro` | $1.25/M | $10.00/M |
|
|
@@ -406,7 +408,17 @@ All models below have been tested end-to-end via the TypeScript SDK (Feb 2026):
|
|
|
406
408
|
| `xai/grok-imagine-image-pro` | $0.07/image |
|
|
407
409
|
| `zai/cogview-4` | $0.015/image |
|
|
408
410
|
|
|
409
|
-
Image editing (`client.edit`)
|
|
411
|
+
Image editing (`client.edit`) via `/v1/images/image2image`: `openai/gpt-image-1`, `openai/gpt-image-2`, `google/nano-banana`, and `google/nano-banana-pro`. Pass a single base64 `data:image/...` URI to edit one image, or an array of 2–4 URIs to **fuse** them (e.g. a subject + a brand logo). Fusion caps: `openai/*` up to 4 source images, `google/*` up to 3. A `mask` cannot be combined with multiple source images.
|
|
412
|
+
|
|
413
|
+
```ts
|
|
414
|
+
// Multi-image fusion with Nano Banana
|
|
415
|
+
const fused = await client.edit(
|
|
416
|
+
"Place the logo on the t-shirt",
|
|
417
|
+
[subjectDataUri, logoDataUri],
|
|
418
|
+
{ model: "google/nano-banana" }
|
|
419
|
+
);
|
|
420
|
+
console.log(fused.data[0].url);
|
|
421
|
+
```
|
|
410
422
|
|
|
411
423
|
### Video Generation
|
|
412
424
|
| Model | Price |
|
package/dist/index.cjs
CHANGED
|
@@ -1463,16 +1463,18 @@ var LLMClient = class _LLMClient {
|
|
|
1463
1463
|
return data.data || [];
|
|
1464
1464
|
}
|
|
1465
1465
|
/**
|
|
1466
|
-
* Edit an image using img2img.
|
|
1466
|
+
* Edit an image using img2img, optionally fusing multiple source images.
|
|
1467
1467
|
*
|
|
1468
1468
|
* @param prompt - Text description of the desired edit
|
|
1469
|
-
* @param image -
|
|
1469
|
+
* @param image - A base64 `data:image/...` URI, or an array of 2–4 such URIs
|
|
1470
|
+
* to fuse (image fusion). Caps: `openai/*` up to 4, `google/*` up to 3.
|
|
1471
|
+
* A `mask` cannot be combined with multiple source images.
|
|
1470
1472
|
* @param options - Optional edit parameters
|
|
1471
1473
|
* @returns ImageResponse with edited image URLs
|
|
1472
1474
|
*/
|
|
1473
1475
|
async imageEdit(prompt, image, options) {
|
|
1474
1476
|
const body = {
|
|
1475
|
-
model: options?.model || "openai/gpt-image-
|
|
1477
|
+
model: options?.model || "openai/gpt-image-2",
|
|
1476
1478
|
prompt,
|
|
1477
1479
|
image,
|
|
1478
1480
|
size: options?.size || "1024x1024",
|
|
@@ -1972,20 +1974,37 @@ var ImageClient = class {
|
|
|
1972
1974
|
return this.requestWithPayment("/v1/images/generations", body);
|
|
1973
1975
|
}
|
|
1974
1976
|
/**
|
|
1975
|
-
* Edit an image using img2img.
|
|
1977
|
+
* Edit an image using img2img, optionally fusing multiple source images.
|
|
1978
|
+
*
|
|
1979
|
+
* Pass a single `data:image/...` base64 data URI to edit one image, or an
|
|
1980
|
+
* array of 2–4 data URIs to fuse them (image fusion) — e.g. a reference photo
|
|
1981
|
+
* plus a brand logo. The server caps fusion per provider: `openai/*` accepts
|
|
1982
|
+
* up to 4 source images, `google/*` (Nano Banana) up to 3. A `mask` cannot be
|
|
1983
|
+
* combined with multiple source images.
|
|
1984
|
+
*
|
|
1985
|
+
* Edit-capable models: `openai/gpt-image-1`, `openai/gpt-image-2`,
|
|
1986
|
+
* `google/nano-banana`, `google/nano-banana-pro`.
|
|
1976
1987
|
*
|
|
1977
1988
|
* @param prompt - Text description of the desired edit
|
|
1978
|
-
* @param image -
|
|
1989
|
+
* @param image - A base64 `data:image/...` URI, or an array of 2–4 such URIs to fuse
|
|
1979
1990
|
* @param options - Optional edit parameters
|
|
1980
1991
|
* @returns ImageResponse with edited image URLs
|
|
1981
1992
|
*
|
|
1982
1993
|
* @example
|
|
1983
|
-
*
|
|
1984
|
-
*
|
|
1994
|
+
* // Single-image edit
|
|
1995
|
+
* const result = await client.edit('Make it a painting', imageDataUri);
|
|
1996
|
+
*
|
|
1997
|
+
* @example
|
|
1998
|
+
* // Multi-image fusion (Nano Banana): blend a subject with a brand logo
|
|
1999
|
+
* const fused = await client.edit(
|
|
2000
|
+
* 'Place the logo on the t-shirt',
|
|
2001
|
+
* [subjectDataUri, logoDataUri],
|
|
2002
|
+
* { model: 'google/nano-banana' }
|
|
2003
|
+
* );
|
|
1985
2004
|
*/
|
|
1986
2005
|
async edit(prompt, image, options) {
|
|
1987
2006
|
const body = {
|
|
1988
|
-
model: options?.model || "openai/gpt-image-
|
|
2007
|
+
model: options?.model || "openai/gpt-image-2",
|
|
1989
2008
|
prompt,
|
|
1990
2009
|
image,
|
|
1991
2010
|
size: options?.size || "1024x1024",
|
|
@@ -4632,7 +4651,7 @@ var SolanaLLMClient = class {
|
|
|
4632
4651
|
/** Edit an image using img2img (Solana payment). */
|
|
4633
4652
|
async imageEdit(prompt, image, options) {
|
|
4634
4653
|
const body = {
|
|
4635
|
-
model: options?.model || "openai/gpt-image-
|
|
4654
|
+
model: options?.model || "openai/gpt-image-2",
|
|
4636
4655
|
prompt,
|
|
4637
4656
|
image,
|
|
4638
4657
|
size: options?.size || "1024x1024",
|
package/dist/index.d.cts
CHANGED
|
@@ -335,7 +335,7 @@ interface SearchResult {
|
|
|
335
335
|
model?: string;
|
|
336
336
|
}
|
|
337
337
|
interface ImageEditOptions {
|
|
338
|
-
/** Model ID (default: "openai/gpt-image-
|
|
338
|
+
/** Model ID (default: "openai/gpt-image-2") */
|
|
339
339
|
model?: string;
|
|
340
340
|
/** Optional base64-encoded mask image */
|
|
341
341
|
mask?: string;
|
|
@@ -1158,14 +1158,16 @@ declare class LLMClient {
|
|
|
1158
1158
|
*/
|
|
1159
1159
|
private fetchRawModels;
|
|
1160
1160
|
/**
|
|
1161
|
-
* Edit an image using img2img.
|
|
1161
|
+
* Edit an image using img2img, optionally fusing multiple source images.
|
|
1162
1162
|
*
|
|
1163
1163
|
* @param prompt - Text description of the desired edit
|
|
1164
|
-
* @param image -
|
|
1164
|
+
* @param image - A base64 `data:image/...` URI, or an array of 2–4 such URIs
|
|
1165
|
+
* to fuse (image fusion). Caps: `openai/*` up to 4, `google/*` up to 3.
|
|
1166
|
+
* A `mask` cannot be combined with multiple source images.
|
|
1165
1167
|
* @param options - Optional edit parameters
|
|
1166
1168
|
* @returns ImageResponse with edited image URLs
|
|
1167
1169
|
*/
|
|
1168
|
-
imageEdit(prompt: string, image: string, options?: ImageEditOptions): Promise<ImageResponse>;
|
|
1170
|
+
imageEdit(prompt: string, image: string | string[], options?: ImageEditOptions): Promise<ImageResponse>;
|
|
1169
1171
|
/**
|
|
1170
1172
|
* Standalone search (web, X/Twitter, news).
|
|
1171
1173
|
*
|
|
@@ -1478,18 +1480,35 @@ declare class ImageClient {
|
|
|
1478
1480
|
*/
|
|
1479
1481
|
generate(prompt: string, options?: ImageGenerateOptions): Promise<ImageResponse>;
|
|
1480
1482
|
/**
|
|
1481
|
-
* Edit an image using img2img.
|
|
1483
|
+
* Edit an image using img2img, optionally fusing multiple source images.
|
|
1484
|
+
*
|
|
1485
|
+
* Pass a single `data:image/...` base64 data URI to edit one image, or an
|
|
1486
|
+
* array of 2–4 data URIs to fuse them (image fusion) — e.g. a reference photo
|
|
1487
|
+
* plus a brand logo. The server caps fusion per provider: `openai/*` accepts
|
|
1488
|
+
* up to 4 source images, `google/*` (Nano Banana) up to 3. A `mask` cannot be
|
|
1489
|
+
* combined with multiple source images.
|
|
1490
|
+
*
|
|
1491
|
+
* Edit-capable models: `openai/gpt-image-1`, `openai/gpt-image-2`,
|
|
1492
|
+
* `google/nano-banana`, `google/nano-banana-pro`.
|
|
1482
1493
|
*
|
|
1483
1494
|
* @param prompt - Text description of the desired edit
|
|
1484
|
-
* @param image -
|
|
1495
|
+
* @param image - A base64 `data:image/...` URI, or an array of 2–4 such URIs to fuse
|
|
1485
1496
|
* @param options - Optional edit parameters
|
|
1486
1497
|
* @returns ImageResponse with edited image URLs
|
|
1487
1498
|
*
|
|
1488
1499
|
* @example
|
|
1489
|
-
*
|
|
1490
|
-
*
|
|
1500
|
+
* // Single-image edit
|
|
1501
|
+
* const result = await client.edit('Make it a painting', imageDataUri);
|
|
1502
|
+
*
|
|
1503
|
+
* @example
|
|
1504
|
+
* // Multi-image fusion (Nano Banana): blend a subject with a brand logo
|
|
1505
|
+
* const fused = await client.edit(
|
|
1506
|
+
* 'Place the logo on the t-shirt',
|
|
1507
|
+
* [subjectDataUri, logoDataUri],
|
|
1508
|
+
* { model: 'google/nano-banana' }
|
|
1509
|
+
* );
|
|
1491
1510
|
*/
|
|
1492
|
-
edit(prompt: string, image: string, options?: ImageEditOptions): Promise<ImageResponse>;
|
|
1511
|
+
edit(prompt: string, image: string | string[], options?: ImageEditOptions): Promise<ImageResponse>;
|
|
1493
1512
|
/**
|
|
1494
1513
|
* List available image generation models with pricing.
|
|
1495
1514
|
*
|
|
@@ -2504,7 +2523,7 @@ declare class SolanaLLMClient {
|
|
|
2504
2523
|
*/
|
|
2505
2524
|
getBalance(): Promise<number>;
|
|
2506
2525
|
/** Edit an image using img2img (Solana payment). */
|
|
2507
|
-
imageEdit(prompt: string, image: string, options?: ImageEditOptions): Promise<ImageResponse>;
|
|
2526
|
+
imageEdit(prompt: string, image: string | string[], options?: ImageEditOptions): Promise<ImageResponse>;
|
|
2508
2527
|
/** Standalone search (Solana payment). */
|
|
2509
2528
|
search(query: string, options?: SearchOptions): Promise<SearchResult>;
|
|
2510
2529
|
xUserLookup(usernames: string | string[]): Promise<XUserLookupResponse>;
|
package/dist/index.d.ts
CHANGED
|
@@ -335,7 +335,7 @@ interface SearchResult {
|
|
|
335
335
|
model?: string;
|
|
336
336
|
}
|
|
337
337
|
interface ImageEditOptions {
|
|
338
|
-
/** Model ID (default: "openai/gpt-image-
|
|
338
|
+
/** Model ID (default: "openai/gpt-image-2") */
|
|
339
339
|
model?: string;
|
|
340
340
|
/** Optional base64-encoded mask image */
|
|
341
341
|
mask?: string;
|
|
@@ -1158,14 +1158,16 @@ declare class LLMClient {
|
|
|
1158
1158
|
*/
|
|
1159
1159
|
private fetchRawModels;
|
|
1160
1160
|
/**
|
|
1161
|
-
* Edit an image using img2img.
|
|
1161
|
+
* Edit an image using img2img, optionally fusing multiple source images.
|
|
1162
1162
|
*
|
|
1163
1163
|
* @param prompt - Text description of the desired edit
|
|
1164
|
-
* @param image -
|
|
1164
|
+
* @param image - A base64 `data:image/...` URI, or an array of 2–4 such URIs
|
|
1165
|
+
* to fuse (image fusion). Caps: `openai/*` up to 4, `google/*` up to 3.
|
|
1166
|
+
* A `mask` cannot be combined with multiple source images.
|
|
1165
1167
|
* @param options - Optional edit parameters
|
|
1166
1168
|
* @returns ImageResponse with edited image URLs
|
|
1167
1169
|
*/
|
|
1168
|
-
imageEdit(prompt: string, image: string, options?: ImageEditOptions): Promise<ImageResponse>;
|
|
1170
|
+
imageEdit(prompt: string, image: string | string[], options?: ImageEditOptions): Promise<ImageResponse>;
|
|
1169
1171
|
/**
|
|
1170
1172
|
* Standalone search (web, X/Twitter, news).
|
|
1171
1173
|
*
|
|
@@ -1478,18 +1480,35 @@ declare class ImageClient {
|
|
|
1478
1480
|
*/
|
|
1479
1481
|
generate(prompt: string, options?: ImageGenerateOptions): Promise<ImageResponse>;
|
|
1480
1482
|
/**
|
|
1481
|
-
* Edit an image using img2img.
|
|
1483
|
+
* Edit an image using img2img, optionally fusing multiple source images.
|
|
1484
|
+
*
|
|
1485
|
+
* Pass a single `data:image/...` base64 data URI to edit one image, or an
|
|
1486
|
+
* array of 2–4 data URIs to fuse them (image fusion) — e.g. a reference photo
|
|
1487
|
+
* plus a brand logo. The server caps fusion per provider: `openai/*` accepts
|
|
1488
|
+
* up to 4 source images, `google/*` (Nano Banana) up to 3. A `mask` cannot be
|
|
1489
|
+
* combined with multiple source images.
|
|
1490
|
+
*
|
|
1491
|
+
* Edit-capable models: `openai/gpt-image-1`, `openai/gpt-image-2`,
|
|
1492
|
+
* `google/nano-banana`, `google/nano-banana-pro`.
|
|
1482
1493
|
*
|
|
1483
1494
|
* @param prompt - Text description of the desired edit
|
|
1484
|
-
* @param image -
|
|
1495
|
+
* @param image - A base64 `data:image/...` URI, or an array of 2–4 such URIs to fuse
|
|
1485
1496
|
* @param options - Optional edit parameters
|
|
1486
1497
|
* @returns ImageResponse with edited image URLs
|
|
1487
1498
|
*
|
|
1488
1499
|
* @example
|
|
1489
|
-
*
|
|
1490
|
-
*
|
|
1500
|
+
* // Single-image edit
|
|
1501
|
+
* const result = await client.edit('Make it a painting', imageDataUri);
|
|
1502
|
+
*
|
|
1503
|
+
* @example
|
|
1504
|
+
* // Multi-image fusion (Nano Banana): blend a subject with a brand logo
|
|
1505
|
+
* const fused = await client.edit(
|
|
1506
|
+
* 'Place the logo on the t-shirt',
|
|
1507
|
+
* [subjectDataUri, logoDataUri],
|
|
1508
|
+
* { model: 'google/nano-banana' }
|
|
1509
|
+
* );
|
|
1491
1510
|
*/
|
|
1492
|
-
edit(prompt: string, image: string, options?: ImageEditOptions): Promise<ImageResponse>;
|
|
1511
|
+
edit(prompt: string, image: string | string[], options?: ImageEditOptions): Promise<ImageResponse>;
|
|
1493
1512
|
/**
|
|
1494
1513
|
* List available image generation models with pricing.
|
|
1495
1514
|
*
|
|
@@ -2504,7 +2523,7 @@ declare class SolanaLLMClient {
|
|
|
2504
2523
|
*/
|
|
2505
2524
|
getBalance(): Promise<number>;
|
|
2506
2525
|
/** Edit an image using img2img (Solana payment). */
|
|
2507
|
-
imageEdit(prompt: string, image: string, options?: ImageEditOptions): Promise<ImageResponse>;
|
|
2526
|
+
imageEdit(prompt: string, image: string | string[], options?: ImageEditOptions): Promise<ImageResponse>;
|
|
2508
2527
|
/** Standalone search (Solana payment). */
|
|
2509
2528
|
search(query: string, options?: SearchOptions): Promise<SearchResult>;
|
|
2510
2529
|
xUserLookup(usernames: string | string[]): Promise<XUserLookupResponse>;
|
package/dist/index.js
CHANGED
|
@@ -1360,16 +1360,18 @@ var LLMClient = class _LLMClient {
|
|
|
1360
1360
|
return data.data || [];
|
|
1361
1361
|
}
|
|
1362
1362
|
/**
|
|
1363
|
-
* Edit an image using img2img.
|
|
1363
|
+
* Edit an image using img2img, optionally fusing multiple source images.
|
|
1364
1364
|
*
|
|
1365
1365
|
* @param prompt - Text description of the desired edit
|
|
1366
|
-
* @param image -
|
|
1366
|
+
* @param image - A base64 `data:image/...` URI, or an array of 2–4 such URIs
|
|
1367
|
+
* to fuse (image fusion). Caps: `openai/*` up to 4, `google/*` up to 3.
|
|
1368
|
+
* A `mask` cannot be combined with multiple source images.
|
|
1367
1369
|
* @param options - Optional edit parameters
|
|
1368
1370
|
* @returns ImageResponse with edited image URLs
|
|
1369
1371
|
*/
|
|
1370
1372
|
async imageEdit(prompt, image, options) {
|
|
1371
1373
|
const body = {
|
|
1372
|
-
model: options?.model || "openai/gpt-image-
|
|
1374
|
+
model: options?.model || "openai/gpt-image-2",
|
|
1373
1375
|
prompt,
|
|
1374
1376
|
image,
|
|
1375
1377
|
size: options?.size || "1024x1024",
|
|
@@ -1869,20 +1871,37 @@ var ImageClient = class {
|
|
|
1869
1871
|
return this.requestWithPayment("/v1/images/generations", body);
|
|
1870
1872
|
}
|
|
1871
1873
|
/**
|
|
1872
|
-
* Edit an image using img2img.
|
|
1874
|
+
* Edit an image using img2img, optionally fusing multiple source images.
|
|
1875
|
+
*
|
|
1876
|
+
* Pass a single `data:image/...` base64 data URI to edit one image, or an
|
|
1877
|
+
* array of 2–4 data URIs to fuse them (image fusion) — e.g. a reference photo
|
|
1878
|
+
* plus a brand logo. The server caps fusion per provider: `openai/*` accepts
|
|
1879
|
+
* up to 4 source images, `google/*` (Nano Banana) up to 3. A `mask` cannot be
|
|
1880
|
+
* combined with multiple source images.
|
|
1881
|
+
*
|
|
1882
|
+
* Edit-capable models: `openai/gpt-image-1`, `openai/gpt-image-2`,
|
|
1883
|
+
* `google/nano-banana`, `google/nano-banana-pro`.
|
|
1873
1884
|
*
|
|
1874
1885
|
* @param prompt - Text description of the desired edit
|
|
1875
|
-
* @param image -
|
|
1886
|
+
* @param image - A base64 `data:image/...` URI, or an array of 2–4 such URIs to fuse
|
|
1876
1887
|
* @param options - Optional edit parameters
|
|
1877
1888
|
* @returns ImageResponse with edited image URLs
|
|
1878
1889
|
*
|
|
1879
1890
|
* @example
|
|
1880
|
-
*
|
|
1881
|
-
*
|
|
1891
|
+
* // Single-image edit
|
|
1892
|
+
* const result = await client.edit('Make it a painting', imageDataUri);
|
|
1893
|
+
*
|
|
1894
|
+
* @example
|
|
1895
|
+
* // Multi-image fusion (Nano Banana): blend a subject with a brand logo
|
|
1896
|
+
* const fused = await client.edit(
|
|
1897
|
+
* 'Place the logo on the t-shirt',
|
|
1898
|
+
* [subjectDataUri, logoDataUri],
|
|
1899
|
+
* { model: 'google/nano-banana' }
|
|
1900
|
+
* );
|
|
1882
1901
|
*/
|
|
1883
1902
|
async edit(prompt, image, options) {
|
|
1884
1903
|
const body = {
|
|
1885
|
-
model: options?.model || "openai/gpt-image-
|
|
1904
|
+
model: options?.model || "openai/gpt-image-2",
|
|
1886
1905
|
prompt,
|
|
1887
1906
|
image,
|
|
1888
1907
|
size: options?.size || "1024x1024",
|
|
@@ -4529,7 +4548,7 @@ var SolanaLLMClient = class {
|
|
|
4529
4548
|
/** Edit an image using img2img (Solana payment). */
|
|
4530
4549
|
async imageEdit(prompt, image, options) {
|
|
4531
4550
|
const body = {
|
|
4532
|
-
model: options?.model || "openai/gpt-image-
|
|
4551
|
+
model: options?.model || "openai/gpt-image-2",
|
|
4533
4552
|
prompt,
|
|
4534
4553
|
image,
|
|
4535
4554
|
size: options?.size || "1024x1024",
|