{"uid":"cap_9o5Vd-9TJwxqNj0KzfQYX","slug":"delx-content-type-sniff-29462764","name":"Delx Content Type Sniff","description":"Heuristic content-type sniff from sample bytes or filename — first-party local utility for agent preflight and proven micro-utils expansion. Returns deterministic machine-readable JSON for $0.001 USDC via x402 on Base. Execution is first-party, local-only, stateless, and memory-only with no paid upstream, no input retention, no web search, no live RPC, and no mediagen. Results are advisory; the caller owns authorization, budgets, and production controls. Sibling of Delx routes that already conv…","url":"https://api.delx.ai/api/v1/x402/content-type-sniff","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"sample":{"type":"string","description":"Input field: sample."},"filename":{"type":"string","description":"Input field: filename."}}},"responseSchema":{"type":"json","example":{"note":"local sniff only; not full MIME database","schema":"delx/util-content-type-sniff/v1","filename":"doc.pdf","confidence":"heuristic","content_type":"application/pdf","sample_bytes":13}},"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_18ExPl_abmelx6EovpSqq","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":"Heuristically detects the MIME content-type of data given a sample of bytes and/or a filename, returning a deterministic machine-readable JSON result.","exampleAgentPrompt":"Can you sniff the content type of a file with the name 'report.pdf' and these first few bytes: 'JVBERi0xLjQK'?","exampleUseCases":[{"title":"Preflight check before file upload","prompt":"Before I upload this file, can you figure out what content type it is? The filename is 'export.csv' and here's a sample of its bytes: 'aWQsbmFtZSxhZ2UK'."},{"title":"Validate attachment type in agent pipeline","prompt":"I need to validate what kind of file an email attachment is before passing it downstream — the filename is 'invoice_scan.unknown' and the first bytes are 'UEsDBBQABgAIAAAAIQ'."},{"title":"Identify mystery file format from raw bytes","prompt":"I have some raw bytes with no filename and I need to know what format they are — can you sniff the content type from this sample: 'iVBORw0KGgoAAAANSUhEUgAA'?"}],"resultDescription":"A deterministic JSON object indicating the detected MIME content-type (e.g. 'application/pdf', 'image/png', 'text/csv') inferred heuristically from the provided sample bytes and/or filename. Results are advisory and stateless.","failureModes":["Ambiguous input: if neither sample nor filename is provided, detection may return an unknown or generic type","Low-entropy sample: very short or binary-ambiguous byte samples may yield low-confidence or incorrect MIME types","Unsupported format: rare or proprietary file types may not be recognized and return a fallback type","Payment failure: x402 micropayment not accepted results in rejection before execution"],"whenToPreferThis":"Use this endpoint when an AI agent needs a fast, stateless, zero-retention preflight check on a file's content type before routing, processing, or validating it — especially when no external HTTP request or file system access is available. Prefer over HTTP HEAD requests or server-side probing when privacy matters (no data retention) or when operating in a sandboxed agent context. Best for lightweight pipelines where a $0.001 per-call cost is acceptable and deterministic local heuristics are sufficient.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T07:14:51.929Z","isFirstParty":false}