# PQS: Prompt Quality Score – Variant Generator

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

Generates N ranked, diverse rewrites of a given prompt scored on an 8-dimension PQS rubric, returned best-first.

## Facts

- Endpoint: GET https://api.relai.fi/relay/1779373065272/api/variants
- Price: $0.100000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pqs-prompt-quality-score-variant-generator-d145b4d2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YTZYQ-l3JMu1k0r_-h6eM

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-variant-generator-d145b4d2
```

Example prompt: Can you give me 5 ranked rewrites of this prompt scored on the PQS rubric for the 'software' vertical: 'Write a Python function that parses JSON and handles errors'? Return the best one first.

## When to prefer this

Use this endpoint when you need to improve prompt quality through diverse, scored rewrites rather than a single suggestion. Ideal when you want ranked alternatives with objective quality metrics across 8 dimensions, especially for domain-specific verticals like software, research, or content.

## Known failure modes

- Empty or missing prompt returns 400 validation error
- Count outside 1-5 range returns validation error
- Invalid vertical enum value returns 400
- Prompt exceeding 10,000 characters returns 400
- Payment not provided or insufficient returns 402
- Service unavailable returns 503

## How this service works

Generate N ranked prompt variants. Diverse rewrites scored on the 8-dimension PQS rubric, returned best-first.

## Output

A ranked list of up to 5 diverse prompt variants, each scored against the 8-dimension PQS rubric, ordered best-first. Each variant is a rewrite of the original prompt optimized for quality across dimensions like clarity, specificity, and intent alignment.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "count": {
   "type": "integer",
   "default": 3,
   "maximum": 5,
   "minimum": 1,
   "description": "Number of variants to generate (1-5)"
  },
  "prompt": {
   "type": "string",
   "maxLength": 10000,
   "minLength": 1,
   "description": "Prompt to generate variants for"
  },
  "vertical": {
   "enum": [
    "software",
    "content",
    "business",
    "education",
    "science",
    "crypto",
    "general",
    "research"
   ],
   "type": "string",
   "default": "general"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pqs-prompt-quality-score-variant-generator-d145b4d2/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)
