@@ -288,6 +288,70 @@ const r2 = await client.generate('the subject turns and smiles', {
288288});
289289```
290290
291+ ### Standalone Search
292+
293+ ` SearchClient ` wraps ` POST /v1/search ` — standalone Grok Live Search.
294+ Pricing: ` $0.025/source + margin ` (10 sources ≈ ` $0.26 ` ).
295+
296+ ``` ts
297+ import { SearchClient } from ' @blockrun/llm' ;
298+
299+ const client = new SearchClient ();
300+ const result = await client .search (' Latest news on x402 adoption' , {
301+ sources: [' x' , ' web' ],
302+ maxResults: 10 ,
303+ });
304+ console .log (result .summary );
305+ for (const url of result .citations ?? []) console .log (url );
306+ ```
307+
308+ ### X/Twitter (AttentionVC)
309+
310+ ` XClient ` covers the full ` /v1/x/* ` endpoint family — previously the ` X* `
311+ types were exported but there was no client to call them with.
312+
313+ ``` ts
314+ import { XClient } from ' @blockrun/llm' ;
315+
316+ const x = new XClient ();
317+ const info = await x .userInfo (' elonmusk' );
318+ const followers = await x .followers (' paulg' );
319+ const results = await x .search (' x402 micropayments' , { queryType: ' Latest' });
320+ const tweets = await x .userTweets ({ username: ' vitalikbuterin' , includeReplies: false });
321+ ```
322+
323+ Methods: ` userLookup ` , ` userInfo ` , ` followers ` , ` following ` , ` followings ` ,
324+ ` verifiedFollowers ` , ` userTweets ` , ` mentions ` , ` tweetLookup ` , ` tweetReplies ` ,
325+ ` tweetThread ` , ` search ` , ` trending ` , ` articlesRising ` .
326+
327+ ### Market Data (Pyth)
328+
329+ ` PriceClient ` wraps the Pyth-backed market-data endpoints. Crypto, FX and
330+ commodity are fully free (price + history + list); 12 global stock markets
331+ and the ` usstock ` legacy alias charge ` $0.001 ` for price + history (list is
332+ always free). Pass ` requireWallet: false ` to construct a free-only client.
333+
334+ ``` ts
335+ import { PriceClient } from ' @blockrun/llm' ;
336+
337+ const p = new PriceClient ({ requireWallet: false });
338+ const btc = await p .price (' crypto' , ' BTC-USD' );
339+ const eur = await p .price (' fx' , ' EUR-USD' );
340+
341+ // Paid — requires a wallet
342+ const p2 = new PriceClient ();
343+ const aapl = await p2 .price (' stocks' , ' AAPL' , { market: ' us' });
344+ const bars = await p2 .history (' stocks' , ' AAPL' , {
345+ market: ' us' ,
346+ resolution: ' D' ,
347+ from: 1700000000 ,
348+ to: 1710000000 ,
349+ });
350+ const symbols = await p .listSymbols (' crypto' , { query: ' sol' , limit: 20 });
351+ ```
352+
353+ Supported ` StockMarket ` values: ` us, hk, jp, kr, gb, de, fr, nl, ie, lu, cn, ca ` .
354+
291355### Testnet Models (Base Sepolia)
292356| Model | Price |
293357| -------| -------|
0 commit comments