---
name: singit
description: Use when an agent needs an LLM answer, web search or price lookup it has no key for, wants spending capped by an owner-set key, or wants to pay per call with its own wallet over x402.
---

# SingIt

Use SingIt when an agent needs a model answer, web search or a price lookup, and its owner wants a spending limit. Three ways in: a free answer (no key or wallet), an owner-set MCP key with daily and per-request caps, or pay per call with your own wallet over x402 (USDC on Base or Solana).

## Start here: Claude Code in one line

`curl -fsSL https://singitai.app/singit-cc-install | bash` installs `@singitai/proxy` with the `singit-cc` launcher and a local wallet (`~/.singit/session`); send USDC on Base to the printed address, then run `singit-cc start`. The proxy signs each x402 payment; the client never sees the key. Codex: `singit-codex-install`; OpenClaw: `singit-openclaw-install` (same URL pattern). Any OpenAI-compatible client: `npx -y -p @singitai/proxy singit-proxy` (not `npx @singitai/proxy` on 0.1.0), base URL `http://127.0.0.1:8787/v1`, model `auto`. Non-interactive: `singit-cc start --no-launch`. Fund the printed Base address with USDC (no ETH) before the first paid call; payment_unfunded charges nothing.

Owner-set limits, Revoke and receipts: on Base an on-chain allowance contract enforces the owner's daily and per-purchase limits and the owner can Revoke it at any time; on Solana SingIt's server checks them. Every settled paid answer carries a receipt (`PAYMENT-RESPONSE`, `X-SingIt-Receipt`; `get_receipts` over MCP).

Limits: they protect only SingIt's own agent. On Base the owner's allowance limiter is an on-chain contract that enforces them, and the owner can pause it. On a SingIt API key the server checks the daily and per-request caps. On Solana, SingIt's server checks the daily and per-purchase limits; the chain only caps the total delegated. A key's caps apply only to calls made with that key to SingIt's MCP and /v1 endpoint. They do not limit spending elsewhere, protect an agent's own wallet, or cap an x402 call paid from your own wallet: there you limit it by what you sign. Models: 200+, listed at https://ask.singitai.app/v1/models.

## Step 0: a free first call

POST https://ask.singitai.app/v1/chat/completions without a key or wallet:

```json
{"model":"free/deepseek-v4.1-flash","messages":[{"role":"user","content":"Hello"}]}
```

Six free models share up to 20 answers a day per visitor network and a $0.25 shared daily cost cap. The shared allowance may run out; it resets at midnight UTC. Each free answer reports `billing.remainingToday`; when used up, drop the `free/` prefix to pay.

## With an owner's key

Ask the owner to set up a SingIt allowance from their wallet (Base limiter or Solana delegation), then create a key at https://app.singitai.app/app/ under Settings → API keys. Their wallet signs the key's terms. The key is shown once. Read SINGIT_API_KEY from the environment. Setup: https://singitai.app/docs/mcp-key/

Claude Code:

```sh
claude mcp add --transport http singit https://app.singitai.app/mcp --header 'Authorization: Bearer ${SINGIT_API_KEY}'
```

Single quotes keep ${SINGIT_API_KEY} as a reference so the key is not written into Claude Code's configuration.

Codex:

```sh
codex mcp add singit --url https://app.singitai.app/mcp --bearer-token-env-var SINGIT_API_KEY
```

Cursor (~/.cursor/mcp.json):

```json
{
  "mcpServers": {
    "singit": {
      "url": "https://app.singitai.app/mcp",
      "headers": {"Authorization": "Bearer ${env:SINGIT_API_KEY}"}
    }
  }
}
```

Verification: configuration from the repository; not run live for this guide.

| MCP tools | Access | Scope / network |
| --- | --- | --- |
| get_price, list_price_symbols, list_models, chat_free | Free without a key | No paid scope |
| get_balance, get_limits, get_allowance, get_receipts | Free with a key, read-only | Account data |
| chat | Paid from the key’s limits, Base or Solana | No extra scope |
| web_search, read_page | Paid per call within key caps | search; Base or Solana |
| get_x_profile, get_crypto_news, get_funding_rates, resolve_ens, get_token_price | Paid per call within key caps | tools; Base only for now |

New keys include search and tools scopes. Keys made before data tools existed
need a new key. Call get_allowance (or get_limits) before spending: it shows what is
left and which cap would refuse the call. Report spend with get_limits
and get_receipts. Without an allowance, paid search/data calls say
“Set up your allowance first.” Wrong or revoked keys return HTTP 401.
MCP allows 60 requests per minute per key.

## With your own wallet: x402

