{"uid":"cap_rq_SFSHqq1TeRB31pzv1Q","slug":"percentile-for-agents-271a1b98","name":"Percentile for Agents","description":"Percentile of a list. Use for p50/p95 style summaries without a stats stack. Returns the requested percentile of a numeric array. $0.001 USDC per successful call via x402 on Base—deterministic first-party JSON, no API key, no subscription, and nothing is billed on structured validation errors.","url":"https://api.delx.ai/api/v1/x402/percentile","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"values":{"type":"array","items":{"type":"number"},"maxItems":10000,"minItems":1,"description":"Numeric samples for stats tools (mean/median/stdev/percentile). Cap 10k numbers."},"percentile":{"type":"number","maximum":100,"minimum":0,"description":"Optional percentile in 0–100 (e.g. 95 for p95). Handler default when omitted."}}},"responseSchema":{"type":"json","example":{"p":50,"count":5,"value":6,"schema":"delx/percentile/v1"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.001/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_1awztp6Zx3X37Buhsbnf2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes a requested percentile (e.g. p50, p95) of a numeric array without requiring a statistics stack","exampleAgentPrompt":"What is the p95 of these response times: [120, 200, 340, 95, 410, 280, 175, 505, 230, 310]? Give me the 95th percentile value.","exampleUseCases":[{"title":"API latency p99 summary","prompt":"I have a list of API response times in milliseconds — [45, 120, 300, 88, 500, 210, 75, 430, 190, 620, 55, 380] — can you find the 99th percentile so I can set my SLA threshold?"},{"title":"Grade distribution median","prompt":"Here are the test scores for my class: [72, 85, 91, 60, 78, 95, 83, 67, 74, 88, 90, 55, 82]. What's the median (p50)?"},{"title":"Server CPU p90 for capacity planning","prompt":"These are CPU utilization samples from my servers over the last hour: [34, 41, 78, 55, 62, 90, 47, 38, 85, 73, 61, 29, 95, 50]. Give me the 90th percentile so I can figure out headroom."}],"resultDescription":"A JSON object containing the computed percentile value for the submitted numeric array at the requested percentile rank (0–100). The result is a deterministic first-party calculation with no external dependencies.","failureModes":["Empty or missing 'values' array returns a structured validation error (not billed)","Array exceeding 10,000 items is rejected","Percentile value outside 0–100 range returns a validation error","Non-numeric values in the array cause a validation error","Payment failure (insufficient USDC balance or x402 misconfiguration) blocks the call"],"whenToPreferThis":"Choose this endpoint when you need a quick, stateless percentile calculation (p50, p95, p99, etc.) from a numeric array inside an agent workflow and you don't want to set up or depend on a statistics library or data pipeline. Ideal for summarizing latency, score distributions, or sensor readings on the fly. At $0.001 USDC per call with no API key or subscription, it's well-suited for lightweight, infrequent agent-side stat operations.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:02:30.886Z","isFirstParty":false}