Use SingIt as your OpenAI baseURL
SingIt Ask is an OpenAI-compatible chat and image API. Your code pays in USDC over x402 on Base or Solana: no account, no API key. Chat starts at $0.0015 per typical call on Base, images from $0.0062. You set per-call and per-day ceilings, checked in your own process before anything is signed, and every settled answer returns a receipt.
Try free first (no wallet, no key)
curl https://ask.singitai.app/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"free/deepseek-v4.1-flash","messages":[{"role":"user","content":"Hello"}]}'20 free answers per day per network across 6 free models, shared daily budget permitting. When the free answers run out, drop the free/ prefix to pay.
Fund a wallet with USDC on Base or Solana
Paid calls need a wallet that holds USDC on the network you pay on. Buy USDC with any exchange or on-ramp that withdraws USDC on Base (or on Solana), and send it to your agent's wallet address on that same network. A Base payment needs no ETH. Keep only a small balance in an agent wallet and keep its private key in an environment variable, never in code.
Tip: make your first paid call on the cheapest model. Look it up at ask.singitai.app/pricing.json or GET /v1/models, pin that model id, keep max_tokens small and set a low per-call limit. The 402 offer names the most a call can cost before anything is signed.
OpenAI SDK (TypeScript): baseURL swap + paidFetch
npm install openai @singitai/sdkimport OpenAI from "openai";
import { SingIt } from "@singitai/sdk";
const singit = new SingIt({
evmPrivateKey: process.env.AGENT_PRIVATE_KEY, // wallet with USDC on Base
network: "base",
maxPerCallUsd: 0.01,
maxPerDayUsd: 1,
});
const client = new OpenAI({
baseURL: "https://ask.singitai.app/v1",
apiKey: "x402", // payment is per call over x402, not a key
fetch: singit.paidFetch(),
maxRetries: 0, // a retry would sign a second payment
});
const r = await client.chat.completions.create({
model: "singit/auto",
messages: [{ role: "user", content: "Hello" }],
});
console.log(r.choices[0].message.content);Python
pip install "singit[svm]" # [svm] adds Solana; Base works without itimport os
from singit import SingIt
singit = SingIt(
evm_private_key=os.environ["AGENT_PRIVATE_KEY"],
network="base",
max_per_call_usd=0.01,
max_per_day_usd=1,
)
answer = singit.chat(messages=[{"role": "user", "content": "Hello"}])
print(answer["choices"][0]["message"]["content"], answer["payment"])Vercel AI SDK
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { generateText } from "ai";
const singitProvider = createOpenAICompatible({
name: "singit",
apiKey: "x402",
baseURL: "https://ask.singitai.app/v1",
fetch: singit.paidFetch(), // the SingIt instance from above
});
const { text } = await generateText({
model: singitProvider.chatModel("singit/auto"),
prompt: "Hello",
maxRetries: 0,
});LangChain (JS)
import { ChatOpenAI } from "@langchain/openai";
const llm = new ChatOpenAI({
model: "deepseek-v4.1-flash",
apiKey: "x402",
maxRetries: 0,
configuration: {
baseURL: "https://ask.singitai.app/v1",
fetch: singit.paidFetch(), // the SingIt instance from above
},
});Any OpenAI-compatible client, no code changes: local proxy
npx -y @singitai/proxy # creates a local wallet; get the Base address to fund at GET /walletPoint any client at http://127.0.0.1:8787/v1/ (the trailing /v1/ matters) with any placeholder API key. The proxy pays each call from its local wallet within the per-call and daily limits you set in it. Works for Cursor, Continue, OpenClaw, Codex and anything else that takes a baseURL.
MCP: Claude Code, Cursor and other MCP clients
Claude Code:
claude mcp add --transport http singit https://app.singitai.app/mcp --header 'Authorization: Bearer ${SINGIT_API_KEY}'Cursor and other mcp.json clients (~/.cursor/mcp.json):
{
"mcpServers": {
"singit": {
"url": "https://app.singitai.app/mcp",
"headers": { "Authorization": "Bearer ${env:SINGIT_API_KEY}" }
}
}
}The API key is created in the app (https://app.singitai.app/app/ → Settings → API keys) and pays within the allowance limits you set. Free tools (list_models, chat_free) need no key.
Image generation
const paid = singit.paidFetch(); // the SingIt instance from above
const r = await paid("https://ask.singitai.app/v1/images/generations", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
model: "venice-seedream-v5-lite", // catalog: GET /v1/images/models (free)
prompt: "a small green robot holding a coin, flat illustration",
size: "1024x1024",
}),
});
const image = await r.json(); // image.data[0].b64_jsonFacts
- Chat: POST /v1/chat/completions, from $0.0015 per typical call on Base, streaming supported, 200+ models (GET /v1/models, free).
- Images: POST /v1/images/generations, from $0.0062 per image; for example, venice-seedream-v5-lite is offered at $0.066 on Base as of 2026-11-10; GET /v1/images/models lists current offers. The 402 offer on each request is the authoritative price.
- Networks: Base and Solana, USDC. Base payments need no ETH.
- Receipts: every settled answer carries PAYMENT-RESPONSE and X-SingIt-Receipt.
- Errors: 503s never charge; a 402 is a payment challenge, not an answer.
Docs index: https://singitai.app/docs/ · Agent instructions: https://ask.singitai.app/SKILL.md