{"uid":"cap_ZAZkorHDfQGXs2vVa6nnG","slug":"format-openverbs-com-format-detection-e9202556","name":"format.openverbs.com – Format Detection","description":"Sniff which structured format an unknown document is. Because formats overlap, returns every plausible format with a 0–1 score plus the best guess — honest about ambiguity rather than pretending certainty.","url":"https://format.openverbs.com/v1/detect","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["data"],"properties":{"data":{"type":"string","maxLength":1000000,"minLength":1,"description":"The document whose format should be detected."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_TOvK_PbAloiHzqwgYvTz0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Detects and identifies the structured format(s) of an unknown document, returning a scored list of all plausible formats plus a best-guess winner.","exampleAgentPrompt":"I have a raw document and I'm not sure if it's YAML, TOML, or JSON — can you sniff its format and tell me every plausible match with a confidence score, plus the best guess?","exampleUseCases":[{"title":"Unknown config file identification","prompt":"I just received this config file from a vendor and I have no idea what format it's in — can you analyze it and tell me which format it most likely is, along with any other possibilities and their scores?"},{"title":"Pre-processing pipeline format routing","prompt":"Before I parse this incoming document, I need to know its format so I can route it to the right parser. Can you detect whether this data is JSON, YAML, TOML, or something else, with confidence scores for each?"},{"title":"Debugging ambiguous data blobs","prompt":"I'm getting data from a legacy system and it could be CSV, TSV, or even INI — can you sniff this string and give me your best guess along with all the plausible formats it might be?"}],"resultDescription":"Returns a list of all plausible detected formats, each with a 0–1 confidence score, plus a single best-guess format. Designed to surface ambiguity honestly rather than forcing a single answer when multiple formats are plausible.","failureModes":["Empty or too-short input string rejected (minLength:1 enforced)","Input exceeding 1,000,000 characters rejected","Completely unstructured or binary data may yield low confidence scores across all formats with no strong best guess","Payment failure via x402 protocol results in 402 response before detection runs"],"whenToPreferThis":"Use this endpoint when you receive an unknown document and need to determine its format before parsing or transcoding it — especially when formats could overlap (e.g. JSON vs JSON5 vs JSONC, or CSV vs TSV). Prefer this over guessing or hardcoding a parser when input provenance is unreliable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:34:21.388Z","isFirstParty":false}