{"uid":"cap_3lXY6b6J0503lrUUbKXlJ","slug":"delx-ext-from-mime-c88742ee","name":"Delx Ext From MIME","description":"Guess extension from MIME type. Call when you name agent-generated files from content-type. Returns ext, mime, known for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.","url":"https://api.delx.ai/api/v1/x402/ext-from-mime","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"mime":{"type":"string","description":"Input field: mime."}}},"responseSchema":{"type":"json","example":{"ext":"png","mime":"image/png","known":true,"schema":"delx/util-ext-from-mime/v1"}},"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_qH_G4xzmG_WuG9xCAv4uk","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 file extension for a given MIME type using a local, first-party JSON lookup.","exampleAgentPrompt":"I just got a file back with content-type 'image/webp' and need to know what file extension to save it with — can you look that up?","exampleUseCases":[{"title":"Naming agent-generated download files","prompt":"I'm saving a file that came back with content-type 'application/vnd.ms-excel' — what file extension should I use when I write it to disk?"},{"title":"Validating upload extension matches MIME","prompt":"A user uploaded a file claiming it's a PNG but the server detected MIME type 'image/gif' — what extension should that actually have?"},{"title":"Labeling AI-generated media output","prompt":"My agent just produced an audio clip and the content-type is 'audio/ogg' — what file extension do I attach to it before sending it to the user?"}],"resultDescription":"Returns a JSON object containing the resolved file extension (ext), the canonical MIME type (mime), and a boolean (known) indicating whether the MIME type was recognized in the local lookup table.","failureModes":["Unrecognized MIME type returns known: false with a best-guess or null extension","Malformed or missing mime field returns a validation error","Payment failure via x402 prevents the call from executing"],"whenToPreferThis":"Use this endpoint when an AI agent needs to programmatically determine the correct file extension from a MIME/content-type string — especially when saving, naming, or routing agent-generated or downloaded files. Prefer it over regex guessing or hardcoded maps because it uses a maintained, first-party local JSON source with a known flag to signal confidence. It requires no external network calls, no API keys, and has no data retention, making it safe for pipeline use.","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}