"model":"singit/auto" on POST /v1/chat/completions picks an eco, standard or premium model for text prompts by simple rules; optional "min_tier" (eco, standard or premium) sets the minimum tier. X-SingIt-Model and X-SingIt-Tier identify the model and tier that answered. If the chosen model's seller refuses before payment, the router tries the next model of the tier or the next tier up, never below min_tier. Only POST /v1/chat/completions.

fallback_models is optional on paid POST /v1/chat/completions with a pinned model: 1 to 3 unique model ids (not the pinned model, not singit/auto). If the pinned model is unavailable before payment, the first healthy priced candidate whose Base upto ceiling is no higher than the pinned one answers (same auto tier if the pinned model has one). X-SingIt-Model and X-SingIt-Fallback-From identify which model answered and which was replaced.

Use https://ask.singitai.app. USDC on Base or Solana; no account or API key.
An unpaid request returns 402 with PAYMENT-REQUIRED (base64 JSON, x402Version 2).
Decode it, check the offered network, asset, recipient and amount against your
configuration and budget, sign one offer, and retry the same request with
PAYMENT-SIGNATURE. Success includes PAYMENT-RESPONSE.
Prefer upto when supported: it pays actual cost up to the signed ceiling.
Never sign above budget. Keep maxPerCallUsd and maxPerDayUsd in the client.
These are client-side guards, not on-chain limits; the SDK daily counter is in
memory per instance and UTC day. Restarting starts a new counter.

