This page gets you from install to first real request with the current @dzapio/ai runtime.
1) Install
If your environment maps @dzapio to a private registry, use:
npm install @dzapio/ai --@dzapio:registry=https://registry.npmjs.org
2) Set required environment variables
export OPENAI_API_KEY = sk- ...
export DZAP_STARTUP_PASSWORD = alohomora
DZAP_STARTUP_PASSWORD is required by runtime startup checks in the current implementation.
3) SDK example (DZapSDK)
import { DZapSDK } from "@dzapio/ai" ;
const sdk = new DZapSDK ();
await sdk . initialize ({
startupPassword: process . env . DZAP_STARTUP_PASSWORD ,
initializeRetrieval: true ,
syncProviders: false ,
});
const result = await sdk . ask ({
userQuery: "Show my balances" ,
metadata: {
accountInfo: [{ blockchain: "evm" , chain: "1" , user_account: "0xabc..." }],
},
transactionConfirmationMode: "on" ,
});
console . log ( result . sessionId );
console . log ( result . finalText );
4) CLI example
Aliases also supported: dzapai, DzapAI.
The interactive flow prompts for:
Startup password
Wallet profile (wallet, chain, blockchain, private key)
Chat input and slash commands
5) HTTP streaming example
curl -N -X POST "https://nlp-ai-439689868940.europe-north1.run.app/ask" -H "Content-Type: application/json" -d "{ \" query \" : \" Price of USDC on Ethereum \" , \" session_id \" : \" demo-session \" , \" prefer \" :{ \" streaming \" :true}, \" context \" :{ \" accountInfo \" :[{ \" blockchain \" : \" evm \" , \" chain \" : \" 1 \" , \" user_account \" : \" 0xabc... \" }]}}"
The stream emits start, result, and complete events over SSE.
6) MCP endpoint example
{
"mcpServers" : {
"DZapAI" : {
"command" : "npx" ,
"args" : [ "-y" , "mcp-remote" , "https://nlp-ai-439689868940.europe-north1.run.app/mcp" ]
}
}
}
Next
SDK-AI Full SDK API reference with more examples.
MCP Server Stdio + streamable HTTP details.
Tool Categories All 21 exposed tools.
CLI Interactive shell command reference.
Last modified on May 30, 2026