API · x402

Detects the likely real file format from filename, file creation time, file size, and t…

Detects the likely real file format from filename, file creation time, file size, and the first 200 bytes of the file. Identifies common formats such as PDF, DOCX, XLSX, CSV, JPG/JPEG, PNG, WEBP, HEIC, TXT, HTML, MP3, WAV, MP4, AVI, MPEG, and WEBM, as well as…

by convert.guru · discovered, not yet claimed by its owner · updated 2026-10-11

Mirrored from Coinbase's public x402 Bazaar. The description is the provider's own text and has not been reviewed here; the payment requirements are copied as published.

What it does

Detects the likely real file format from filename, file creation time, file size, and the first 200 bytes of the file. Identifies common formats such as PDF, DOCX, XLSX, CSV, JPG/JPEG, PNG, WEBP, HEIC, TXT, HTML, MP3, WAV, MP4, AVI, MPEG, and WEBM, as well as about 15,000 other file types.

Tags: bazaar

Use with an agent

  1. Discover. Agents find this listing with GET https://bazaar.saylorinnovations.com/discovery/search?query=…, the MCP tool search_resources, or /discovery/resources.
  2. Inspect. Fetch /resources/24768.json for the price and payment options.
  3. Pay. Call GET https://convert.guru/api/x402/v1/detect-file-type. The provider answers 402 with its payment requirements. An x402 client signs one of the options below and retries with PAYMENT-SIGNATURE.
  4. Execute. The provider returns 200 with the data. Agent Bazaar is not in the request path and never sees your payment.

For humans

You don't need an account or an API key; you need a wallet holding a small amount of USDC on Base, Polygon, Arbitrum One, Solana, and an x402-capable client (see the examples below). Call the endpoint unpaid first to see exactly what it asks for.

Pricing & payment

Price
$0.002 / request
Protocol
x402 v2
Auth
No account or API key. Pay per request.
Networks
Base, Polygon, Arbitrum One, Solana
Calls (30d)
5 · 5 unique payers (third-party data from the public x402 Bazaar)

x402 payment requirements

SchemeNetworkAssetAmountPay toTimeout
exactBase
eip155:8453
USDC$0.0020x222c4F009c63E24cE9176C0f7f3b64E7Da0f0699300s
exactPolygon
eip155:137
USDC$0.0020x222c4F009c63E24cE9176C0f7f3b64E7Da0f0699300s
exactArbitrum One
eip155:42161
USDC$0.0020x222c4F009c63E24cE9176C0f7f3b64E7Da0f0699300s
exactSolana
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
USDC$0.0028BoQ6DSruSUc3HRgLWCwPmE7qcdDybcTeycmFDtC4UjJ300s
accepts[] (raw JSON)
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "payTo": "0x222c4F009c63E24cE9176C0f7f3b64E7Da0f0699",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "2000",
    "amountUsd": 0.002,
    "maxTimeoutSeconds": 300
  },
  {
    "scheme": "exact",
    "network": "eip155:137",
    "payTo": "0x222c4F009c63E24cE9176C0f7f3b64E7Da0f0699",
    "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
    "amount": "2000",
    "amountUsd": 0.002,
    "maxTimeoutSeconds": 300
  },
  {
    "scheme": "exact",
    "network": "eip155:42161",
    "payTo": "0x222c4F009c63E24cE9176C0f7f3b64E7Da0f0699",
    "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
    "amount": "2000",
    "amountUsd": 0.002,
    "maxTimeoutSeconds": 300
  },
  {
    "scheme": "exact",
    "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
    "payTo": "8BoQ6DSruSUc3HRgLWCwPmE7qcdDybcTeycmFDtC4UjJ",
    "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "amount": "2000",
    "amountUsd": 0.002,
    "maxTimeoutSeconds": 300
  }
]

Schemas

