Skip to content

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.

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.

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.

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.

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.

Terminal window
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"}'
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:

Terminal window
mdscribe frontmatter release-notes.md

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.

Two response headers come with every successful call:

  • X-Credits-Charged: what this call cost. The same number is in meta.credits in the body.
  • X-Credits-Remaining: the balance after this call. The SDK exposes it as meta.creditsRemaining; the CLI prints credits charged: N on 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.