# 1gateway Document to Markdown Converter

> 1gateway Document to Markdown Converter is a paid API for AI agents from 1gateway.dev, paid per call via x402, $0.0027/call, status unknown (last checked 2026-10-10).

Converts a web page, PDF, DOCX, or Korean HWP/HWPX file to clean Markdown by fetching a URL or accepting an uploaded file

## Facts

- Endpoint: GET https://1gateway.dev/v1/convert/markdown?utm_source=zero.xyz
- Price: $0.0027/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/1gateway-document-to-markdown-converter-81ae57df
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vseMuKhOHvT_sF2b9vRQz

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 1gateway-document-to-markdown-converter-81ae57df
```

Example prompt: Can you read this PDF and give me its full contents as clean markdown? Here's the URL: https://example.com/report.pdf

## When to prefer this

Choose this endpoint when you need to read a document (web page, PDF, DOCX, or Korean HWP/HWPX) as structured, clean Markdown in a single API call — especially when dealing with Korean Hancom HWP/HWPX files which very few services support. Prefer this over generic scraping tools when you need consistent Markdown output with preserved headings and tables, or when you need to process documents behind a URL without managing file downloads yourself.

## Known failure modes

- URL not reachable or returns non-200 status — conversion fails with an error
- File exceeds 10 MB limit — rejected before payment
- Content type mismatch when 'type' query param is specified — returns 415 not charged
- Unsupported file format — returns error indicating unsupported type
- Malformed or inaccessible URL — returns parsing error
- Password-protected or DRM-locked document — may produce empty or partial markdown
- Network timeout fetching the remote URL — returns timeout error

## How this service works

Use when an agent must read a document as clean Markdown: web page, PDF, DOCX or Korean HWP/HWPX, tables kept. Input: url (http/https) via GET, or POST a file (multipart 'file', raw body, or JSON contentBase64+filename). Over the per-format size cap → 413 before payment (see /openapi.json). Output: JSON markdown, title, pages, sourceType, bytes, warnings. Price by detected type: HTML $0.0027, PDF/DOCX $0.0045, HWP/HWPX $0.02. Example: ?url=https://example.com/

## Output

A JSON object containing: 'markdown' (the full converted document as a Markdown string with headings, paragraphs, and tables), 'title' (document title if detected), 'sourceType' (detected file type, e.g. html/pdf/docx/hwp), 'priceTier' (which pricing tier was applied), 'bytes' (original file size in bytes), 'chars' (character count of extracted markdown), 'pages' (page count for paginated formats), and 'warnings' (array of any issues encountered during conversion).

## 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": {
      "url": {
       "type": "string",
       "pattern": "^https?://",
       "examples": [
        "https://example.com/"
       ],
       "maxLength": 2048,
       "description": "Public http(s) URL of a web page, PDF, DOCX, HWP or HWPX within the per-format size caps (see 413 in /openapi.json). For uploads use POST instead."
      },
      "type": {
       "enum": [
        "html",
        "text",
        "pdf",
        "docx",
        "hwp",
        "hwpx"
       ],
       "type": "string",
       "examples": [
        "html"
       ],
       "description": "Optional expected type; a mismatch is rejected before payment (415, not charged)"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "markdown",
      "title",
      "sourceType",
      "priceTier",
      "bytes",
      "chars",
      "warnings"
     ],
     "properties": {
      "bytes": {
       "type": "integer"
      },
      "chars": {
       "type": "integer"
      },
      "pages": {
       "type": "integer"
      },
      "title": {
       "type": "string"
      },
      "markdown": {
       "type": "string"
      },
      "sections": {
       "type": "integer"
      },
      "warnings": {
       "type": "array",
       "items": {}
      },
      "priceTier": {
       "type": "string"
      },
      "sourceUrl": {
       "type": "string"
      },
      "sourceType": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/1gateway-document-to-markdown-converter-81ae57df/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 1gateway.dev](https://www.zero.xyz/host/1gateway.dev/llms.txt)
