{"uid":"cap_NqphBV--Ncez3qPmMdSjs","slug":"pqs-prompt-quality-score-3b8c30af","name":"PQS: Prompt Quality Score","description":"Quick pre-flight quality score: composite + three framework sub-scores (PEEM, RAGAS, G-Eval) + verdict. Designed to run upstream of any other paid call to filter weak prompts before inference.","url":"https://api.relai.fi/relay/1779373065272/api/pqs-grade","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"prompt":{"type":"string","maxLength":10000,"minLength":1,"description":"Prompt text to grade (1-10000 chars)"},"vertical":{"enum":["software","content","business","education","science","crypto","general","research"],"type":"string","default":"general","description":"Optional domain: software/content/business/education/science/crypto/general/research"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001000","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001000/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_K5RTxpX-K-roEsbW76_7A","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Scores a prompt's quality using a composite of PEEM, RAGAS, and G-Eval frameworks, returning sub-scores and a verdict to filter weak prompts before expensive inference calls.","exampleAgentPrompt":"Before sending this to the model, can you run a PQS quality grade on my prompt — 'Explain the architecture of a microservices system with a focus on fault tolerance' — using the software vertical, so we know if it's strong enough to be worth the inference cost?","exampleUseCases":null,"resultDescription":"Returns a composite quality score, three framework sub-scores (PEEM, RAGAS, G-Eval), and a pass/fail verdict indicating whether the prompt is strong enough to proceed to inference.","failureModes":["prompt text is empty or exceeds 10,000 characters — returns validation error","unsupported vertical value — returns enum validation error","network timeout or upstream service unavailability — returns 5xx error","payment not fulfilled (x402) — returns 402 Payment Required"],"whenToPreferThis":"Use this endpoint as a cheap pre-flight filter ($0.001) before calling any expensive LLM inference API. Ideal when you want to avoid wasting budget on poorly formed prompts, or when building pipelines where prompt quality must meet a threshold before proceeding. Prefer this over manual prompt review when operating at scale or in automated agentic workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:45:50.087Z","isFirstParty":false}