@blockrun/llm 2.5.0 → 2.8.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 CHANGED
@@ -84,8 +84,8 @@ Four call shapes cover every endpoint type:
84
84
  - `stream<T>(path, body?)` — async iterator over SSE chunks (chat)
85
85
 
86
86
  The per-API client classes (`LLMClient`, `ImageClient`, `VideoClient`,
87
- `VoiceClient`, `MusicClient`, `SearchClient`, `XClient`, `PriceClient`,
88
- `SurfClient`) all remain — they will be soft-deprecated in 2.6 (rewritten as
87
+ `PortraitClient`, `VoiceClient`, `MusicClient`, `SearchClient`, `XClient`,
88
+ `PriceClient`, `SurfClient`) all remain — they will be soft-deprecated in 2.6 (rewritten as
89
89
  shims over `BlockrunClient`) and removed in 3.0.
90
90
 
91
91
  ### Try It Free (No USDC Required)
@@ -441,6 +441,35 @@ const r3 = await client.generate('aerial drone shot over a snowy mountain', {
441
441
  });
442
442
  ```
443
443
 
444
+ ### Virtual Portraits
445
+
446
+ `PortraitClient` wraps `POST /v1/portrait/enroll` (paid, flat **$0.01** promo,
447
+ no KYC). Enroll a face image by URL and get back a Token360 asset id (`ta_xxxxxx`).
448
+ Pass that id as `realFaceAssetId` on a Seedance 2.0 video generation to keep the
449
+ same AI character across clips. Payment settles only after Token360 confirms the
450
+ enrollment, so a failed enrollment never charges your wallet. The returned
451
+ `image_url` is a gateway-mirrored copy of your source image (see `mirrored` /
452
+ `source_image_url`). (Real-person likeness is not supported on BlockRun —
453
+ enrolled portraits are AI characters.)
454
+
455
+ ```ts
456
+ import { PortraitClient, VideoClient } from '@blockrun/llm';
457
+
458
+ const portraits = new PortraitClient();
459
+ const { asset_id } = await portraits.enroll({
460
+ name: 'Spokesperson',
461
+ imageUrl: 'https://example.com/face.jpg', // public https JPG/PNG/WEBP, ≤10 MB
462
+ });
463
+
464
+ // Reuse the same character across Seedance 2.0 clips
465
+ const video = new VideoClient();
466
+ const clip = await video.generate('she waves and smiles', {
467
+ model: 'bytedance/seedance-2.0-fast',
468
+ realFaceAssetId: asset_id,
469
+ });
470
+ console.log(clip.data[0].url);
471
+ ```
472
+
444
473
  ### Voice Calls
445
474
 
446
475
  `VoiceClient` wraps `POST /v1/voice/call` (paid, $0.54/call) and