@blockrun/llm 2.11.1 → 2.12.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/dist/index.d.cts CHANGED
@@ -404,6 +404,62 @@ interface MusicGenerateOptions {
404
404
  /** Custom lyrics — cannot be used with instrumental: true */
405
405
  lyrics?: string;
406
406
  }
407
+ /** A single synthesized audio clip. */
408
+ interface SpeechAudio {
409
+ url: string;
410
+ format?: string;
411
+ characters?: number;
412
+ credits?: number;
413
+ }
414
+ /** Response from speech synthesis or sound-effect generation. */
415
+ interface SpeechResponse {
416
+ created: number;
417
+ model: string;
418
+ data: SpeechAudio[];
419
+ txHash?: string;
420
+ }
421
+ interface SpeechClientOptions {
422
+ /** EVM wallet private key (hex string starting with 0x) */
423
+ privateKey?: `0x${string}` | string;
424
+ /** API endpoint URL (default: https://blockrun.ai/api) */
425
+ apiUrl?: string;
426
+ /** Request timeout in milliseconds (default: 120000 — synthesis is synchronous) */
427
+ timeout?: number;
428
+ }
429
+ /** TTS model IDs (price per 1k chars: flash/turbo $0.05, multilingual-v2/v3 $0.10). */
430
+ type SpeechModel = "elevenlabs/flash-v2.5" | "elevenlabs/turbo-v2.5" | "elevenlabs/multilingual-v2" | "elevenlabs/v3";
431
+ /** Friendly voice aliases (raw ElevenLabs voice_ids also accepted). */
432
+ type SpeechVoice = "sarah" | "george" | "laura" | "charlie" | "river" | "roger" | "callum" | "harry" | (string & {});
433
+ interface SpeechGenerateOptions {
434
+ /** Speech model ID (default: "elevenlabs/flash-v2.5") */
435
+ model?: SpeechModel | (string & {});
436
+ /** Voice alias or raw ElevenLabs voice_id (default: "sarah") */
437
+ voice?: SpeechVoice;
438
+ /** Audio format (default: "mp3") */
439
+ responseFormat?: "mp3" | "opus" | "pcm" | "wav";
440
+ /** Playback speed 0.7-1.2 */
441
+ speed?: number;
442
+ }
443
+ interface SoundEffectOptions {
444
+ /** Model ID (default: "elevenlabs/sound-effects") */
445
+ model?: string;
446
+ /** Target duration 0.5-22s (auto if unset) */
447
+ durationSeconds?: number;
448
+ /** 0-1, higher follows the prompt more literally */
449
+ promptInfluence?: number;
450
+ /** Audio format (default: "mp3") */
451
+ responseFormat?: "mp3" | "opus" | "pcm" | "wav";
452
+ }
453
+ /** A voice entry returned by GET /v1/audio/voices. */
454
+ interface VoiceInfo {
455
+ voice_id: string;
456
+ name?: string;
457
+ alias?: string;
458
+ category?: string;
459
+ labels?: Record<string, string>;
460
+ preview_url?: string;
461
+ [key: string]: unknown;
462
+ }
407
463
  /** Built-in Bland.ai voice presets. Any string is accepted (custom voice IDs work too). */
408
464
  type VoicePreset = "nat" | "josh" | "maya" | "june" | "paige" | "derek" | "florian";
409
465
  /** Bland.ai conversation model tier. */
@@ -1632,6 +1688,104 @@ declare class MusicClient {
1632
1688
  getSpending(): Spending;
1633
1689
  }
1634
1690
 
