# Convert.Guru File Type Detection

> Convert.Guru File Type Detection is a paid API for AI agents from convert.guru, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Detects the file type of an uploaded file and returns format info, confidence score, and a list of compatible conversion targets

## Facts

- Endpoint: POST https://convert.guru/api/x402/v1/detect-file-type
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/convert-guru-file-type-detection-dc7a399e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GzKxLqVXXXH39Cx361mG_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability convert-guru-file-type-detection-dc7a399e -d '<json body>'
```

Example prompt: I have a file called 'document.001' and I'm not sure what format it actually is — can you detect its file type and tell me what formats it can be converted to?

## When to prefer this

Use this endpoint when you need to identify an unknown file's format before attempting conversion, validate that a file matches its claimed extension, or determine which output formats are available for a given input file. Prefer this over guessing by file extension alone, especially for files with non-standard or missing extensions.

## Known failure modes

- File bytes missing or malformed — detection fails with no format match
- File header too short (only first 200 bytes inspected) — may return 'likely' rather than confirmed status
- Unknown or unsupported file format — detected=false with empty convertible_to list
- Payment not settled — x402 payment required before result is returned
- File is corrupted or truncated — low confidence score returned

## How this service works

File type detection

## Output

Returns a JSON object with: whether the file was detected successfully, the detected format (e.g. 'pdf'), a confidence score (0-1 and percent), a human-readable format description, the canonical file extension, a suggested renamed filename, a list of formats the file can be converted to, and a compatibility status (with reason and confidence) indicating how reliably the file can be converted.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "filename": {
   "type": "string",
   "description": "Original filename, e.g. document.pdf, report.docx, data.csv, image.png"
  },
  "created_at": {
   "type": "string",
   "description": "File creation timestamp in ISO 8601 format"
  },
  "size_bytes": {
   "type": "integer",
   "description": "Total size of the file in bytes"
  },
  "header_first_200_bytes_base64": {
   "type": "string",
   "description": "Base64 encoded first 200 bytes of the file"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "payment": {
   "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
   "payTo": "0x222c4F009c63E24cE9176C0f7f3b64E7Da0f0699",
   "amount": {
    "amount": "0.002000",
    "currency": "USDC",
    "decimals": 6,
    "atomic_units": "2000"
   },
   "scheme": "exact",
   "network": "eip155:8453",
   "tx_hash": "0x...",
   "protocol": "x402",
   "transaction_id": "0x...",
   "settlement_status": "settled"
  },
  "detected": true,
  "convertible_to": [
   "docx",
   "txt",
   "png",
   "jpg",
   "html"
  ],
  "input_filename": "document.001",
  "detected_format": {
   "format": "pdf",
   "confidence": 0.99,
   "description": "PDF document",
   "confidence_percent": 99,
   "canonical_extension": "pdf"
  },
  "suggested_filename": "document.pdf",
  "convert_file_compatibility": {
   "reason": "The header matches PDF, but only the first 200 bytes were inspected.",
   "status": "likely",
   "confidence": 0.8
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/convert-guru-file-type-detection-dc7a399e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from convert.guru](https://www.zero.xyz/host/convert.guru/llms.txt)
