# MIME Type Guesser from Filename

> MIME Type Guesser from Filename is a paid API for AI agents from x402-zoo.lolagent.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns the MIME type for a given filename by inspecting its extension, with an optional declared-type fallback if the extension is ambiguous or unrecognized.

## Facts

- Endpoint: GET https://x402-zoo.lolagent.workers.dev/api/mime-guess
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mime-type-guesser-from-filename-f967ce06
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AmPrYQYTkGg-c-Fd0NAfa

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 mime-type-guesser-from-filename-f967ce06
```

Example prompt: What MIME type should I use for a file called 'archive.tar.gz'? If you can't figure it out from the extension, fall back to 'application/octet-stream'.

## When to prefer this

Use this endpoint when you need a fast, lightweight MIME type lookup from a filename or extension without running file content analysis. Ideal for setting HTTP Content-Type headers, validating upload file types, or enriching file metadata pipelines. Prefer this over full file-sniffing tools when only the filename is available and a declared-type safety net is sufficient.

## Known failure modes

- Unrecognized or missing file extension with no declared_type fallback — may return a generic or empty type
- Ambiguous extensions that map to multiple MIME types — returns one best guess without disambiguation
- Malformed filename with no extension — may fail to infer any type
- Missing required filename query parameter — returns an error response

## How this service works

Guess MIME type from a filename extension with a declared-type fallback.

## Output

Returns the guessed MIME type string (e.g. 'video/mp4', 'application/pdf') inferred from the filename's extension. If the extension is unrecognized and a declared_type was provided, that fallback type is returned instead.

## 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",
     "required": [],
     "properties": {
      "filename": {
       "type": "string"
      },
      "declared_type": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mime-type-guesser-from-filename-f967ce06/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-zoo.lolagent.workers.dev](https://www.zero.xyz/host/x402-zoo.lolagent.workers.dev/llms.txt)
