REST APIs & Remote MCP Servers for AI Agents

Structured JSON & MCP endpoints for document generation, spreadsheet queries, data hygiene, context compaction, and deliverability QA. Authenticate with a monthly Bearer API key or pay per request over HTTP 402 (x402).

agent-infra agent-infrastructure api-tooling business-intelligence business-ops context-compression context-engineering context-optimization crm-automation data-analytics data-extraction data-hygiene data-visualization developer-tools document-automation document-generation document-processing ecommerce email-deliverability email-ops logistics marketing-ops observability office-ooxml procurement-ops productivity reporting retail-ops revops scheduling security-compliance security-hygiene security-verification spreadsheets web-scraping webhook-testing

All 15 APIs & MCP Servers

CRM Cleanse & Dedupe API

crm-cleanse.apikeg.com

Normalize E.164 phones, standardize names and companies, and deduplicate up to 500 CRM contacts per call.

  • cleanse_contact_batch — $0.001 base (up to $0.01 max ($0.001 minimum + $0.002 per 100 records, capped at $0.01 for up to 500 records), x402 variable settlement): Normalizes emails, international E.164 phones, person names/honorifics, and company legal suffixes across 1-500 CRM records, returning merged canonical uniqueRecords and duplicateClusters.
  • compare_contact_pair — $0.0005 USD per contact pair comparison (x402 instant micropayment): Computes field-by-field normalized similarity across email, E.164 phone, name, company, and corporate domain, returning a match score and merge recommendation.

Check unmerged template tags, Gmail 102KB clipping, email-client CSS compatibility, and plain-text fallbacks before sending.

  • audit_email_template — $0.003 USD per email template preflight audit (x402 instant micropayment): Runs a pre-send deliverability, merge-tag, link-hygiene, Gmail 102KB clipping, and cross-client CSS compatibility audit (Outlook Windows, Gmail, Apple Mail Dark Mode) on an HTML email.
  • extract_plain_text_fallback — $0.001 USD per HTML-to-plain-text MIME fallback conversion (x402 instant micropayment): Converts an HTML email into a clean, RFC 5322-wrapped text/plain MIME companion, preserving CTA links inline as 'Label (https://...)' and stripping invisible ͏ / ‌ preheader padding hacks.

Domain & Email Deliverability Inspector

domain-deliverability.apikeg.com

Verify up to 100 email addresses per batch and audit domain MX, SPF, DMARC, DKIM, and BIMI records.

  • verify_email_batch — $0.001 base (up to $0.01 max $0.001 base + $0.0005 per unique domain checked (up to 100 emails, capped at $0.01), x402 variable settlement): Validates 1 to 100 email addresses for syntax, MX/Null-MX mail acceptance, mail provider, SPF/DMARC domain posture, disposable domains, role accounts, and free-webmail status.
  • audit_sender_domain — $0.002 USD per sender domain authentication audit (x402 instant micropayment): Performs a deep sender deliverability audit for a domain: MX & ESP provider fingerprinting, recursive RFC 7208 SPF tree evaluation (10-lookup cap, 2-void-lookup cap, cycle & multi-record permerror detection), DMARC policy & alignment, BIMI logo/VMC, and optional DKIM selector key checks, returning a 0-100 score, prioritized issues, and copy-paste DNS remediation records.

Create temporary public webhook URLs, inspect deliveries, verify HMAC signatures, and replay captured events.

  • create_inbox — Free ($0.00): Creates a temporary public webhook capture URL (/in/:inboxId) storing up to 100 events (up to 128 KiB each) until TTL expiration, with optional automatic HMAC signature verification.
  • inspect_inbox_events — $0.002 USD per inbox inspection query (x402 instant micropayment): Retrieves captured webhook deliveries from an inbox (headers, raw body, SHA-256 digest, parsed JSON, and cryptographic signature verification), supporting cursor pagination via sinceEventId and retroactive ad-hoc signature checks.
  • verify_webhook_signature — $0.001 USD per stateless signature verification (x402 instant micropayment): Verifies webhook HMAC-SHA256 signatures and replay timestamps across Stripe, GitHub, Shopify, Slack, Linear, or custom signature headers.
  • replay_event — $0.003 USD per SSRF-guarded webhook replay (x402 instant micropayment): Replays a captured webhook event (exact raw body, HTTP method, and signature headers) from an inbox to a public HTTP/HTTPS target URL protected by strict SSRF filtering, returning target status, latency, and response snippet.