1691
+ /**
1692
+ * BlockRun Speech Client - Text-to-speech and sound effects (ElevenLabs) via x402 micropayments.
1693
+ *
1694
+ * SECURITY NOTE - Private Key Handling:
1695
+ * Your private key NEVER leaves your machine. Here's what happens:
1696
+ * 1. Key stays local - only used to sign an EIP-712 typed data message
1697
+ * 2. Only the SIGNATURE is sent in the PAYMENT-SIGNATURE header
1698
+ * 3. BlockRun verifies the signature on-chain via Coinbase CDP facilitator
1699
+ *
1700
+ * Usage:
1701
+ * import { SpeechClient } from '@blockrun/llm';
1702
+ *
1703
+ * const client = new SpeechClient({ privateKey: '0x...' });
1704
+ *
1705
+ * // Text-to-speech (price scales with character count)
1706
+ * const result = await client.generate('Hello from BlockRun!', { voice: 'sarah' });
1707
+ * console.log(result.data[0].url);
1708
+ *
1709
+ * // Sound effects (flat $0.05/generation)
1710
+ * const fx = await client.soundEffect('rain on a tin roof, distant thunder');
1711
+ *
1712
+ * // List voices (free, rate-limited)
1713
+ * const voices = await client.listVoices();
1714
+ *
1715
+ * Models & pricing:
1716
+ * elevenlabs/flash-v2.5 $0.05/1k chars ~75ms latency, 32 languages (default)
1717
+ * elevenlabs/turbo-v2.5 $0.05/1k chars ~250ms latency, 32 languages
1718
+ * elevenlabs/multilingual-v2 $0.10/1k chars long-form narration, 29 languages
1719
+ * elevenlabs/v3 $0.10/1k chars max expressiveness, 70+ languages
1720
+ * elevenlabs/sound-effects $0.05/generation (up to 22s)
1721
+ *
1722
+ * Price = (characters / 1000) x model rate, minimum $0.001/request.
1723
+ */
1724
+
1725
+ /**
1726
+ * BlockRun Speech Client (BlockRun Voice).
1727
+ *
1728
+ * Text-to-speech and sound-effect generation using ElevenLabs models
1729
+ * with automatic x402 micropayments on Base chain.
1730
+ *
1731
+ * TTS pricing scales with input characters; sound effects are flat
1732
+ * $0.05/generation.
1733
+ */
1734
+ declare class SpeechClient {
1735
+ private account;
1736
+ private privateKey;
1737
+ private apiUrl;
1738
+ private timeout;
1739
+ private sessionTotalUsd;
1740
+ private sessionCalls;
1741
+ constructor(options?: SpeechClientOptions);
1742
+ /**
1743
+ * Synthesize speech from text (OpenAI-compatible TTS).
1744
+ *
1745
+ * Price scales with character count: (chars / 1000) x model rate,
1746
+ * minimum $0.001/request. Synthesis is synchronous.
1747
+ *
1748
+ * @param input - Text to synthesize. Per-model character caps apply
1749
+ * (flash/turbo 40k, multilingual-v2 10k, v3 5k).
1750
+ * @param options - Optional model / voice / format / speed
1751
+ * @returns SpeechResponse with audio URL, format, and character count
1752
+ *
1753
+ * @example
1754
+ * const result = await client.generate('Welcome to BlockRun.', { voice: 'george' });
1755
+ * console.log(result.data[0].url); // audio URL (mp3 by default)
1756
+ */
1757
+ generate(input: string, options?: SpeechGenerateOptions): Promise<SpeechResponse>;
1758
+ /** OpenAI-style alias for {@link generate}. */
1759
+ speak(input: string, options?: SpeechGenerateOptions): Promise<SpeechResponse>;
1760
+ /**
1761
+ * Generate a cinematic sound effect from a text prompt.
1762
+ *
1763
+ * Flat $0.05/generation, up to 22 seconds of audio.
1764
+ *
1765
+ * @param text - Sound effect description (max 1000 chars).
1766
+ * E.g. 'rain on a tin roof', 'sci-fi door whoosh'
1767
+ * @param options - Optional duration / prompt influence / format
1768
+ * @returns SpeechResponse with audio URL and format
1769
+ *
1770
+ * @example
1771
+ * const fx = await client.soundEffect('crackling campfire at night');
1772
+ * console.log(fx.data[0].url);
1773
+ */
1774
+ soundEffect(text: string, options?: SoundEffectOptions): Promise<SpeechResponse>;
1775
+ /**
1776
+ * List available voices for TTS (free, rate-limited 60 req/min/IP).
1777
+ *
1778
+ * Pass a voice's `alias` (if present) or `voice_id` as the `voice`
1779
+ * option to {@link generate}.
1780
+ */
1781
+ listVoices(): Promise<VoiceInfo[]>;
1782
+ private requestWithPayment;
1783
+ private handlePaymentAndRetry;
1784
+ private fetchWithTimeout;
1785
+ getWalletAddress(): string;
1786
+ getSpending(): Spending;
1787
+ }
1788
+
1635
1789
  /**
1636
1790
  * BlockRun Video Client - Generate short AI videos via x402 micropayments.
1637
1791
  *
@@ -2929,4 +3083,4 @@ declare function validateTemperature(temperature?: number): void;
2929
3083
  */
2930
3084
  declare function validateTopP(topP?: number): void;
2931
3085
 
