{"uid":"cap_OHRzTkx0Y2FS-g1V6k_I_","slug":"fastx402-mime-type-from-file-extension-lookup-8adfa3e0","name":"FastX402 MIME Type from File Extension Lookup","description":"200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.","url":"https://fastx402.tools/mime-from-extension?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["filename"],"properties":{"filename":{"type":"string","description":"A file extension like \"pdf\" or a filename like \"report.PDF\""}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"extension":{"type":"string"},"mime_type":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"extension":"pdf","mime_type":"application/pdf"}},"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_7n6aqfAkCm6B1fRthyzcj","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":"Returns the canonical MIME type for a given file extension or filename","exampleAgentPrompt":"What MIME type should I use for a .pdf file? I need the canonical content-type string for setting HTTP headers.","exampleUseCases":[{"title":"Set correct HTTP content-type header","prompt":"I'm uploading a file called report.PDF to my server — what MIME type / Content-Type header should I send with it?"},{"title":"Validate file type before processing","prompt":"Before I process this incoming file with extension .docx, what is its MIME type so I can check it matches what we expect?"},{"title":"Build file format metadata table","prompt":"What is the official MIME type for an .mp4 file? I'm building a list of supported formats for our media upload API."}],"resultDescription":"A JSON object containing the normalized file extension (e.g. 'pdf') and its canonical MIME type string (e.g. 'application/pdf').","failureModes":["Unknown or unrecognized extension returns an error or null MIME type","Missing required 'filename' query parameter returns a 400 error","Payment failure via x402 protocol returns a 402 Payment Required response","Malformed input (empty string) may return an error response"],"whenToPreferThis":"Use this endpoint when you need a quick, pay-per-call MIME type lookup without setting up an API key or account. Ideal for AI agents that encounter file extensions at runtime and need to resolve content types dynamically. Prefer this over bundling a static MIME database when you want a lightweight, always-up-to-date lookup via HTTP.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-20T00:05:46.333Z","isFirstParty":false,"canonicalSlug":"fastx402-mime-type-from-file-extension-lookup-8adfa3e0"}