# URL File Type Detector

> URL File Type Detector is a paid API for AI agents from intel.rallylive.ca, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Detects the true MIME type of a file at a URL by reading magic bytes, then flags mismatches against the declared Content-Type header and URL extension

## Facts

- Endpoint: GET https://intel.rallylive.ca/dev/file-type
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/url-file-type-detector-47b3dd25
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jeaGWKLz6rFXGLSZ4NwP3

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 url-file-type-detector-47b3dd25
```

Example prompt: Can you check what type of file is actually at this URL — https://example.com/download/report.pdf — and tell me if the real file type matches the Content-Type header and the .pdf extension?

## When to prefer this

Choose this endpoint when you need to verify the true binary type of a file at a remote URL without downloading the whole file, especially when you suspect MIME type spoofing, mismatched extensions, or want to validate a file before passing it to a downstream processor. It is distinct from content-analysis endpoints because it uses low-level magic byte inspection rather than parsing or rendering the file.

## Known failure modes

- URL is unreachable or returns a non-200 status — detection fails with an error
- File requires authentication and returns 401/403 — no bytes can be read
- Server does not return any Content-Type header — comparison is partial
- File is smaller than the magic byte signature region — detection may be inconclusive
- Unknown file format not among 40+ supported signatures — type reported as unknown

## How this service works

Detects the real type of a file at a URL from its magic bytes (40+ signatures: images, audio, video, archives, PDF, Office, executables, fonts, WASM, SQLite, text/JSON/HTML) and compares with the declared Content-Type and the URL extension, flagging mismatches. Also returns size, content-disposition and whether the server supports ranges. Reads only the first 64 KB. $0.01 per file.

## Output

Returns the detected MIME type inferred from magic bytes (covering 40+ signatures including images, audio, video, archives, PDF, Office, executables, fonts, WASM, SQLite, and text formats), the declared Content-Type from the server, the file extension from the URL, any mismatch flags between those three, the file size, the content-disposition header, and whether the server supports byte-range requests. Only the first 64 KB of the file is fetched.

## Request schema (JSON Schema)

```json
{
 "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",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/url-file-type-detector-47b3dd25/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from intel.rallylive.ca](https://www.zero.xyz/host/intel.rallylive.ca/llms.txt)