2932
- export { APIError, AnthropicClient, type AudioModel, type AudioTrack, BASE_CHAIN_ID, type BarResolution, type BlockRunAnthropicOptions, BlockrunClient, type BlockrunClientOptions, BlockrunError, type CallInitiatedResponse, type CallModel, type CallOptions, type CallStatusResponse, type ChatChoice, type ChatCompletionOptions, type ChatMessage, type ChatOptions, type ChatResponse, type ChatResponseWithCost, type ChatUsage, type CostEntry, type CostEstimate, type CreatePaymentOptions, type FunctionCall, type FunctionDefinition, type HistoryOptions, ImageClient, type ImageClientOptions, type ImageData, type ImageEditOptions, type ImageGenerateOptions, type ImageModel, type ImageResponse, KNOWN_PROVIDERS, LLMClient, type LLMClientOptions, type ListOptions, type MarketSession, type Model, MusicClient, type MusicClientOptions, type MusicGenerateOptions, type MusicResponse, type NewsSearchSource, OpenAI, type OpenAIChatCompletionChoice, type OpenAIChatCompletionChunk, type OpenAIChatCompletionParams, type OpenAIChatCompletionResponse, type OpenAIClientOptions, PHONE_PRICES, PORTRAIT_ENROLLMENT_PRICE_USD, PaymentError, type PaymentLinks, type PhoneBuyOptions, type PhoneBuyResponse, PhoneClient, type PhoneClientOptions, type PhoneListResponse, type PhoneLookupResponse, type PhoneNumberRecord, type PhoneReleaseResponse, type PhoneRenewResponse, type PollOptions, PortraitClient, type PortraitClientOptions, type PortraitEnrollOptions, type PortraitEnrollResponse, type PriceBar, type PriceCategory, PriceClient, type PriceClientOptions, type PriceHistoryResponse, type PriceOptions, type PricePoint, type ResponseFormat, type RoutingDecision, type RoutingProfile, type RoutingTier, type RssSearchSource, SOLANA_NETWORK, SOLANA_WALLET_FILE as SOLANA_WALLET_FILE_PATH, SearchClient, type SearchClientOptions, type SearchOptions, type SearchParameters, type SearchResult, type SearchSource, type SearchUsage, type SmartChatOptions, type SmartChatResponse, SolanaLLMClient, type SolanaLLMClientOptions, type SolanaWalletInfo, type Spending, type SpendingReport, type StockMarket, SurfClient, type SurfClientOptions, type SymbolListResponse, type Tool, type ToolCall, type ToolChoice, USDC_BASE, USDC_BASE_CONTRACT, USDC_SOLANA, VideoClient, type VideoClientOptions, type VideoClip, type VideoGenerateOptions, type VideoModel, type VideoResponse, VoiceClient, type VoiceClientOptions, type VoicePreset, WALLET_DIR_PATH, WALLET_FILE_PATH, type WalletInfo, type WebSearchSource, type XArticlesRisingResponse, type XAuthorAnalyticsResponse, XClient, type XClientOptions, type XCompareAuthorsResponse, type XFollower, type XFollowersResponse, type XFollowingsResponse, type XMentionsOptions, type XMentionsResponse, type XSearchOptions, type XSearchResponse, type XSearchSource, type XTrendingResponse, type XTweet, type XTweetLookupResponse, type XTweetRepliesOptions, type XTweetRepliesResponse, type XTweetThreadResponse, type XTweetsResponse, type XUser, type XUserInfoResponse, type XUserLookupResponse, type XUserTweetsOptions, type XVerifiedFollowersResponse, clearCache, createPaymentPayload, createSolanaPaymentPayload, createSolanaWallet, createWallet, LLMClient as default, extractPaymentDetails, formatFundingMessageCompact, formatNeedsFundingMessage, formatWalletCreatedMessage, getCached, getCachedByRequest, getCostLogSummary, getCostSummary, getEip681Uri, getOrCreateSolanaWallet, getOrCreateWallet, getPaymentLinks, getWalletAddress, loadSolanaWallet, loadWallet, logCost, parsePaymentRequired, saveSolanaWallet, saveToCache, saveWallet, scanSolanaWallets, scanWallets, setCache, setupAgentSolanaWallet, setupAgentWallet, solanaClient, solanaKeyToBytes, solanaPublicKey, status, validateMaxTokens, validateModel, validateTemperature, validateTopP };
3086
+ export { APIError, AnthropicClient, type AudioModel, type AudioTrack, BASE_CHAIN_ID, type BarResolution, type BlockRunAnthropicOptions, BlockrunClient, type BlockrunClientOptions, BlockrunError, type CallInitiatedResponse, type CallModel, type CallOptions, type CallStatusResponse, type ChatChoice, type ChatCompletionOptions, type ChatMessage, type ChatOptions, type ChatResponse, type ChatResponseWithCost, type ChatUsage, type CostEntry, type CostEstimate, type CreatePaymentOptions, type FunctionCall, type FunctionDefinition, type HistoryOptions, ImageClient, type ImageClientOptions, type ImageData, type ImageEditOptions, type ImageGenerateOptions, type ImageModel, type ImageResponse, KNOWN_PROVIDERS, LLMClient, type LLMClientOptions, type ListOptions, type MarketSession, type Model, MusicClient, type MusicClientOptions, type MusicGenerateOptions, type MusicResponse, type NewsSearchSource, OpenAI, type OpenAIChatCompletionChoice, type OpenAIChatCompletionChunk, type OpenAIChatCompletionParams, type OpenAIChatCompletionResponse, type OpenAIClientOptions, PHONE_PRICES, PORTRAIT_ENROLLMENT_PRICE_USD, PaymentError, type PaymentLinks, type PhoneBuyOptions, type PhoneBuyResponse, PhoneClient, type PhoneClientOptions, type PhoneListResponse, type PhoneLookupResponse, type PhoneNumberRecord, type PhoneReleaseResponse, type PhoneRenewResponse, type PollOptions, PortraitClient, type PortraitClientOptions, type PortraitEnrollOptions, type PortraitEnrollResponse, type PriceBar, type PriceCategory, PriceClient, type PriceClientOptions, type PriceHistoryResponse, type PriceOptions, type PricePoint, type ResponseFormat, type RoutingDecision, type RoutingProfile, type RoutingTier, type RssSearchSource, SOLANA_NETWORK, SOLANA_WALLET_FILE as SOLANA_WALLET_FILE_PATH, SearchClient, type SearchClientOptions, type SearchOptions, type SearchParameters, type SearchResult, type SearchSource, type SearchUsage, type SmartChatOptions, type SmartChatResponse, SolanaLLMClient, type SolanaLLMClientOptions, type SolanaWalletInfo, type SoundEffectOptions, type SpeechAudio, SpeechClient, type SpeechClientOptions, type SpeechGenerateOptions, type SpeechModel, type SpeechResponse, type SpeechVoice, type Spending, type SpendingReport, type StockMarket, SurfClient, type SurfClientOptions, type SymbolListResponse, type Tool, type ToolCall, type ToolChoice, USDC_BASE, USDC_BASE_CONTRACT, USDC_SOLANA, VideoClient, type VideoClientOptions, type VideoClip, type VideoGenerateOptions, type VideoModel, type VideoResponse, VoiceClient, type VoiceClientOptions, type VoiceInfo, type VoicePreset, WALLET_DIR_PATH, WALLET_FILE_PATH, type WalletInfo, type WebSearchSource, type XArticlesRisingResponse, type XAuthorAnalyticsResponse, XClient, type XClientOptions, type XCompareAuthorsResponse, type XFollower, type XFollowersResponse, type XFollowingsResponse, type XMentionsOptions, type XMentionsResponse, type XSearchOptions, type XSearchResponse, type XSearchSource, type XTrendingResponse, type XTweet, type XTweetLookupResponse, type XTweetRepliesOptions, type XTweetRepliesResponse, type XTweetThreadResponse, type XTweetsResponse, type XUser, type XUserInfoResponse, type XUserLookupResponse, type XUserTweetsOptions, type XVerifiedFollowersResponse, clearCache, createPaymentPayload, createSolanaPaymentPayload, createSolanaWallet, createWallet, LLMClient as default, extractPaymentDetails, formatFundingMessageCompact, formatNeedsFundingMessage, formatWalletCreatedMessage, getCached, getCachedByRequest, getCostLogSummary, getCostSummary, getEip681Uri, getOrCreateSolanaWallet, getOrCreateWallet, getPaymentLinks, getWalletAddress, loadSolanaWallet, loadWallet, logCost, parsePaymentRequired, saveSolanaWallet, saveToCache, saveWallet, scanSolanaWallets, scanWallets, setCache, setupAgentSolanaWallet, setupAgentWallet, solanaClient, solanaKeyToBytes, solanaPublicKey, status, validateMaxTokens, validateModel, validateTemperature, validateTopP };
package/dist/index.d.ts CHANGED
@@ -404,6 +404,62 @@ interface MusicGenerateOptions {
404
404
  /** Custom lyrics — cannot be used with instrumental: true */
405
405
  lyrics?: string;
406
406
  }
