{"uid":"cap_0oJC8uagKPwo-Vfl6LwFt","slug":"api-x402node-dev-997d87dc","name":"Image Format Detector via Magic Bytes","description":"Detect image format from a URL using magic bytes (works even when extension or content-type lies). Returns format, content-type match flag, file size, dimensions. Use url param Built for AI agents validating untrusted image inputs. Accepts payment on Base or Solana — either network works.","url":"https://api.x402node.dev/image/detect","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":["url"],"properties":{"url":{"type":"string","description":"Target URL (required)"}}}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0oFptvTig7tiufi-Eckd-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Detects true image format from a URL using magic bytes analysis, returning format, content-type accuracy, file size, and dimensions — regardless of file extension or declared content-type.","exampleAgentPrompt":"Can you check what the real image format is for this URL — https://cdn.example.com/upload/photo.jpg — I don't trust that the extension or content-type is accurate and I need to know the actual format, whether it matches, the dimensions, and the file size.","exampleUseCases":null,"resultDescription":"Returns the true detected image format (e.g. PNG, JPEG, WEBP), a flag indicating whether the declared content-type matches the actual format, the file size in bytes, and the image dimensions (width x height). Derived from magic bytes, not extension or headers.","failureModes":["URL is unreachable or returns non-image content — returns error or null format","Image file is too large or download times out — returns timeout or size error","URL serves a format with ambiguous or unknown magic bytes — format may be returned as unknown","Malformed or missing URL parameter — returns 400-level validation error","Image host blocks the request or returns 403/404 — returns fetch error"],"whenToPreferThis":"Use this endpoint when you need to validate untrusted image inputs where the file extension or Content-Type header may be spoofed or incorrect — e.g. user-uploaded images, scraped media, or third-party CDN assets. Prefer this over client-side MIME sniffing or extension-based checks when accuracy and security matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T13:00:41.497Z","isFirstParty":false}