Quickstart
Every call to MarkdownScribe needs an API key. This page takes you from an empty account to a first successful call, with curl, with the TypeScript SDK and with the command line.
Create an account
Section titled “Create an account”Sign up at the dashboard. New accounts start with free credits, enough to try every operation on this site many times over. No card is needed to sign up.
Create an API key
Section titled “Create an API key”In the dashboard, create a key and copy it. Keys start with mdsk_. Every call you make with it is charged to your account’s balance, and every key of the account shares the same balance. You can revoke a key at any time; a revoked key gets unauthorized on its next call.
Keep the key on the server
Section titled “Keep the key on the server”The key goes in the X-API-Key header of every request, so it must live where only your code can read it:
- in a terminal or a script, set the environment variable
MDSCRIBE_API_KEY; - in a hosted app, store it as a secret of your platform and call the API from a backend function, never from the browser or from a published client.
The SDK and the CLI read MDSCRIBE_API_KEY on their own. The CLI also reads a .env file in the current directory.
Make your first call
Section titled “Make your first call”The example below sends a small document to the frontmatter operation. The same request is shown three ways; pick the one that matches where your code runs.
curl https://api.markdownscribe.com/v1/md/frontmatter \ -H "X-API-Key: $MDSCRIBE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"markdown":"---\ntitle: Release notes\ndate: 2026-10-13\nstart: 12:30\ntags: [api, markdown]\n---\n\n# Release notes\n\nWhat changed this week.\n"}'TypeScript SDK
Section titled “TypeScript SDK”import { MarkdownScribeClient } from "@markdownscribe/sdk";
const client = new MarkdownScribeClient({ apiKey: process.env.MDSCRIBE_API_KEY! });const result = await client.frontmatter({ markdown: "---\ntitle: Release notes\ndate: 2026-10-13\nstart: 12:30\ntags: [api, markdown]\n---\n\n# Release notes\n\nWhat changed this week.\n",});Save the markdown value above as release-notes.md, then:
mdscribe frontmatter release-notes.mdResponse
Section titled “Response”Captured from the API on 2026-10-23.
{ "frontmatter": { "title": "Release notes", "date": "2026-10-13", "start": "12:30", "tags": [ "api", "markdown" ] }, "body": "\n# Release notes\n\nWhat changed this week.\n", "meta": { "request_id": "01M5MY6KH7WFYQC6RJFDTF6GNS", "duration_ms": 3, "credits": 1 }}To install the two packages: npm install @markdownscribe/sdk for TypeScript, npm install -g markdownscribe for the mdscribe command.
Read what it cost
Section titled “Read what it cost”Two response headers come with every successful call:
X-Credits-Charged: what this call cost. The same number is inmeta.creditsin the body.X-Credits-Remaining: the balance after this call. The SDK exposes it asmeta.creditsRemaining; the CLI printscredits charged: Non stderr after each run.
Error responses are not charged, and they carry no X-Credits-Remaining. When the balance runs out, calls return insufficient_credits with a link to pricing.
Where to go next
Section titled “Where to go next”- The six operations, each with a real request and response: URL to Markdown, Mermaid to SVG, Format, Lint, Table of contents and Frontmatter.
- Concepts: keys, credits, the error contract and the request id.
- Error codes: one page per code, with what to do.
- The full contract, as an OpenAPI document.