{"uid":"cap_1T5iDMj4AXfeYIpfNeB2D","slug":"delx-commerce-categorical-distribution-171154dc","name":"Delx Commerce — Categorical Distribution","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/categorical-distribution?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"values":{"type":"array","description":"Input field: values."}}},"responseSchema":{"type":"json","example":{"count":3,"schema":"delx/util-categorical-distribution/v1","truncated":false,"categories":[{"count":2,"value":"ready","percent":66.6667},{"count":1,"value":"failed","percent":33.3333}],"unique_count":2}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_KxGUdrk-OAQ_IgkLwPLFW","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes a categorical frequency distribution from an array of values, returning counts, percentages, and unique category stats.","exampleAgentPrompt":"Take this list of job statuses — ['ready','ready','failed'] — and give me a categorical distribution showing how many times each status appears and what percentage it represents.","exampleUseCases":[{"title":"Pipeline status health check","prompt":"I have a list of task statuses from my pipeline run: ['completed','completed','failed','running','completed','failed']. Can you break down how many are in each state and what percentage each represents?"},{"title":"Survey response breakdown","prompt":"Here are the responses from our user survey question: ['satisfied','neutral','satisfied','dissatisfied','satisfied','neutral','satisfied']. Give me a frequency distribution showing how many picked each option and their percentages."},{"title":"Log level frequency analysis","prompt":"I've got a batch of log level labels: ['INFO','WARN','INFO','ERROR','INFO','WARN','INFO','ERROR','ERROR']. Compute the categorical distribution so I can see which log levels are most common."}],"resultDescription":"Returns a JSON object with the total count, a schema identifier, a truncated flag, a list of categories each with their value, count, and percentage, and the total unique category count.","failureModes":["Missing or empty values array returns an error or empty distribution","Non-array input types cause schema validation failure","Payment failure via x402 protocol prevents API execution","Extremely large arrays may result in truncated output (truncated: true)"],"whenToPreferThis":"Use this endpoint when you need a fast, pay-per-call categorical frequency breakdown with no signup overhead. Ideal for AI agents that need on-the-fly distribution analysis of discrete label arrays (e.g. statuses, categories, survey answers) within a crypto-native payment workflow using USDC on Base or Solana.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:49.522Z","isFirstParty":false,"canonicalSlug":"delx-commerce-categorical-distribution-171154dc"}