407
+ /** A single synthesized audio clip. */
408
+ interface SpeechAudio {
409
+ url: string;
410
+ format?: string;
411
+ characters?: number;
412
+ credits?: number;
413
+ }
414
+ /** Response from speech synthesis or sound-effect generation. */
415
+ interface SpeechResponse {
416
+ created: number;
417
+ model: string;
418
+ data: SpeechAudio[];
419
+ txHash?: string;
420
+ }
421
+ interface SpeechClientOptions {
422
+ /** EVM wallet private key (hex string starting with 0x) */
423
+ privateKey?: `0x${string}` | string;
424
+ /** API endpoint URL (default: https://blockrun.ai/api) */
425
+ apiUrl?: string;
426
+ /** Request timeout in milliseconds (default: 120000 — synthesis is synchronous) */
427
+ timeout?: number;
428
+ }
429
+ /** TTS model IDs (price per 1k chars: flash/turbo $0.05, multilingual-v2/v3 $0.10). */
430
+ type SpeechModel = "elevenlabs/flash-v2.5" | "elevenlabs/turbo-v2.5" | "elevenlabs/multilingual-v2" | "elevenlabs/v3";
431
+ /** Friendly voice aliases (raw ElevenLabs voice_ids also accepted). */
432
+ type SpeechVoice = "sarah" | "george" | "laura" | "charlie" | "river" | "roger" | "callum" | "harry" | (string & {});
433
+ interface SpeechGenerateOptions {
434
+ /** Speech model ID (default: "elevenlabs/flash-v2.5") */
435
+ model?: SpeechModel | (string & {});
436
+ /** Voice alias or raw ElevenLabs voice_id (default: "sarah") */
437
+ voice?: SpeechVoice;
438
+ /** Audio format (default: "mp3") */
439
+ responseFormat?: "mp3" | "opus" | "pcm" | "wav";
440
+ /** Playback speed 0.7-1.2 */
441
+ speed?: number;
442
+ }
443
+ interface SoundEffectOptions {
444
+ /** Model ID (default: "elevenlabs/sound-effects") */
445
+ model?: string;
446
+ /** Target duration 0.5-22s (auto if unset) */
447
+ durationSeconds?: number;
448
+ /** 0-1, higher follows the prompt more literally */
449
+ promptInfluence?: number;
450
+ /** Audio format (default: "mp3") */
451
+ responseFormat?: "mp3" | "opus" | "pcm" | "wav";
452
+ }
453
+ /** A voice entry returned by GET /v1/audio/voices. */
454
+ interface VoiceInfo {
455
+ voice_id: string;
456
+ name?: string;
457
+ alias?: string;
458
+ category?: string;
459
+ labels?: Record<string, string>;
460
+ preview_url?: string;
461
+ [key: string]: unknown;
462
+ }
407
463
  /** Built-in Bland.ai voice presets. Any string is accepted (custom voice IDs work too). */
