# PromptQualityScore Variants API

> PromptQualityScore Variants API is a paid API for AI agents from promptqualityscore.com, paid per call via x402, $0.1/call, status unknown (last checked 2026-10-10).

Generates N ranked prompt rewrites scored on an 8-dimension rubric, returned best-first with delta vs. baseline

## Facts

- Endpoint: GET https://promptqualityscore.com/api/variants?utm_source=zero.xyz
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/promptqualityscore-com-20348645
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zW4lhu2ihP-Dn4RF0jzug

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 promptqualityscore-com-20348645
```

Example prompt: Give me 3 ranked rewrites of this prompt scored on the 8-dimension PQS rubric for the software vertical: 'Write a Python function that parses JSON' — show me which one scores highest and by how much.

## When to prefer this

Use this endpoint when you need multiple improved prompt alternatives ranked by quality rather than a single score or a single rewrite. Prefer it over the basic scoring endpoint when you want actionable rewrites, not just diagnostics. Best when iterating on a prompt and need to compare styles (detailed, concise, structured, role-framed, example-led) with objective scores to pick the best one.

## Known failure modes

- count out of range (must be 1-5) returns validation error
- prompt field missing or empty returns 400
- invalid vertical enum value returns validation error
- prompt too long may be truncated or rejected
- payment failure via x402 returns 402 before processing
- model timeout may occur for very complex prompts

## How this service works

Generates 1-5 ranked prompt rewrites scored on the 8-dimension PQS rubric.

## Output

Returns an array of up to 5 rewritten prompt variants sorted best-first, each with a full 8-dimension score breakdown (clarity, specificity, context, constraints, examples, output_format, role_definition, cot_structure), a letter grade (A-F), total score out of 80, percentile, generation style label, and delta vs. the original baseline score. Also includes the baseline score for the original prompt and the domain vertical used.

## 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"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "variants": [
   {
    "score": {
     "grade": "A",
     "total": 68,
     "out_of": 80,
     "dimensions": {
      "total": 68,
      "clarity": 9,
      "context": 8,
      "examples": 8,
      "constraints": 9,
      "specificity": 9,
      "cot_structure": 8,
      "output_format": 9,
      "role_definition": 8
     },
     "percentile": 85
    },
    "style": "role-framed",
    "prompt": "You are an AI-agent product manager. In one sentence (max 25 words), explain PQS scoring to a technical buyer who evaluates x402 APIs. Focus on: what it measures, when it runs (pre-inference), and why the buyer should care.",
    "delta_vs_baseline": 22
   },
   {
    "score": {
     "grade": "B",
     "total": 62,
     "out_of": 80,
     "dimensions": {
      "total": 62,
      "clarity": 9,
      "context": 7,
      "examples": 8,
      "constraints": 8,
      "specificity": 8,
      "cot_structure": 7,
      "output_format": 9,
      "role_definition": 6
     },
     "percentile": 75
    },
    "style": "structured",
    "prompt": "Write a one-sentence pitch of PQS scoring for an AI agent operator. Format: 'PQS scores [what] on [N] dimensions so [agent] can [action] before [event].'",
    "delta_vs_baseline": 16
   },
   {
    "score": {
     "grade": "B",
     "total": 58,
     "out_of": 80,
     "dimensions": {
      "total": 58,
      "clarity": 8,
      "context": 7,
      "examples": 10,
      "constraints": 6,
      "specificity": 7,
      "cot_structure": 8,
      "output_format": 7,
      "role_definition": 5
     },
     "percentile": 70
    },
    "style": "example-led",
    "prompt": "Example output: 'PQS scores any LLM prompt on 8 dimensions pre-inference so AI-agent buyers can reject low-quality inputs before paying for a run.' Now write a similar one-sentence pitch for an agent operator.",
    "delta_vs_baseline": 12
   }
  ],
  "vertical": "general",
  "powered_by": "PQS - promptqualityscore.com",
  "pqs_version": "2.0",
  "baseline_score": {
   "grade": "C",
   "total": 46,
   "out_of": 80,
   "dimensions": {
    "total": 46,
    "clarity": 7,
    "context": 6,
    "examples": 4,
    "constraints": 5,
    "specificity": 6,
    "cot_structure": 6,
    "output_format": 7,
    "role_definition": 5
   },
   "percentile": 58
  },
  "original_prompt": "Explain PQS scoring in one sentence to an AI agent operator.",
  "best_variant_index": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/promptqualityscore-com-20348645/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from promptqualityscore.com](https://www.zero.xyz/host/promptqualityscore.com/llms.txt)
