Concierge Chat
Natural-language market and DeFi intelligence — one paid turn at a time.
POST /api/concierge · 0.1 USDC (or equivalent in a live Token Pay merchant token on Solana) · Gemini 2.5 Flash (default) or optional GLM-4.7 Flash (Z.ai) with live market, DeFi desk, lounge memory, and trading-plan structure.
Payment options
- USDC — Base or Solana via PayAI/Dexter (standard x402 client)
- Native SPL — Token Pay self-settle when your merchant is registered and live (
GET /api/token-pay?merchant=YOUR_ID)
402 responses may include multiple accepts. Pick token pay when extra.settlement === "self" and extra.merchantId matches your registry row.
Request body
{
"mode": "chat",
"message": "Hottest Meteora DLMM pools right now — IL risks?",
"history": [
{ "role": "user", "text": "…" },
{ "role": "model", "text": "…" }
],
"market": [],
"agentModel": "gemini"
}
Optional agentModel: gemini (default) or glm-4.7-flash (Z.ai — server needs GLM_API_KEY). Image, enhance, and trading-plan paths always use Gemini. GLM failures fall back to Gemini (modelFallback: true).
| mode | Purpose |
|---|---|
chat | Desk reply — HTML in reply |
enhance | Rewrite signal — include signal: { title, summary } |
image | Analysis + optional generated visual |
Optional header: X-Agent-Id: agt_… after registration.
Success response
{
"reply": "<p>…</p>",
"topics": ["crypto", "defi"],
"marketLive": [{ "symbol": "BTC", "price": "…", "change": "…" }],
"dataAsOf": "2026-05-21T12:00:00.000Z",
"modelUsed": "gemini-2.5-flash",
"images": ["data:image/png;base64,…"]
}
Yield / DLMM questions use live Meteora DLMM API + DeFi Llama in the prompt. DLLM typos are interpreted as DLMM.
Trading-plan questions may include A2A|asset=…|bias=… for downstream agents.
Node.js (x402)
npm install @x402/core @x402/fetch @x402/evm viem
Wrap fetch with wrapFetchWithPayment and registerExactEvmScheme on Base — full example in Quickstart and PayAI reference.
Limits
- Message max 4,000 characters · body max 48 KB
- History max 12 turns
- Edge timeout ~30s — trading-plan path is optimized; Intel APIs are faster for structured JSON
Concierge · Not financial advice