# PQS: Prompt Quality Score Preflight

> PQS: Prompt Quality Score Preflight is a paid API for AI agents from api.relai.fi, paid per call via x402, $0.050000/call, status unknown (last checked 2026-09-14).

Scores a prompt for quality and checks an optional endpoint URL for trust before routing to an AI inference endpoint

## Facts

- Endpoint: GET https://api.relai.fi/relay/1779373065272/api/preflight
- Price: $0.050000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pqs-prompt-quality-score-preflight-fbf381b3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4J6X7xABy-RyuJ_ci52zZ

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 pqs-prompt-quality-score-preflight-fbf381b3
```

Example prompt: Before I send this prompt to an AI endpoint, run a preflight quality and trust check on it — the prompt is 'Summarize the key risks of investing in tokenized real estate in under 200 words', the vertical is 'crypto', and the endpoint URL is https://api.example.com/inference.

## When to prefer this

Use this endpoint when you need to gate AI inference calls with a quality and trust check — specifically when you want to avoid wasting money on low-quality prompts or untrusted endpoints, or when operating in a pipeline that requires x402 payment-gated preflight validation before inference.

## Known failure modes

- Empty or missing prompt returns validation error
- Unrecognized vertical enum value returns bad request
- Endpoint URL unreachable or malformed returns trust check failure
- Payment of $0.05 USDC not provided returns 402 Payment Required
- Prompt exceeds 10,000 character limit returns length error

## How this service works

Combined PQS prompt quality + x402 endpoint trust check before inference

## Output

Returns a combined prompt quality score (PQS) and endpoint trust score indicating whether the prompt is well-formed and whether the target endpoint is safe to call before committing to an inference request.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "prompt": {
   "type": "string",
   "maxLength": 10000,
   "minLength": 1,
   "description": "Prompt to preflight"
  },
  "vertical": {
   "enum": [
    "software",
    "content",
    "business",
    "education",
    "science",
    "crypto",
    "general",
    "research"
   ],
   "type": "string",
   "default": "general",
   "description": "Domain: software/content/business/education/science/crypto/general/research"
  },
  "endpoint_url": {
   "type": "string",
   "description": "Optional endpoint URL for trust scoring"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pqs-prompt-quality-score-preflight-fbf381b3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.relai.fi](https://www.zero.xyz/host/api.relai.fi/llms.txt)
