{"uid":"cap_a6UVdTXMYQdq6pFLZYtq0","slug":"delx-unit-economics-cd2b092f","name":"Delx Unit Economics","description":"Calculate gross profit and margin from per-unit price and cost. Use it as a bounded preflight or analysis step inside an enterprise agent workflow before data, policy, integration, security, or commercial decisions reach production. Returns deterministic machine-readable JSON for $0.003 USDC via x402 on Base. Execution is first-party, local-only, stateless, memory-only, and has no paid upstream or input retention. Results are advisory; the caller remains responsible for authorization and produc…","url":"https://api.delx.ai/api/v1/x402/unit-economics","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"cost":{"type":"number","description":"Input field: cost."},"price":{"type":"number","description":"Input field: price."}}},"responseSchema":{"type":"json","example":{"cost":0.002,"price":0.01,"schema":"delx/util-unit-economics/v1","profitable":true,"gross_profit":0.008,"gross_margin_percent":80}},"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_D8J--8nGcmCd-13k8oObu","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":"Calculates gross profit and gross margin percentage from a per-unit selling price and cost, returning deterministic JSON results.","exampleAgentPrompt":"What's the gross profit and margin if I'm selling a product for $45 and it costs me $28 to produce?","exampleUseCases":[{"title":"Preflight pricing check before launch","prompt":"Before we finalize the pricing on our new widget, can you calculate the gross profit and margin if we sell it at $79.99 with a unit cost of $34.50?"},{"title":"Comparing margin across SKUs","prompt":"I want to know the gross margin on two SKUs — one priced at $120 with a cost of $60, and another priced at $95 with a cost of $55. Can you run the unit economics on both?"},{"title":"Validating margin threshold in agent workflow","prompt":"My agent needs to check whether our product margin is above 40% before approving an order — price is $150 and cost is $85. Can you compute the unit economics so we can decide?"}],"resultDescription":"Returns a deterministic JSON object containing gross profit (price minus cost) and gross margin percentage, derived purely from the provided price and cost inputs. No external calls or state changes occur; results are advisory and stateless.","failureModes":["Missing required fields: if price or cost is absent, the endpoint returns a validation error","Negative cost or price values may produce unexpected or invalid margin outputs","Cost greater than price returns a negative gross profit, indicating a loss — agent should handle this gracefully","Non-numeric inputs cause a schema validation error","Network or payment failures (x402 USDC authorization issues) may prevent execution"],"whenToPreferThis":"Choose this endpoint when you need a fast, deterministic, stateless computation of gross profit and margin as a bounded preflight or analysis step within an agent workflow — especially when no upstream API calls or data retention are acceptable. Prefer it over general-purpose calculators when you need structured machine-readable JSON output compatible with automated decision pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:01:46.172Z","isFirstParty":false}