Output schema (JSON Schema)
{
  "bazaar": {
    "description": "Detects the likely real file format from filename, file creation time, file size, and the first 200 bytes of the file. Identifies common formats such as PDF, DOCX, XLSX, CSV, JPG/JPEG, PNG, WEBP, HEIC, TXT, HTML, MP3, WAV, MP4, AVI, MPEG, and WEBM, as well as about 15,000 other file types.",
    "info": {
      "input": {
        "body": {
          "created_at": "2026-05-21T14:30:00Z",
          "filename": "document.001",
          "header_first_200_bytes_base64": "JVBERi0xLjQKJcTl8uXrp...",
          "size_bytes": 184221
        },
        "bodyType": "json",
        "method": "POST",
        "type": "http"
      },
      "output": {
        "example": {
          "convert_file_compatibility": {
            "confidence": 0.8,
            "reason": "The header matches PDF, but only the first 200 bytes were inspected.",
            "status": "likely"
          },
          "convertible_to": [
            "docx",
            "txt",
            "png",
            "jpg",
            "html"
          ],
          "detected": true,
          "detected_format": {
            "canonical_extension": "pdf",
            "confidence": 0.99,
            "confidence_percent": 99,
            "description": "PDF document",
            "format": "pdf"
          },
          "input_filename": "document.001",
          "payment": {
            "amount": {
              "amount": "0.002000",
              "atomic_units": "2000",
              "currency": "USDC",
              "decimals": 6
            },
            "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
            "network": "eip155:8453",
            "payTo": "0x222c4F009c63E24cE9176C0f7f3b64E7Da0f0699",
            "protocol": "x402",
            "scheme": "exact",
            "settlement_status": "settled",
            "transaction_id": "0x...",
            "tx_hash": "0x..."
          },
          "suggested_filename": "document.pdf"
        },
        "type": "json"
      }
    },
    "schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "properties": {
        "input": {
          "properties": {
            "body": {
              "properties": {
                "created_at": {
                  "description": "File creation timestamp in ISO 8601 format",
                  "type": "string"
                },
                "filename": {
                  "description": "Original filename, e.g. document.pdf, report.docx, data.csv, image.png",
                  "type": "string"
                },
                "header_first_200_bytes_base64": {
                  "description": "Base64 encoded first 200 bytes of the file",
                  "type": "string"
                },
                "size_bytes": {
                  "description": "Total size of the file in bytes",
                  "type": "integer"
                }
              },
              "required": [
                "filename",
                "header_first_200_bytes_base64",
                "size_bytes"
              ],
              "type": "object"
            },
            "bodyType": {
              "const": "json",
              "type": "string"
            },
            "method": {
              "const": "POST",
              "type": "string"
            },
            "type": {
              "const": "http",
              "type": "string"
            }
          },
          "required": [
            "type",
            "method",
            "bodyType",
            "body"
          ],
          "type": "object"
        },
        "output": {
          "properties": {
            "example": {
              "properties": {
                "convert_file_compatibility": {
                  "properties": {
                    "confidence": {
                      "type": "number"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "confidence",
                    "reason"
                  ],
                  "type": "object"
                },
                "convertible_to": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "detected": {
                  "type": "boolean"
                },
                "detected_format": {
                  "properties": {
                    "canonical_extension": {
                      "type": "string"
                    },
                    "confidence": {
                      "type": "number"
                    },
                    "confidence_percent": {
                      "type": "integer"
                    },
                    "description": {
                      "type": "string"
                    },
                    "format": {
                      "description": "Canonical format e.g. pdf, docx, xlsx, csv, png, jpg, webp, txt, html",
                      "type": "string"
                    }
                  },
                  "required": [
                    "format",
                    "description",
                    "confidence",
                    "confidence_percent",
                    "canonical_extension"
                  ],
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "input_filename": {
                  "type": "string"
                },
                "payment": {
                  "type": "object"
                },
                "suggested_filename": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "detected",
                "input_filename",
                "suggested_filename",
                "detected_format",
                "convertible_to",
                "convert_file_compatibility",
                "payment"
              ],
              "type": "object"
            },
            "type": {
              "const": "json",
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        }
      },
      "required": [
        "input"
      ],
      "type": "object"
    }
  }
}
Example shape — generated from the schema, not a captured live response
null

Examples

curl
curl "https://convert.guru/api/x402/v1/detect-file-type"
# -> 402 Payment Required, accepts[] lists how to pay
# retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://convert.guru/api/x402/v1/detect-file-type");
if (res.status === 402) {
  const { accepts } = await res.json();
  // pay one of accepts[] via an x402 client, then retry with the payment header
}
Python
import httpx
res = httpx.get("https://convert.guru/api/x402/v1/detect-file-type")
if res.status_code == 402:
    accepts = res.json()["accepts"]
    # pay one of accepts[] via an x402 client, then retry with the payment header

Details

Provider
convert.guru
Endpoint
https://convert.guru/api/x402/v1/detect-file-type
Machine-readable
/resources/24768.json