CalendarICS Invite & Validation API

calendar-ics.apikeg.com

Generate compliant RFC 5545 .ics invites, timezone definitions, calendar links, and validate or repair .ics payloads.

  • generate_calendar_invite — $0.001 USD per generated .ics invite + deep-link bundle (x402 instant micropayment): Compiles a strict RFC 5545 / RFC 5546 .ics invite (PUBLISH, REQUEST with RSVP attendees, or CANCEL) with UTF-8 code-point-safe 75-octet CRLF folding, IANA VTIMEZONE blocks, and Google/Outlook/Yahoo/data-URI calendar links.
  • validate_ics_payload — $0.001 USD per .ics audit (with optional deterministic auto-repair) (x402 instant micropayment): Audits raw .ics text for RFC 5545 & iTIP defects (LF-only line breaks, >75-octet lines, missing VCALENDAR/VERSION/PRODID/UID/DTSTAMP/DTSTART, DTEND <= DTSTART, missing VTIMEZONE for TZID, METHOD:CANCEL without STATUS:CANCELLED, METHOD:REQUEST without ORGANIZER, unescaped commas/newlines) and optionally returns a deterministically repaired .ics string.

Populate .docx and .pptx templates with variables and table rows, or extract .docx, .pptx, and .xlsx documents to Markdown.

  • merge_office_template — $0.004 USD per Office template merge (.docx or .pptx) (x402 instant micropayment): Populates {{variable}} placeholders and {{#loop}}...{{/loop}} table rows across .docx and .pptx body text, headers, footers, and slides while preserving template styling, returning the merged Base64 document and any unmatchedPlaceholders.
  • extract_office_markdown — $0.002 USD per Office document extraction (.docx, .pptx, or .xlsx) (x402 instant micropayment): Auto-detects .docx, .pptx, or .xlsx from OOXML structure and converts headings, lists, Word/PowerPoint tables, numerically ordered slides, speaker notes, and sparse Excel worksheets into compact GitHub-Flavored Markdown with token-savings telemetry.

Compact WebVTT/SRT transcripts, .eml reply chains, Slack threads, and Jira JSON by 65-90% into structured Markdown.

  • compact_transcript — $0.001 base (up to $0.005 max ($0.001 base + $0.0005 per 50KB of input, capped at $0.005 for payloads up to 2MB), x402 variable settlement): Parses WebVTT (<v Speaker>, NOTE/STYLE blocks, cue UUIDs), SubRip (.srt), or Zoom/Teams/Otter text transcripts; deduplicates rolling live captions, coalesces speaker turns into Markdown, and computes speaker talk-turn stats.
  • compact_email_thread — $0.001 base (up to $0.005 max ($0.001 base + $0.0005 per 50KB of input, capped at $0.005 for payloads up to 2MB), x402 variable settlement): Decodes raw RFC 5322 .eml MIME messages (multipart/alternative, quoted-printable, base64) or pasted reply chains, strips O(N^2) repeated quoted history, mobile signatures, and legal disclaimers, and outputs chronological Markdown.
  • compact_workspace_export — $0.001 base (up to $0.005 max ($0.001 base + $0.0005 per 50KB of input, capped at $0.005 for payloads up to 2MB), x402 variable settlement): Compacts Slack channel/thread JSON (resolving <@U...> mentions, dropping join/leave noise, grouping thread_ts replies, formatting reactions, stripping Block Kit) or Jira v3 Issue/ADF JSON (rendering headings, tables, code blocks, lists, mentions, comments while dropping avatarUrls and null customfield_* keys).

Run SQL JOINs and window functions over CSV and JSON tables and export styled multi-tab .xlsx workbooks.

  • query_tabular_data — $0.002 base (up to $0.01 max $0.002 base + $0.001 per 1,000 total input rows (capped at $0.01), x402 variable settlement): Loads 1–10 named CSV/TSV or JSON row-array datasets, normalizes currency strings (e.g. '$1,250.50' -> 1250.5), executes read-only SQL (JOIN, GROUP BY, CTEs, window functions), and returns typed rows, Markdown preview, inferred schemas, and optional .xlsx export.
  • build_xlsx_workbook — $0.003 USD per multi-sheet .xlsx workbook generation (x402 instant micropayment): Compiles 1–20 structured JSON datasets into a genuine Office Open XML (.xlsx) workbook with bold shaded headers, frozen top rows, auto-sized columns, numeric formatting, formula-injection protection, and live Excel summary formulas (SUM, AVERAGE, MIN, MAX, COUNT).

PDF Forge & Layout Diagnostics API

pdf-forge.apikeg.com

Render Markdown or HTML into themed multi-page PDF documents with layout diagnostics, or inspect PDF metadata.

  • render_document_pdf — $0.004 USD per rendered PDF document (x402 instant micropayment): Compiles Markdown (headings, bold/italic/code, lists, GFM tables, callouts, '---pagebreak---') or HTML into both print-ready themed HTML and a spec-compliant multi-page PDF 1.7 binary with running headers, 'Page X of Y' footers, repeated table headers across page breaks, optional watermark, and deterministic layoutDiagnostics.
  • inspect_pdf_document — $0.001 USD per PDF binary inspection (x402 instant micropayment): Parses a Base64-encoded PDF binary to verify %PDF header/EOF integrity and extract pdfVersion, exact pageCount, byteLength, encryption status, AcroForm presence, and Info dictionary metadata.

Summarize .har network captures with automatic credential redaction and condense repetitive log streams by 95–99%.

  • distill_har_capture — $0.002 base (up to $0.008 max ($0.002 base + $0.001 per 250KB of .har input, capped at $0.008), x402 variable settlement): Parses Chrome DevTools / Playwright .har captures, strips static assets (.js/.css/fonts/images), analytics beacons, and OPTIONS preflights, scrubs credentials (Authorization, Cookie, Set-Cookie, X-Api-Key, token params, JWTs) into [REDACTED:<type>], groups dynamic :id/:uuid routes and polling loops, surfaces 4xx/5xx failures and slowestEndpoints, and infers compact TypeScript request/response schemas.
  • cluster_logs — $0.002 base (up to $0.008 max ($0.002 base + $0.001 per 2,000 log lines, capped at $0.008), x402 variable settlement): Groups multi-line stack traces and repetitive plain-text, Docker/Kubernetes, or NDJSON log lines into parameterized templates with occurrence counts and highlighted error clusters.

Extract minimal valid OpenAPI and GraphQL subgraphs with only the endpoints, operations, and types you need.

  • slice_openapi_spec — $0.001 USD per OpenAPI/Swagger subgraph slice (x402 instant micropayment): Selects OpenAPI/Swagger endpoints matching a natural-language query, operationIds, or pathPatterns, retains all transitively referenced component schemas, and returns a valid mini-spec plus optional curl and fetch examples.
  • slice_graphql_schema — $0.001 USD per GraphQL SDL subgraph slice (x402 instant micropayment): Parses GraphQL Schema Definition Language (`Query`, `Mutation`, `Subscription`, `type`, `input`, `interface`, `union`, `enum`, `scalar`), scores root fields against `query` or explicit `rootFields`, and emits a valid mini-SDL containing only selected root fields and the transitive closure of referenced types.

Executive SVG Chart & KPI Card API

chart-viz.apikeg.com

Render standalone SVG charts (waterfall, funnel, gantt, bar, line, area) and KPI sparkline cards from JSON.

  • render_chart — $0.002 USD per rendered executive SVG chart (x402 instant micropayment): Compiles structured business data into a crisp standalone SVG + base64 data URI across bar, stacked_bar, horizontal_bar, line, area, waterfall, funnel, and gantt chart types, returning a verified zero-overlap layoutReport.
  • render_kpi_card — $0.001 USD per executive KPI snapshot card (1-6 tiles) (x402 instant micropayment): Renders 1-6 executive KPI summary tiles with formatted headline values ($1.2M, 45.3%), semantic trend pills (+14.2% MoM), and inline SVG sparklines ready for Slack, Notion, Email, PDFs, or slide decks.

Document Redline & Table Diff API

doc-redline.apikeg.com

Compare document versions for text, numeric, and date edits with .docx Track Changes, or diff CSV and JSON tables by primary key.

  • diff_documents — $0.002 USD per document redline comparison (x402 instant micropayment): Compares two document versions at section, paragraph, and word level, returning sectionBreadcrumb-tagged hunks, CriticMarkup ({--old--}{++new++}), inline HTML (<del>/<ins>), numericAndDateChanges alerts, and optional .docx Track Changes.
  • diff_tables — $0.002 USD per structured table or catalog diff (x402 instant micropayment): Compares two JSON object arrays or RFC 4180 CSV strings keyed by a single or composite primaryKey, returning exact summary counts, added rows, removed rows, and cell-level modified diffs with exact decimal numericDelta.

DOM Harvest & Table Grid API

dom-harvest.apikeg.com

Extract HTML tables, repeating item grids, JSON-LD metadata, and CSS-selector schemas into clean typed JSON.

  • harvest_page_structures — $0.002 USD per HTML page structure harvest (x402 instant micropayment): Zero-selector structural HTML harvester: extracts canonical/OpenGraph/Twitter metadata, Schema.org JSON-LD, normalized 2D tables (resolving multi-header rowspan/colspan merges + cell links), and repeating sibling card collections across 100-500 items without truncation.
  • extract_by_schema — $0.001 USD per declarative CSS-schema extraction (x402 instant micropayment): Deterministic CSS-selector record extractor supporting descendant/child/attribute/group selectors, relative URL resolution against baseUrl, numeric currency/comma coercion, boolean flags, inner HTML serialization, and multi-value arrays.

Barcode, QR & Logistics Label Sheet API

barcode-pass.apikeg.com

Generate QR Codes, GS1-128, Code-128, EAN-13, and UPC-A barcodes (SVG + PNG) and printable Avery/Zebra label sheets.

  • generate_barcode — $0.001 USD per generated barcode or QR symbol (SVG + PNG) (x402 instant micropayment): Encodes a QR Code, Code-128, GS1-128, EAN-13, or UPC-A symbol, validating/computing GS1 check digits and returning vector SVG and base64 PNG.
  • generate_label_sheet — $0.002 base (up to $0.008 max ($0.002 base + $0.002 per 50 rendered labels, capped at $0.008 for up to 200 labels), x402 variable settlement): Batch-encodes up to 200 QR or 1D barcodes into print-ready @page HTML/SVG label sheets formatted for Avery 5160 (30-up US Letter), Zebra 4x6 shipping thermal, or Zebra 2x1 retail/bin tags.
  • validate_gtin_check_digit — $0.0005 USD per GTIN/SSCC validation request (up to 100 codes) (x402 instant micropayment): Validates or computes official GS1 Modulo-10 check digits for GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13), GTIN-14, GSIN-17, and SSCC-18 identifiers (single value or batch up to 100).

Need over 100,000 API calls per month? Contact us for enterprise pricing.

Frequently Asked Questions

How do clients and AI agents authenticate on API Keg?

Discovery endpoints (/llms.txt, /openapi.json, /.well-known/mcp.json, MCP tools/list, and ?dry_run=true) are free. Paid calls accept either inline HTTP 402 (x402 v2 USDC on Base) or an Authorization: Bearer ak_live_... key with a monthly plan from /account.

What request and response format do the REST and MCP endpoints use?

REST endpoints accept POST application/json payloads and return { ok: true, data: {...}, _meta: { requestId, durationMs, chargedUsd, dryRun } }. Remote MCP endpoints (/mcp) use standard Streamable HTTP JSON-RPC 2.0.

Are failed or invalid requests ever billed?

Never. Every endpoint validates JSON payloads against its input schema before execution and charges $0.00 on HTTP 4xx/5xx responses and ?dry_run=true preflight checks.