{"uid":"cap_Ra01dC1HFYftJqeU4x4JF","slug":"delx-commerce-token-estimate-api-73e1b8ba","name":"Delx Commerce Token Estimate API","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/token-estimate?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input","output"],"properties":{"input":{"type":"object","required":["type","bodyType","body"],"properties":{"body":{"type":"object","additionalProperties":true},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type","example"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","additionalProperties":true}}}}},"responseSchema":{"type":"json","example":{}},"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_AoFN-nY_Si1oNGQJb6f8Q","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":"Estimates the token cost for a given HTTP request/response pair before executing a pay-per-result API call via x402","exampleAgentPrompt":"Before I actually pay for this Delx Commerce API call, can you estimate how many tokens it will use? The input is a JSON POST body with fields like {\"query\": \"latest BTC price\"} and the expected output example is {\"price\": 12345}.","exampleUseCases":[{"title":"Pre-flight cost check for agent task","prompt":"I want to know the token cost estimate before sending this JSON request body to a Delx pay-per-result API — the input body is {\"symbol\": \"ETH\", \"interval\": \"1h\"} and the output example looks like {\"price\": 0, \"volume\": 0}."},{"title":"Budget planning for autonomous agent loop","prompt":"My agent is going to make hundreds of calls to a Delx Commerce endpoint in a loop — can you estimate the token cost per call given a form-data input body like {\"text\": \"summarize this article\"} and an expected JSON output like {\"summary\": \"...\"}?"},{"title":"Comparing token cost across request formats","prompt":"Can you estimate how many tokens a Delx Commerce x402 API call would use if I send a text-type body saying 'translate this sentence to French' and expect a JSON response like {\"translation\": \"...\"}?"}],"resultDescription":"Returns a JSON object containing the estimated token count for the described HTTP request/response pair, enabling the caller to anticipate cost in USDC before actually executing and paying for the call via x402.","failureModes":["Missing required 'input' or 'output' fields returns a 400 validation error","Invalid bodyType enum value (not 'json', 'form-data', or 'text') causes schema rejection","Empty or malformed body object may yield inaccurate or zero token estimates","Network timeout if the estimation service is temporarily unavailable","Invalid input type (not 'http') returns a constraint violation error"],"whenToPreferThis":"Use this endpoint when you need to preview or budget the token cost of a Delx Commerce pay-per-result API call before actually executing it and paying. Ideal for autonomous agents that need cost-awareness before committing USDC via x402, or for developers testing and optimizing request payloads to minimize per-call expense.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:45.385Z","isFirstParty":false,"canonicalSlug":"delx-commerce-token-estimate-api-73e1b8ba"}