# SQLGuard Credit Purchase (Micro)

> SQLGuard Credit Purchase (Micro) is a paid API for AI agents from sqlguard.io, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-14).

Purchases a prepaid micro-credit bundle for SQLGuard's SQL execution authorization firewall, enabling sandbox validation and Ed25519 certificate issuance for mutating SQL statements.

## Facts

- Endpoint: GET https://sqlguard.io/v1/credits/buy/micro
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sqlguard-credit-purchase-micro-971a65ae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pYxTAeJzbx645sVkrzr9z

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability sqlguard-credit-purchase-micro-971a65ae
```

Example prompt: I want to authorize mutating SQL against production — buy me a SQLGuard micro credit pack so I can start getting Ed25519 execution certificates for my INSERT and DELETE statements.

## When to prefer this

Choose this endpoint when you need to prepay or top up credits for SQLGuard's SQL execution authorization system before issuing validation or certificate requests. Use this as the first step if your SQLGuard credit balance is zero or insufficient to cover upcoming mutating SQL statement validations. This is the entry-level ($0.10) credit purchase; prefer it for lightweight or one-off authorization needs.

## Known failure modes

- Payment failure — insufficient USDC balance or x402 payment protocol error returns payment required error
- Invalid agent_id — unrecognized agent identifier may result in credit not being associated correctly
- Network timeout — slow payment settlement may leave credit purchase in pending state
- Duplicate purchase — non-idempotent endpoint may process multiple charges if retried without checking balance

## How this service works

Prepaid volume credits ($0.10 → 5) for SQLGuard validate/verify after Session or Instant. Not the primary authorize path — use Session Cert for authorize mutating SQL before execute.

## Output

Returns confirmation of a prepaid micro-credit purchase (entry at $0.10 USDC), crediting the caller's SQLGuard account balance which can then be spent on sandbox validation and Ed25519 PASS certificate issuance for mutating SQL statements (INSERT, UPDATE, DELETE, DDL).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "agent_id": {
       "type": "string",
       "description": "Optional agent id query param for discovery probes"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "bundle": "micro",
  "balance": 5,
  "agent_id": "0xYourAgentOrWallet",
  "credits_added": 5
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sqlguard-credit-purchase-micro-971a65ae/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from sqlguard.io](https://www.zero.xyz/host/sqlguard.io/llms.txt)
