# agent402.tools MIME Type Lookup

> agent402.tools MIME Type Lookup is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Look up a MIME type by file extension or find file extensions for a given MIME type, covering ~50 common types.

## Facts

- Endpoint: GET https://agent402.tools/api/mime
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-mime-type-lookup-1277cdf5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NQjFXYN7ysjIZ5VqHUbhN

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 agent402-tools-mime-type-lookup-1277cdf5
```

Example prompt: What's the MIME type for a .png file? Also, if I have the type image/jpeg, what file extensions go with it?

## When to prefer this

Use this endpoint when an agent needs to resolve a file extension to its canonical MIME/content-type string (e.g. to set HTTP Content-Type headers) or reverse-lookup which file extensions correspond to a given MIME type. Best suited for common file types; not appropriate for obscure or proprietary formats.

## Known failure modes

- Unknown or unsupported extension/MIME type returns an empty result or 404
- Neither ext nor type query param provided results in an error response
- Malformed MIME type string may return no match
- Extension not in the ~50 supported types returns no result

## How this service works

Look up a MIME type by file extension (?ext=png) or extensions by MIME type (?type=image/png). Covers ~50 common types.

## Output

Returns the MIME type string for a given file extension (e.g. 'image/png' for 'png'), or a list of file extensions associated with a given MIME type (e.g. ['.jpg', '.jpeg'] for 'image/jpeg'). Covers approximately 50 common file types.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "ext": "pdf"
  }
 }
}
```

## 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": {
      "ext": {
       "type": "string",
       "description": "File extension (with or without dot)"
      },
      "type": {
       "type": "string",
       "description": "MIME type to reverse-lookup"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "ext",
      "mime"
     ],
     "properties": {
      "ext": {
       "type": "string"
      },
      "mime": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ext": "webp",
  "mime": "image/webp"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-mime-type-lookup-1277cdf5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
