Web3 AI starter projects
One API for open text, image, video, and audio models, powered by community GPUs and settled on Base.
These five small, runnable examples show where the Grid belongs in a Web3 application. Fund one service-credit account through the Console, create a scoped API key, and call the Grid from your server. A wallet transaction is not required for every inference request.
Run a starter
git clone https://github.com/AIPowerGrid/grid-provider-integrations.git
cd grid-provider-integrations
export AIPG_API_KEY='grid_...'Create the key with only account.read and inference.submit. Keep it on the
server and out of browser bundles, repositories, chat messages, and generated
artifacts.
On-chain game NPC
Buy bounded NPC dialogue and retain an application receipt hash.
node starters/onchain-game-npc/index.mjs \
'Ask the blacksmith about the ruined bridge'DAO media pipeline
Generate proposal image, video, or audio and retain Grid audit metadata.
DAO_PROPOSAL='Fund public GPU onboarding' \
node starters/dao-media-pipeline/index.mjsTelegram agent
Relay allowlisted chats while both the Telegram and Grid credentials stay server-side. Shared chats can additionally restrict paid requests to explicit Telegram sender IDs, and a bounded replay window prevents one update from dispatching twice in a running process.
node starters/telegram-agent/index.mjsNFT media workflow
Generate reviewable media metadata without giving the generator a minting key.
NFT_NAME='Grid Genesis' NFT_PROMPT='Community GPU city' \
node starters/nft-media-workflow/index.mjsWallet-funded agent
Quote each step against one bounded service-credit budget.
AGENT_TASK='Summarize proposal 42' \
node starters/wallet-funded-agent/index.mjsAll examples require Node.js 20 or newer. They quote before dispatch and reject
an estimate above AIPG_MAX_COST_USD, which defaults to $0.02. The quote is
non-mutating and is not bound to the later generation request, so this is a
client preflight guard rather than a transactionally enforced spending
allowance. Model availability and final authorization follow connected workers,
the public model catalog, and the Core submission route.
The useful blockchain boundary
Base belongs in funding, settlement, ownership, and optional provenance. It does not belong in every model request:
- A human or application funds the Grid account through the Console.
- The server uses a scoped Grid key to quote and run bounded work.
- The application stores the returned job or receipt identifier with its own state and performs any wallet action separately.
A returned grid.job_id is a Grid receipt identifier. It is not an on-chain
JobAnchor merely because the application stores it. Describe it as anchored
only after a contract lookup or proof verifies the corresponding publication.
The wallet-funded agent never accepts a seed phrase or wallet private key. A human funds the service balance; the agent receives only the scoped Grid key and a finite inference budget.
Build on one
The complete source, shared quote-first client, and security tests live in the starter directory. Builders shipping a public integration or demo may apply for bounded builder credits.