Cloudflare Workers AI toMarkdown API & SDK Generator

Generate ready-to-run keyless client code for POST https://markdown.codeap.com/api/convert or inspect the native Cloudflare Workers env.AI.toMarkdown() TypeScript binding.

Public Endpoint: POST /api/convert (Multipart Form-Data · Max 10 MB · 0-Neuron Formats)
Open Swagger UI (/swagger)
Interactive Swagger UI Raw OpenAPI JSON (/api/docs)

REST API Contract (POST /api/convert) & wrangler.jsonc Binding

The Worker exposes a free, keyless public conversion endpoint backed by Cloudflare Workers AI env.AI.toMarkdown(). Submit a multipart/form-data payload containing any 0-Neuron document (up to 10 MB) under the file field:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "data": "# Architecture Specification\n\nConverted Markdown content...",
  "name": "architecture-spec.pdf",
  "size": 248910,
  "mimetype": "application/pdf",
  "tokens": 1842
}

Response Format Negotiation & Guardrail Status Codes

Required wrangler.jsonc Configuration

{
  "name": "everything-to-markdown",
  "main": "src/index.ts",
  "compatibility_date": "2025-04-02",
  "ai": {
    "binding": "AI"
  }
}