# PQS: Prompt Quality Score

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

Evaluates a prompt's quality and optionally scores endpoint trustworthiness before sending it to an AI service

## Facts

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

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-ac4940cc
```

Example prompt: Can you preflight this prompt for me and tell me its quality score? The prompt is: 'Summarize the latest trends in DeFi yield farming in under 200 words.' Use the crypto vertical, and also check the trust score for the endpoint at https://api.example.com/defi-summary.

## When to prefer this

Use this endpoint when you want to assess a prompt's quality before dispatching it to a downstream AI service, especially when combined with endpoint trust verification. Ideal for agent workflows that need a preflight gate to avoid wasting compute or money on poorly-formed prompts. Best when operating in a specific domain vertical (software, crypto, research, etc.) where scoring precision matters.

## Known failure modes

- Empty or missing prompt returns validation error
- Invalid vertical enum value returns 400 bad request
- Malformed endpoint_url may cause trust scoring to fail or be skipped
- Payment not fulfilled (x402) blocks request execution
- Prompt exceeding 10,000 characters rejected
- Network timeout on slow endpoint trust resolution

## How this service works

Preflight prompt + endpoint trust (Solana x402)

## Output

Returns a prompt quality score indicating how well-formed and effective the prompt is expected to be, optionally accompanied by a trust score for the specified endpoint URL, scoped to the chosen domain vertical.

## 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-ac4940cc/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)
