API Reference v1

Documentation

Everything you need to integrate limit.md into your AI agent stack. One endpoint, full control.

Quick Start

Get running in under 5 minutes. Create an account, issue your first agent card, and attach a spending policy.

1
Create an account
Sign up free at limit.md/register — no credit card required.
2
Issue an agent card
Go to Agent Cards → Issue Card. A Lithic virtual card is created instantly.
3
Set a spending policy
Under Policies, set per-transaction limits, daily volume caps, and approval thresholds.
4
Get your API key
Go to API Keys and create a key. It starts with lim_.

POST /api/v1/actions/check

Evaluate whether an agent action is permitted under its current policy. Use this before executing any financial action in your agent code.

curl -X POST https://limit.md/api/v1/actions/check \
  -H "Authorization: Bearer lim_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agent_abc123",
    "action_type": "buy",
    "asset": "NVDA",
    "amount_usd": 80,
    "reason": "Earnings momentum signal"
  }'

Request body

agent_idstringRequiredYour agent's ID from the dashboard
action_typestringRequiredbuy, sell, transfer, or any custom string
amount_usdnumberRequiredUSD value of the action
assetstringOptionalTicker or asset name (e.g. NVDA, BTC)
sidestringOptionalbuy or sell
reasonstringOptionalAgent's reason — stored in audit log

Response

{
  "status": "approved",            // approved | blocked | requires_approval | reduced
  "decision_id": "dec_xyz789",
  "reason": "All policy checks passed",
  "requires_human_approval": false,
  "allowed_amount_usd": null,      // set when status is "reduced"
  "policy_checks": [
    { "rule": "max_trade_amount", "result": "pass", "message": "$80 ≤ $100 limit" }
  ]
}

Status values

StatusMeaning
approvedAction passes all checks. Proceed.
blockedAction violates a rule. Do not proceed.
requires_approvalAbove approval threshold. Wait for human review in the dashboard.
reducedAmount exceeded per-transaction limit. allowed_amount_usd has the capped value.

POST /api/v1/actions/:id/execute

After a requires_approval decision is approved by a human in the Approvals dashboard, call this to record it as executed.

curl -X POST https://limit.md/api/v1/actions/dec_xyz789/execute \
  -H "Authorization: Bearer lim_your_api_key"

Python example

import requests

API_KEY = "lim_your_api_key"
BASE   = "https://limit.md"

def check_action(agent_id, action_type, asset, amount_usd, reason=""):
    res = requests.post(
        f"{BASE}/api/v1/actions/check",
        headers={"Authorization": f"Bearer {API_KEY}"},
        json={
            "agent_id": agent_id,
            "action_type": action_type,
            "asset": asset,
            "amount_usd": amount_usd,
            "reason": reason,
        },
    )
    return res.json()

result = check_action("agent_abc123", "buy", "NVDA", 80, "Earnings momentum")

if result["status"] == "approved":
    # execute trade
    pass
elif result["status"] == "requires_approval":
    print("Waiting for approval:", result["decision_id"])
else:
    print("Blocked:", result["reason"])

LangChain tool

from langchain.tools import tool
import requests

@tool
def trade_with_policy(asset: str, amount_usd: float, action_type: str = "buy") -> str:
    """Submit a trade action through the limit.md policy engine before executing."""
    res = requests.post(
        "https://limit.md/api/v1/actions/check",
        headers={"Authorization": "Bearer lim_your_api_key"},
        json={
            "agent_id": "agent_abc123",
            "action_type": action_type,
            "asset": asset,
            "amount_usd": amount_usd,
        },
    ).json()

    if res["status"] == "blocked":
        return f"Trade blocked: {res['reason']}"
    elif res["status"] == "requires_approval":
        return f"Queued for approval (id: {res['decision_id']})"

    return f"Approved: {action_type} {amount_usd} USD of {asset}"

Spending policy reference

Configure policies in the dashboard under Policies. Each policy is attached to one agent card.

RuleUnitBehaviour
Per-transaction limitUSDSingle action cannot exceed this value
Daily volume capUSDTotal approved spend per calendar day
Requires approval aboveUSDActions above this value queue for human review
Max transactions/daycountHard cap on daily approved transaction count

Rate limits

PlanLimitsAPI burst
Free1 card · 500 transactions/mo
Builder10 cards · unlimited100 req/min
EnterpriseUnlimited cardsCustom

Support

Questions, bugs, or feedback — email hello@limit.md. Enterprise support includes a dedicated Slack channel.