# EdgeDocAPI — LLM & AI Coding Agent Integration Guide > EdgeDocAPI (https://docopsapi.com) is a zero-retention, edge-hosted document and web-content preparation micro-API for AI & RAG pipelines. ## Base URLs - Production API: https://api.docopsapi.com - Developer Portal & Billing: https://docopsapi.com - OpenAPI 3.1 Schema: https://api.docopsapi.com/openapi.json ## Authentication Pass your API key (prefixed with `edk_live_`) via either header: - `Authorization: Bearer edk_live_your_key_here` - `X-API-Key: edk_live_your_key_here` Every response includes: - `X-RateLimit-Remaining` - `X-RateLimit-Reset` - `X-Quota-Used` - `X-Request-Id` ## Endpoints ### 1. GET /v1/health Public liveness & version check. Returns `{"status":"ok","service":"edge-doc-api","version":"2.0.0"}`. ### 2. POST /v1/url-to-markdown Converts a public `https://` URL or raw HTML string (max 2 MB) into clean, boilerplate-free, LLM-ready Markdown with estimated token count. - Request JSON: `{"url": "https://example.com/article"}` OR `{"html": "

Title

Body

", "include_links": true, "include_images": false}` - Response JSON: `{"source_url", "title", "markdown", "estimated_tokens", "word_count", "char_count"}` ### 3. POST /v1/rag-chunk Deterministically splits text, Markdown, or HTML into semantically bounded JSON chunks ready for vector databases. - Request JSON: `{"content": "# Intro\n\nText...", "format": "markdown", "max_tokens": 512, "overlap": 64, "source": {"url": "https://...", "document_id": "doc_1"}}` - Response JSON: `{"chunks": [{"index", "text", "token_estimate", "char_start", "char_end", "section_heading", "metadata"}], "total_chunks", "total_tokens_estimate", "max_tokens", "overlap", "input_format"}` ### 4. POST /v1/extract-metadata Fast structured extraction of OpenGraph, Twitter Cards, JSON-LD, canonical URL, headings, and outbound links from a public `https://` URL or raw HTML. - Request JSON: `{"url": "https://example.com"}` OR `{"html": "..."}` - Response JSON: `{"source_url", "title", "description", "canonical_url", "language", "open_graph", "twitter", "json_ld", "headings", "outbound_links"}` ## Security, Privacy & Honest Error Codes - Strictly zero-retention: payloads are processed in ephemeral memory and discarded immediately. - SSRF hardened: only public `https://` URLs allowed; private/loopback/metadata IPs and non-HTTPS schemes are blocked (HTTP 400/403). - Honest failure handling: unprocessable/empty inputs or unsupported content types return HTTP 422 and automatically refund the monthly quota credit. - Pricing tiers: Free (500 req/mo), Starter ($29/mo — 25,000 req/mo), Pro ($79/mo — 150,000 req/mo), Scale ($149/mo — 500,000 req/mo). - Legal: https://docopsapi.com/terms | https://docopsapi.com/privacy | https://docopsapi.com/aup