{"uid":"cap_YzHzPyWKg0wi-_vGa_dhX","slug":"delx-log-loss-calculator-25ae67a7","name":"Delx Log-Loss Calculator","description":"Log loss (cross-entropy) for a probability vs binary outcome. Call when training-style forecast quality when sharp mistakes matter. Returns log loss value as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.","url":"https://api.delx.ai/api/v1/x402/log-loss","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"prob":{"type":"number","description":"Input field: prob."},"outcome":{"type":"integer","description":"Input field: outcome."}}},"responseSchema":{"type":"json","example":{"prob":0.7,"schema":"delx/util-log-loss/v1","outcome":1,"log_loss":0.3566749439387324}},"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_qCWaFvt2Yt6AJgxJVhmkp","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 the log-loss (cross-entropy loss) for a single binary prediction given a predicted probability and an actual binary outcome.","exampleAgentPrompt":"What's the log-loss when my model predicted a probability of 0.7 and the actual outcome was 1?","exampleUseCases":[{"title":"Classifier confidence audit","prompt":"My model predicted a probability of 0.85 that a customer would churn, but the customer actually did churn (outcome 1). What's the log-loss for that prediction?"},{"title":"Bad prediction penalty check","prompt":"I predicted a 0.05 probability for an event and it actually happened (outcome 1). Can you calculate the log-loss so I can see how badly the model was penalized?"},{"title":"Model calibration spot-check","prompt":"I want to spot-check my model's calibration — it said 0.6 probability for a positive class and the true label was 0. What log-loss does that give me?"}],"resultDescription":"Returns a JSON object containing the input probability, the input outcome, the schema identifier ('delx/util-log-loss/v1'), and the computed log-loss value as a floating-point number (e.g. 0.3566749439387324).","failureModes":["Invalid probability value (outside 0–1 range) may cause computation errors or undefined results","Non-integer outcome value may cause schema validation failure","Missing required fields (prob or outcome) will return an error","Probability of exactly 0 or 1 paired with the opposite outcome produces infinite log-loss"],"whenToPreferThis":"Use this endpoint when you need a quick, stateless, per-prediction log-loss calculation without spinning up a local ML library or runtime. Ideal for agent workflows that evaluate individual classifier outputs on-the-fly, audit model confidence scores, or spot-check calibration during inference pipelines. Prefer this over batch evaluation tools when you only need a single data point scored.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T07:09:24.624Z","isFirstParty":false}