408
464
  type VoicePreset = "nat" | "josh" | "maya" | "june" | "paige" | "derek" | "florian";
409
465
  /** Bland.ai conversation model tier. */
@@ -1632,6 +1688,104 @@ declare class MusicClient {
1632
1688
  getSpending(): Spending;
1633
1689
  }
1634
1690
 
1691
+ /**
1692
+ * BlockRun Speech Client - Text-to-speech and sound effects (ElevenLabs) via x402 micropayments.
1693
+ *
1694
+ * SECURITY NOTE - Private Key Handling:
1695
+ * Your private key NEVER leaves your machine. Here's what happens:
1696
+ * 1. Key stays local - only used to sign an EIP-712 typed data message
1697
+ * 2. Only the SIGNATURE is sent in the PAYMENT-SIGNATURE header
1698
+ * 3. BlockRun verifies the signature on-chain via Coinbase CDP facilitator
1699
+ *
1700
+ * Usage:
1701
+ * import { SpeechClient } from '@blockrun/llm';
1702
+ *
1703
+ * const client = new SpeechClient({ privateKey: '0x...' });
1704
+ *
1705
+ * // Text-to-speech (price scales with character count)
1706
+ * const result = await client.generate('Hello from BlockRun!', { voice: 'sarah' });
1707
+ * console.log(result.data[0].url);
1708
+ *
1709
+ * // Sound effects (flat $0.05/generation)
1710
+ * const fx = await client.soundEffect('rain on a tin roof, distant thunder');
1711
+ *
1712
+ * // List voices (free, rate-limited)
1713
+ * const voices = await client.listVoices();
1714
+ *
1715
+ * Models & pricing:
1716
+ * elevenlabs/flash-v2.5 $0.05/1k chars ~75ms latency, 32 languages (default)
1717
+ * elevenlabs/turbo-v2.5 $0.05/1k chars ~250ms latency, 32 languages
1718
+ * elevenlabs/multilingual-v2 $0.10/1k chars long-form narration, 29 languages
1719
+ * elevenlabs/v3 $0.10/1k chars max expressiveness, 70+ languages
1720
+ * elevenlabs/sound-effects $0.05/generation (up to 22s)
1721
+ *
1722
+ * Price = (characters / 1000) x model rate, minimum $0.001/request.
1723
+ */
1724
+
1725
+ /**
1726
+ * BlockRun Speech Client (BlockRun Voice).
1727
+ *
1728
+ * Text-to-speech and sound-effect generation using ElevenLabs models
1729
+ * with automatic x402 micropayments on Base chain.
1730
+ *
1731
+ * TTS pricing scales with input characters; sound effects are flat
1732
+ * $0.05/generation.
1733
+ */
1734
+ declare class SpeechClient {
1735
+ private account;
1736
+ private privateKey;
1737
+ private apiUrl;
1738
+ private timeout;
1739
+ private sessionTotalUsd;
1740
+ private sessionCalls;
1741
+ constructor(options?: SpeechClientOptions);
1742
+ /**
1743
+ * Synthesize speech from text (OpenAI-compatible TTS).
1744
+ *
1745
+ * Price scales with character count: (chars / 1000) x model rate,
1746
+ * minimum $0.001/request. Synthesis is synchronous.
1747
+ *
1748
+ * @param input - Text to synthesize. Per-model character caps apply
1749
+ * (flash/turbo 40k, multilingual-v2 10k, v3 5k).
1750
+ * @param options - Optional model / voice / format / speed
1751
+ * @returns SpeechResponse with audio URL, format, and character count
1752
+ *
1753
+ * @example
1754
+ * const result = await client.generate('Welcome to BlockRun.', { voice: 'george' });
1755
+ * console.log(result.data[0].url); // audio URL (mp3 by default)
1756
+ */
1757
+ generate(input: string, options?: SpeechGenerateOptions): Promise<SpeechResponse>;
1758
+ /** OpenAI-style alias for {@link generate}. */
1759
+ speak(input: string, options?: SpeechGenerateOptions): Promise<SpeechResponse>;
1760
+ /**
1761
+ * Generate a cinematic sound effect from a text prompt.
1762
+ *
1763
+ * Flat $0.05/generation, up to 22 seconds of audio.
1764
+ *
1765
+ * @param text - Sound effect description (max 1000 chars).
1766
+ * E.g. 'rain on a tin roof', 'sci-fi door whoosh'
1767
+ * @param options - Optional duration / prompt influence / format
1768
+ * @returns SpeechResponse with audio URL and format
1769
+ *
1770
+ * @example
1771
+ * const fx = await client.soundEffect('crackling campfire at night');
1772
+ * console.log(fx.data[0].url);
1773
+ */
1774
+ soundEffect(text: string, options?: SoundEffectOptions): Promise<SpeechResponse>;
1775
+ /**
1776
+ * List available voices for TTS (free, rate-limited 60 req/min/IP).
1777
+ *
1778
+ * Pass a voice's `alias` (if present) or `voice_id` as the `voice`
1779
+ * option to {@link generate}.
1780
+ */
1781
+ listVoices(): Promise<VoiceInfo[]>;
1782
+ private requestWithPayment;
1783
+ private handlePaymentAndRetry;
1784
+ private fetchWithTimeout;
1785
+ getWalletAddress(): string;
1786
+ getSpending(): Spending;
1787
+ }
1788
+
1635
1789
  /**
1636
1790
  * BlockRun Video Client - Generate short AI videos via x402 micropayments.
1637
1791
  *
@@ -2929,4 +3083,4 @@ declare function validateTemperature(temperature?: number): void;
2929
3083
  */
