Convert HTML, Markdown, and JSON
POST /v1/convert runs the same conversion engine the editor uses on the client, server-side, so a backend job or an integration with no browser can produce byte-for-byte the same output. Every successful conversion is metered against your plan's monthly allowance.
Request
Authenticate with an API key or a session token as a bearer token.from and to each accept html, markdown, or json; they default to html and markdown respectively.
curl -X POST https://cloud.richtexteditor.com/v1/convert -H "Authorization: Bearer $RTE_KEY" -H "Content-Type: application/json" -d '{ "from": "markdown", "to": "html", "content": "# Release notes" }'
# 200 OK
{
"from": "markdown",
"to": "html",
"result": "<h1>Release notes</h1>",
"monthlyConversionsUsed": 41,
"monthlyConversionsLimit": 10000
}result is a string when converting to html or markdown, and a JSON value when converting to json. The two counter fields are returned on every call, so you can show remaining allowance without a second request to /v1/account.
Metering
Only successful conversions increment the counter — a rejected format, an authentication failure, or an engine error costs nothing. The counter resets at the start of each UTC calendar month. Exceeding the allowance returns 402 rather than silently truncating or queueing.
| Plan | Conversions / month |
|---|---|
| Free | 200 |
| Start | 10,000 |
| Team | 100,000 |
| Business | 2,000,000 |
Status codes
| Code | When |
|---|---|
| 200 | Converted; the counter has been incremented |
| 400 | from/to is not one of html|markdown|json, or the engine rejected the input |
| 401 | Missing or invalid credential |
| 402 | This month's conversion allowance is used up |
| 502 | The conversion engine returned an unusable response |
| 503 | The conversion engine is unreachable or timed out (20s) |
502 and 503 are distinct on purpose. 503 means the engine never answered, so the request is safe to retry; 502 means it answered with something we could not use, and a retry will usually fail the same way.
When not to use this
If the content is already open in the editor, convert on the client — it is instant, unmetered, and the document never leaves the browser. This endpoint exists for the cases the client cannot cover: server-side jobs, scheduled exports, and integrations without a browser.
See the full API reference or create a free account →