# SQLGuard Session Certificate

> SQLGuard Session Certificate is a paid API for AI agents from sqlguard-io.fly.dev, paid per call via x402, $0.25/call, status unknown (last checked 2026-10-20).

Creates a short-lived Ed25519-signed session certificate granting 10 authorized execution slots (~30 minutes) for an agent identity, paid via x402 at $0.25 USDC.

## Facts

- Endpoint: POST https://sqlguard-io.fly.dev/v1/session?utm_source=zero.xyz
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sqlguard-session-certificate-c242cb93
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8BAR-bDYhgP6IiosXR5C7

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-session-certificate-c242cb93 -d '<json body>'
```

Example prompt: Start a new SQLGuard session certificate for agent ID 'agent-wallet-abc123' so I can authorize up to 10 execution slots for the next 30 minutes.

## When to prefer this

Use this endpoint when an agent needs to run a short burst of SQLGuard validate/verify/execute operations and requires an Ed25519 session certificate to authorize them. Prefer this over Instant or Prepaid Volume Credits when the task is time-bounded (~30 minutes) and fits within 10 execution slots. For longer production jobs requiring more slots, use the Workday Pack POST /v1/workday instead. This is not a linting endpoint — it issues authorization, not SQL analysis.

## Known failure modes

- Missing or invalid agent_id results in a 400 validation error
- Payment of $0.25 USDC not received or x402 handshake fails — 402 Payment Required
- Session cert already active for this agent_id — may return conflict or overwrite
- Expired session slots — cert is only valid ~30 minutes; subsequent calls fail after window closes
- bodyType not set to a valid enum value (json, form-data, text) causes schema validation failure
- Network or Fly.dev infrastructure downtime returns 5xx errors

## How this service works

Short-burst authorize — Session Cert. Exact $0.25 → 10 Ed25519 PASS slots (~30m). For production jobs use Workday Pack POST /v1/workday. Burn /v1/session/cert → verify → execute. Not lint.

## Output

Returns an Ed25519-signed session certificate granting 10 PASS slots valid for approximately 30 minutes, tied to the provided agent_id. The response includes the certificate type and an example object showing the issued credential. The agent can then use this cert on subsequent SQLGuard verify/execute calls during the session window.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "agent_id"
     ],
     "properties": {
      "agent_id": {
       "type": "string",
       "description": "Stable agent or wallet id that owns the session"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sqlguard-session-certificate-c242cb93/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from sqlguard-io.fly.dev](https://www.zero.xyz/host/sqlguard-io.fly.dev/llms.txt)
