@circuit-llm/sdk
v0.2.4
Published
Circuit SDK — batteries-included meta-package re-exporting @circuit-llm/{core,x402,inference,models,data,wallet}.
Readme
@circuit-llm/sdk
The batteries-included meta-package. One install, one import — re-exports the whole Circuit SDK:
core,x402,inference,models,data,wallet,agent,node,onchain, and theattestprimitives.
The front door to the Circuit SDK. Getting started →
Install
npm install @circuit-llm/sdkUsage
import { makeWallet, Inference, Data } from '@circuit-llm/sdk';
const wallet = makeWallet(); // from CIRCUIT_WALLET
const ai = new Inference({ wallet });
const reply = await ai.chat({ messages: [{ role: 'user', content: 'hi' }] });
const data = new Data({ wallet });
const price = await data.tokenPrice('8fQgfsRnRkKSeNUhevT7wp8mhNvMSJdLn1fJi4oVpump');Hosted models — reach GPT / Claude / Grok / … through Circuit's prepaid, OpenAI-compatible gateway (buy credits with USDC/SOL/CIRC, mint a key, then chat):
import { Models } from '@circuit-llm/sdk';
const models = new Models({ apiKey: process.env.CIRCUIT_MODELS_KEY, model: 'openai/gpt-4o-mini' });
const { content } = await models.chat({ messages: [{ role: 'user', content: 'hi' }] });
// buying credits + minting the key is wallet-signed: new Models({ wallet }).buy('SOL', 5) → .issueKey()Want a smaller footprint? Install only what you need — every surface is also its own @circuit-llm/* package. Full map: packages.