The TypeScript package [@singitai/sdk](https://github.com/SingItAi/SingItAI/blob/main/sdk/typescript/README.md) provides chat() and paidFetch() with client-side caps. See the repository's sdk/typescript/README.md. The PyPI package [singit](https://github.com/SingItAi/SingItAI/blob/main/sdk/python/README.md) provides client-side caps named max_per_call_usd and max_per_day_usd; see sdk/python/README.md. Both support Base upto and exact; Solana is exact only. Set framework retries to zero so a retry does not sign a second payment.

## Tokenized stock NAV data (x402, Base and Solana)

GET https://ask.singitai.app/v1/stocks lists the supported tokenized stocks for free. Paid reads in USDC on Base or Solana (x402 exact) - the 402 carries both accepts, the payer picks its network, and the price is the same on both: GET /v1/stocks/{ticker}/price (0.001 USDC), GET /v1/stocks/{ticker}/info (0.002 USDC), GET /v1/stocks/compare?tickers=AAPLc,TSLAc (0.003 USDC). Values are NAV reference data from a public onchain NAV feed on Base whichever network you pay on - not an executable price, not investment advice; always check ageSeconds, stale and readFailed (feeds may freeze outside market hours). Limits per network: on Base send X-SingIt-Limiter to see the owner allowance fit (X-SingIt-Spend-Limit) before signing - the AgentAllowance contract enforces daily, per-purchase and expiry limits onchain, with Revoke and Emergency stop; on Solana the server checks daily and per-purchase limits and only the total is onchain via SPL delegate, with Revoke. Settled calls return X-SingIt-Receipt. Documentation: https://singitai.app/docs/stocks/
POST https://ask.singitai.app/v1/stocks/{ticker}/trade/quote (not available yet: until a pool is verified every request is refused before payment and nothing is charged; see available in GET /v1/catalog) returns unsigned approve and swap transactions in an onchain USDC pool on Base; the body is side, amount, amountUnit, taker and nonUsAttestation: true. The swap gas limit is estimated per request and capped at 650000. You can pay for this quote in USDC on Base or Solana, within the allowance limits you set. The trade itself always happens on Base: the user signs the swap in their own Base wallet, which must hold the USDC for the trade plus a little ETH for gas. Paying for the quote from Solana does not move funds to Base. SingIt never signs or holds the trade. Owner and client allowance limits apply to the quote request only, never the trade amount. A refusal carries refuseReason and charges nothing. Unsigned transaction builder for an onchain USDC pool on Base. You sign and broadcast from your own wallet; SingIt never holds keys, funds or orders, and never executes. NAV is a reference value, not an execution price. Not investment advice. Tokenized stocks are not company shares and carry no voting or other shareholder rights; issuer freeze/seize and corporate actions apply. Not available to U.S. persons. Local stdio MCP stock tools: singit_stocks_list (free), singit_stock_price, singit_stock_info, singit_stocks_compare, singit_stock_trade_quote (unsigned transactions; sign in your own wallet); paid in USDC on Base or Solana (optional network argument); paid tools draw from the owner-set client limits. SINGIT_LIMITER adds the pre-signing Base allowance check. Receipts are returned with the data. Direct wallet payments are not automatically allowance-funded; remote MCP availability requires separate gateway integration.

## Video clips (x402, Base and Solana)

POST https://ask.singitai.app/v1/video/generations with {"model","prompt","duration_seconds"} pays per clip
in USDC: x402 exact on Base, x402 upto on Solana (your client must support upto). It answers 202 with job_id
and status_url; poll with the job token (X-Job-Token) and download free when ready. You pay only for a
finished clip: on Base nothing is settled if the job fails; on Solana the escrow refunds a failed or
timed-out job. Models and prices: GET /v1/video/models (free).
Sold now: grok-imagine-text-to-video 5 s (~100 s render, 0.261 USDC Base / 0.262 Solana) and
longcat-text-to-video 8 s (~290 s, 0.326 / 0.327). Both offers last 600 s; Base settles before validBefore
minus 30 s, Solana claims the clip price before the escrow expiry minus 60 s (the escrow maximum is the
clip price plus 0.000001 USDC, returned with any unused amount). Only status succeeded with video_url,
files and receipt means charged. A job lost on restart answers 404 and is never charged. Never re-sign
automatically after a lost POST or settlement_unknown; reconcile the original payment first at GET https://app.singitai.app/v1/wallet/{address}/reconciliation (owner API key; not served on ask.singitai.app).
Owner-set limits: on Base the AgentAllowance contract enforces the daily, per-purchase and expiry limits
onchain (Revoke any time; Emergency stop on Base); on Solana the SingIt server checks the daily and
per-purchase limits and only the total is onchain via the SPL delegate (Revoke any time). From your own
wallet, cap it by what you sign.
Guide: https://singitai.app/docs/video/

## Video over MCP - coming with the next MCP release

generate_video(model, prompt, duration_seconds) will run the same paid route from the MCP server; today use
the x402 call above.

## Errors

| Result | Action |
| --- | --- |
| 400 / 413 / 422 | Fix the request; reduce size for 413. Do not retry on another model. |
| 402 with PAYMENT-REQUIRED | Check budget and sign one offer, then retry. Re-sign only after checking the fresh challenge. |
| 402 payment_unfunded | fund_wallet: Fund the wallet and its token account. Nothing was charged for this request. |
| 402 payment_blockhash_stale | sign_again: On Solana, sign again with a fresh blockhash. Nothing was charged for this request. |
| 402 payment_replay | check_previous_result: Check the previous result before paying again. Nothing was charged for this request. |
| 402 payment_invalid | fix_payment: Fix the payment before retrying. Nothing was charged for this request. |
| 409 payment_duplicate | Check the original result; do not reuse the signature. |
| 429 free_budget_exhausted | Wait Retry-After; the daily free budget resets at midnight UTC. |
| 503 | Wait Retry-After where supplied, then retry. No billable answer means no charge. |
| Refused tool call (isError true), daily limit used up | Stop, tell the owner, and do not try to bypass the limit. |

## Rules and boundary

Never print or store the API key or private key in chat or logs. Read secrets
from the environment. Stop when a limit refuses. The owner can revoke the key
immediately in Settings → API keys without a wallet signature.

SingIt's server enforces the key's daily and per-request caps only for calls
made with that key to SingIt's MCP and the same key's /v1 endpoint. They do not
limit spending elsewhere. SingIt's contracts do not protect other people's
agents' own wallets. A key cannot move funds or change limits.

On Base the owner's allowance limiter is an on-chain contract the owner can
pause. On Solana, SingIt's server checks key caps and its own agent's daily and
per-purchase limits. The Solana stop pauses new purchases in SingIt's gateway
without removing the on-chain delegate approval; only Revoke removes it. There
is no on-chain emergency stop. A paused Solana account is unpaused only by a
new grant signed after the pause.

Claude Code + SingIt: one line with singit-cc: https://singitai.app/docs/claude-code/

## x402 agent chat

Paid POST https://ask.singitai.app/v1/chat/completions supports function tools, tool replies, developer instructions and text/image blocks within 200 messages, 100000 estimated characters, 64 tools/calls, four images and 8192 output tokens (default 800; JSON body limit 128 kB). Capabilities depend on the chosen model.
Messages and Responses support tools and up to 32000 output tokens.

Chat, Messages and Responses accept stream:true as live SSE: after payment is
verified, tokens arrive as the model produces them (`: keepalive` while quiet).
Billing is on the terminal event after settlement. Chat stream_options accepts
only {include_usage:boolean}, only with stream:true. Errors before the first token
stay JSON and charge nothing; a break after the first token ends without terminal
events and charges nothing. Free and per-model chat stream the same way with their existing text-only limits; free models refuse tools/images.
Legacy plain text requests with stream:false and max_tokens<=1200 keep their behavior.

Clients should treat payment_duplicate and payment_replay as the same condition.
