{
  "x402Version": 2,
  "id": 27260,
  "slug": "27260",
  "resource": "https://convert.guru/api/x402/v1/detect-file-type",
  "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.",
  "type": "http",
  "serviceName": "Convert Guru File Type Detection",
  "resourceType": "Payments",
  "accepts": [
    {
      "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
    }
  ],
  "outputSchema": {
    "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"
  },
  "extensions": {
    "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"
      }
    }
  },
  "tags": [
    "file-type-detection",
    "detect-file-type",
    "mime-type",
    "file-identification",
    "magic-bytes",
    "bazaar"
  ],
  "sourceHost": "convert.guru",
  "lastUpdated": "2026-10-12T21:36:06.95Z",
  "quality": {
    "calls30d": 7,
    "uniquePayers30d": 6,
    "lastCalledAt": "2026-10-12T21:36:05.335Z"
  },
  "metadata": {
    "serviceName": "Convert Guru File Type Detection",
    "extensions": {
      "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"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "convert.guru",
    "manifest_name": "convert.guru",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {
      "convert_file_compatibility": {
        "confidence": 0,
        "reason": "string",
        "status": "string"
      },
      "convertible_to": [
        "string"
      ],
      "detected": true,
      "detected_format": {
        "canonical_extension": "string",
        "confidence": 0,
        "confidence_percent": 0,
        "description": "string",
        "format": "string"
      },
      "input_filename": "string",
      "payment": {},
      "suggested_filename": "string"
    },
    "type": "string"
  }
}