WritersLogic Verifiable AI Agent Hub Doc To Markdown API
The Doc To Markdown API from WritersLogic Verifiable AI Agent Hub — 1 operation(s) for doc to markdown.
The Doc To Markdown API from WritersLogic Verifiable AI Agent Hub — 1 operation(s) for doc to markdown.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/writerslogic-com:writerslogic-com-doc-to-markdown-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: WritersLogic Verifiable AI Agent Hub Doc To Markdown API
version: 2.0.0
description: Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.
contact:
name: WritersLogic
url: https://writerslogic.com/agents
email: agents@writerslogic.com
servers:
- url: https://agents.writerslogic.com
tags:
- name: Doc To Markdown
paths:
/api/v1/doc-to-markdown:
post:
operationId: doc_to_markdown
summary: Document to Markdown with per-page hashes and offsets
description: 'Converts a PDF (text layer), DOCX, XLSX or PPTX file, or normalizes an HTML, Markdown, text, CSV or JSON file, into Markdown (or plain text) for an agent that must read or cite a document. Give an https URL or up to 4 MB as base64. Returns the content plus one unit per page, sheet or slide with its exact character range in the content and a SHA-256 of that unit''s text, so later quote and citation checks can anchor to a page. Headings, lists, tables and links are kept for DOCX; sheets become tables; slides become sections. Set describe to also get a suggested descriptive file name, tags and a one-line summary (a fast model reads the first 6,000 characters; its quotes are checked against the text). It does NOT run OCR: scanned PDF pages are flagged needs_ocr and come back empty. Images, comments, notes, headers and footers are ignored, legacy .doc/.xls/.ppt and password-protected files are refused, and ZIP64 is unsupported.
Price: 0.01 USDC on Base (x402).'
x-x402-price-usdc: '0.01'
x-x402-amount: '10000'
x-payment-info:
protocols:
- x402
price:
mode: fixed
currency: USD
amount: '0.01'
x-audience: developer
x-sample-url: https://agents.writerslogic.com/api/v1/samples/doc-to-markdown
security:
- x402: []
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
url:
type: string
minLength: 1
maxLength: 2048
description: https URL of the document. Provide this or content_base64.
content_base64:
type: string
minLength: 1
maxLength: 5592408
description: Standard padded base64 of the file, at most 4 MB decoded. Provide this or url.
filename:
type: string
minLength: 1
maxLength: 255
description: Original file name; helps format detection and is kept as the extension of the suggested name.
format:
type: string
enum:
- markdown
- text
description: markdown (default) or text (Markdown syntax removed).
pages:
type: string
maxLength: 1000
description: 'Page, sheet or slide selection such as "1-5,8", at most 200 pages. Default: the first 200.'
max_chars:
type: integer
minimum: 1000
maximum: 400000
description: Output cap in characters, cut at a unit boundary. Default 120000.
describe:
type: boolean
description: Also suggest a file name, tags and a summary with a language model. Default false.
example:
url: https://www.irs.gov/pub/irs-pdf/fw9.pdf
pages: 1-2
max_chars: 20000
describe: true
responses:
'200':
description: Paid result with provenance
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
source:
type: object
description: kind (url|inline), final url, filename, detected media_type, bytes and sha256 of the input file.
document_kind:
type: string
enum:
- pdf
- docx
- xlsx
- pptx
- html
- markdown
- text
- csv
- json
format:
type: string
enum:
- markdown
- text
content:
type: string
description: The converted document; units are joined by a blank line.
units:
type: array
items:
type: object
description: index (page/sheet/slide number), label, char_start, char_end (content.slice(char_start, char_end) is the unit), sha256 of that text, needs_ocr, truncated.
unit_count:
type: integer
description: Units returned.
units_total:
type: integer
description: Units in the document.
metadata:
anyOf:
- type: object
description: title, author, created, modified, page_count; null when absent.
- type: 'null'
tables_count:
type: integer
truncated:
type: boolean
description: True when max_chars, a page cap, a row cap or the time budget left content out.
notes:
type: array
items:
type: string
deterministic:
type: boolean
description: True when no model was used for this result.
describe:
type: object
description: 'With describe=true: suggested_filename, doc_type, tags, summary and evidence_quotes verified to appear in the content; null otherwise or when the model is unavailable.'
llm:
type: object
description: status (ok|skipped|unavailable), provider and model when ok, reason when unavailable.
limits:
type: object
description: max_bytes, max_chars, offsets convention and what is not covered.
_provenance:
type: object
description: C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance
required:
- data
- _provenance
'400':
description: Invalid request (no payment consumed)
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
'401':
description: Invalid X-API-KEY
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
'402':
description: Payment required or invalid
content:
application/json:
schema:
type: object
description: x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)
properties:
x402Version:
type: integer
error:
type: string
code:
type: string
resource:
type: object
accepts:
type: array
items:
type: object
extensions:
type: object
'502':
description: Upstream failure; the payment is released or not settled
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
tags:
- Doc To Markdown
components:
securitySchemes:
x402:
type: apiKey
in: header
name: PAYMENT-SIGNATURE
description: x402 v2 payment payload (base64) sent after a 402 challenge
apiKey:
type: apiKey
in: header
name: X-API-KEY