# PayAI SQL Batch Safety Preflight

> PayAI SQL Batch Safety Preflight is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-15).

Runs safety and performance preflight checks on a batch of SQL queries, returning per-query pass/caution/block verdicts plus a rollup summary.

## Facts

- Endpoint: POST https://payai.agentstools.dev/sql/batch
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/payai-sql-batch-safety-preflight-f00bc0a2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__-ePg60NVBpklMQ8hvFwm

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 payai-sql-batch-safety-preflight-f00bc0a2 -d '<json body>'
```

Example prompt: Can you run a batch safety preflight on these 5 SQL queries against a postgres dialect and tell me which ones are safe to execute, which need caution, and which should be blocked?

## When to prefer this

Choose this endpoint when you need to evaluate multiple SQL queries at once for safety and performance signals before execution — especially useful in CI/CD pipelines, migration planning, or developer review workflows. Prefer it over single-query analysis when you have a batch of queries to screen efficiently. It is not a substitute for a full query execution plan or database-level access controls.

## Known failure modes

- Missing or empty 'queries' array returns a validation error
- Invalid dialect value causes schema rejection
- Malformed query objects without required name/query fields cause errors
- Very large batches may exceed payload limits
- Ambiguous or non-SQL text may produce unreliable verdicts

## How this service works

Batch safety and performance preflight for many database queries at once: a list of objects each with a name and query text. Returns a per-query pass, caution or block verdict plus a rollup with the worst verdict and counts. Query-safety indicators, not a guarantee.

## Output

Returns a per-query verdict object (pass, caution, or block) for each named query submitted, along with a rollup object containing the worst overall verdict and counts for each verdict category. Results are safety indicators, not guarantees of query correctness or execution outcomes.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "dialect": {
   "enum": [
    "postgres",
    "mysql",
    "sqlite",
    "bigquery",
    "snowflake"
   ],
   "type": "string",
   "description": "Default dialect for entries that do not set one"
  },
  "queries": {
   "type": "array",
   "items": {
    "type": "object"
   },
   "description": "List of objects, each with a name and query text"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/payai-sql-batch-safety-preflight-f00bc0a2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