2930
3084
  declare function validateTopP(topP?: number): void;
2931
3085
 
2932
- export { APIError, AnthropicClient, type AudioModel, type AudioTrack, BASE_CHAIN_ID, type BarResolution, type BlockRunAnthropicOptions, BlockrunClient, type BlockrunClientOptions, BlockrunError, type CallInitiatedResponse, type CallModel, type CallOptions, type CallStatusResponse, type ChatChoice, type ChatCompletionOptions, type ChatMessage, type ChatOptions, type ChatResponse, type ChatResponseWithCost, type ChatUsage, type CostEntry, type CostEstimate, type CreatePaymentOptions, type FunctionCall, type FunctionDefinition, type HistoryOptions, ImageClient, type ImageClientOptions, type ImageData, type ImageEditOptions, type ImageGenerateOptions, type ImageModel, type ImageResponse, KNOWN_PROVIDERS, LLMClient, type LLMClientOptions, type ListOptions, type MarketSession, type Model, MusicClient, type MusicClientOptions, type MusicGenerateOptions, type MusicResponse, type NewsSearchSource, OpenAI, type OpenAIChatCompletionChoice, type OpenAIChatCompletionChunk, type OpenAIChatCompletionParams, type OpenAIChatCompletionResponse, type OpenAIClientOptions, PHONE_PRICES, PORTRAIT_ENROLLMENT_PRICE_USD, PaymentError, type PaymentLinks, type PhoneBuyOptions, type PhoneBuyResponse, PhoneClient, type PhoneClientOptions, type PhoneListResponse, type PhoneLookupResponse, type PhoneNumberRecord, type PhoneReleaseResponse, type PhoneRenewResponse, type PollOptions, PortraitClient, type PortraitClientOptions, type PortraitEnrollOptions, type PortraitEnrollResponse, type PriceBar, type PriceCategory, PriceClient, type PriceClientOptions, type PriceHistoryResponse, type PriceOptions, type PricePoint, type ResponseFormat, type RoutingDecision, type RoutingProfile, type RoutingTier, type RssSearchSource, SOLANA_NETWORK, SOLANA_WALLET_FILE as SOLANA_WALLET_FILE_PATH, SearchClient, type SearchClientOptions, type SearchOptions, type SearchParameters, type SearchResult, type SearchSource, type SearchUsage, type SmartChatOptions, type SmartChatResponse, SolanaLLMClient, type SolanaLLMClientOptions, type SolanaWalletInfo, type Spending, type SpendingReport, type StockMarket, SurfClient, type SurfClientOptions, type SymbolListResponse, type Tool, type ToolCall, type ToolChoice, USDC_BASE, USDC_BASE_CONTRACT, USDC_SOLANA, VideoClient, type VideoClientOptions, type VideoClip, type VideoGenerateOptions, type VideoModel, type VideoResponse, VoiceClient, type VoiceClientOptions, type VoicePreset, WALLET_DIR_PATH, WALLET_FILE_PATH, type WalletInfo, type WebSearchSource, type XArticlesRisingResponse, type XAuthorAnalyticsResponse, XClient, type XClientOptions, type XCompareAuthorsResponse, type XFollower, type XFollowersResponse, type XFollowingsResponse, type XMentionsOptions, type XMentionsResponse, type XSearchOptions, type XSearchResponse, type XSearchSource, type XTrendingResponse, type XTweet, type XTweetLookupResponse, type XTweetRepliesOptions, type XTweetRepliesResponse, type XTweetThreadResponse, type XTweetsResponse, type XUser, type XUserInfoResponse, type XUserLookupResponse, type XUserTweetsOptions, type XVerifiedFollowersResponse, clearCache, createPaymentPayload, createSolanaPaymentPayload, createSolanaWallet, createWallet, LLMClient as default, extractPaymentDetails, formatFundingMessageCompact, formatNeedsFundingMessage, formatWalletCreatedMessage, getCached, getCachedByRequest, getCostLogSummary, getCostSummary, getEip681Uri, getOrCreateSolanaWallet, getOrCreateWallet, getPaymentLinks, getWalletAddress, loadSolanaWallet, loadWallet, logCost, parsePaymentRequired, saveSolanaWallet, saveToCache, saveWallet, scanSolanaWallets, scanWallets, setCache, setupAgentSolanaWallet, setupAgentWallet, solanaClient, solanaKeyToBytes, solanaPublicKey, status, validateMaxTokens, validateModel, validateTemperature, validateTopP };
3086
+ export { APIError, AnthropicClient, type AudioModel, type AudioTrack, BASE_CHAIN_ID, type BarResolution, type BlockRunAnthropicOptions, BlockrunClient, type BlockrunClientOptions, BlockrunError, type CallInitiatedResponse, type CallModel, type CallOptions, type CallStatusResponse, type ChatChoice, type ChatCompletionOptions, type ChatMessage, type ChatOptions, type ChatResponse, type ChatResponseWithCost, type ChatUsage, type CostEntry, type CostEstimate, type CreatePaymentOptions, type FunctionCall, type FunctionDefinition, type HistoryOptions, ImageClient, type ImageClientOptions, type ImageData, type ImageEditOptions, type ImageGenerateOptions, type ImageModel, type ImageResponse, KNOWN_PROVIDERS, LLMClient, type LLMClientOptions, type ListOptions, type MarketSession, type Model, MusicClient, type MusicClientOptions, type MusicGenerateOptions, type MusicResponse, type NewsSearchSource, OpenAI, type OpenAIChatCompletionChoice, type OpenAIChatCompletionChunk, type OpenAIChatCompletionParams, type OpenAIChatCompletionResponse, type OpenAIClientOptions, PHONE_PRICES, PORTRAIT_ENROLLMENT_PRICE_USD, PaymentError, type PaymentLinks, type PhoneBuyOptions, type PhoneBuyResponse, PhoneClient, type PhoneClientOptions, type PhoneListResponse, type PhoneLookupResponse, type PhoneNumberRecord, type PhoneReleaseResponse, type PhoneRenewResponse, type PollOptions, PortraitClient, type PortraitClientOptions, type PortraitEnrollOptions, type PortraitEnrollResponse, type PriceBar, type PriceCategory, PriceClient, type PriceClientOptions, type PriceHistoryResponse, type PriceOptions, type PricePoint, type ResponseFormat, type RoutingDecision, type RoutingProfile, type RoutingTier, type RssSearchSource, SOLANA_NETWORK, SOLANA_WALLET_FILE as SOLANA_WALLET_FILE_PATH, SearchClient, type SearchClientOptions, type SearchOptions, type SearchParameters, type SearchResult, type SearchSource, type SearchUsage, type SmartChatOptions, type SmartChatResponse, SolanaLLMClient, type SolanaLLMClientOptions, type SolanaWalletInfo, type SoundEffectOptions, type SpeechAudio, SpeechClient, type SpeechClientOptions, type SpeechGenerateOptions, type SpeechModel, type SpeechResponse, type SpeechVoice, type Spending, type SpendingReport, type StockMarket, SurfClient, type SurfClientOptions, type SymbolListResponse, type Tool, type ToolCall, type ToolChoice, USDC_BASE, USDC_BASE_CONTRACT, USDC_SOLANA, VideoClient, type VideoClientOptions, type VideoClip, type VideoGenerateOptions, type VideoModel, type VideoResponse, VoiceClient, type VoiceClientOptions, type VoiceInfo, type VoicePreset, WALLET_DIR_PATH, WALLET_FILE_PATH, type WalletInfo, type WebSearchSource, type XArticlesRisingResponse, type XAuthorAnalyticsResponse, XClient, type XClientOptions, type XCompareAuthorsResponse, type XFollower, type XFollowersResponse, type XFollowingsResponse, type XMentionsOptions, type XMentionsResponse, type XSearchOptions, type XSearchResponse, type XSearchSource, type XTrendingResponse, type XTweet, type XTweetLookupResponse, type XTweetRepliesOptions, type XTweetRepliesResponse, type XTweetThreadResponse, type XTweetsResponse, type XUser, type XUserInfoResponse, type XUserLookupResponse, type XUserTweetsOptions, type XVerifiedFollowersResponse, clearCache, createPaymentPayload, createSolanaPaymentPayload, createSolanaWallet, createWallet, LLMClient as default, extractPaymentDetails, formatFundingMessageCompact, formatNeedsFundingMessage, formatWalletCreatedMessage, getCached, getCachedByRequest, getCostLogSummary, getCostSummary, getEip681Uri, getOrCreateSolanaWallet, getOrCreateWallet, getPaymentLinks, getWalletAddress, loadSolanaWallet, loadWallet, logCost, parsePaymentRequired, saveSolanaWallet, saveToCache, saveWallet, scanSolanaWallets, scanWallets, setCache, setupAgentSolanaWallet, setupAgentWallet, solanaClient, solanaKeyToBytes, solanaPublicKey, status, validateMaxTokens, validateModel, validateTemperature, validateTopP };