# Delx Content Type Sniff

> Delx Content Type Sniff is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Heuristically detects the MIME content-type of data given a sample of bytes and/or a filename, returning a deterministic machine-readable JSON result.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/content-type-sniff
- 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/delx-content-type-sniff-29462764
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9o5Vd-9TJwxqNj0KzfQYX

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 delx-content-type-sniff-29462764 -d '<json body>'
```

Example prompt: Can you sniff the content type of a file with the name 'report.pdf' and these first few bytes: 'JVBERi0xLjQK'?

## When to prefer this

Use this endpoint when an AI agent needs a fast, stateless, zero-retention preflight check on a file's content type before routing, processing, or validating it — especially when no external HTTP request or file system access is available. Prefer over HTTP HEAD requests or server-side probing when privacy matters (no data retention) or when operating in a sandboxed agent context. Best for lightweight pipelines where a $0.001 per-call cost is acceptable and deterministic local heuristics are sufficient.

## Known failure modes

- Ambiguous input: if neither sample nor filename is provided, detection may return an unknown or generic type
- Low-entropy sample: very short or binary-ambiguous byte samples may yield low-confidence or incorrect MIME types
- Unsupported format: rare or proprietary file types may not be recognized and return a fallback type
- Payment failure: x402 micropayment not accepted results in rejection before execution

## How this service works

Heuristic content-type sniff from sample bytes or filename — first-party local utility for agent preflight and proven micro-utils expansion. Returns deterministic machine-readable JSON for $0.001 USDC via x402 on Base. Execution is first-party, local-only, stateless, and memory-only with no paid upstream, no input retention, no web search, no live RPC, and no mediagen. Results are advisory; the caller owns authorization, budgets, and production controls. Sibling of Delx routes that already conv…

## Output

A deterministic JSON object indicating the detected MIME content-type (e.g. 'application/pdf', 'image/png', 'text/csv') inferred heuristically from the provided sample bytes and/or filename. Results are advisory and stateless.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "sample": {
   "type": "string",
   "description": "Input field: sample."
  },
  "filename": {
   "type": "string",
   "description": "Input field: filename."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "local sniff only; not full MIME database",
  "schema": "delx/util-content-type-sniff/v1",
  "filename": "doc.pdf",
  "confidence": "heuristic",
  "content_type": "application/pdf",
  "sample_bytes": 13
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-content-type-sniff-29462764/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
