DocumentationAPI Reference

Convert

Convert Markdown to plain text

Sign in to call the API here free (20 conversions a day), or enter an API key below.

POST
/convert/markdown/text

Accepted inputs: multipart file, text/texts, file/files (reference). Options: links, store, metadata.

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Query Parameters

wait?integer

Header Parameters

Idempotency-Key?string
Prefer?string

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Send exactly one input kind.

file?string

A file_… id from an earlier conversion.

files?array<string>

Several file_… ids.

links?string

Value in

  • "text-url"
  • "text"
metadata?

Your own data, returned unchanged.

store?boolean

Keep the result in the account library.

text?string

The content to convert.

texts?array<string>

Several contents, one source each.

upload?string

An upl_… id of a completed chunked upload.

uploads?array<string>

Several upl_… ids.

Response Body

application/json

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/convert/markdown/text" \  -H "Content-Type: application/json" \  -d '{    "text": "# Quarterly report\\n\\nRevenue grew **12%**."  }'
{  "async_reason": "respond_async",  "completed_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "files": [    {      "bytes": 0,      "content": "string",      "credits": 0,      "error": {        "detail": "string",        "error": "string",        "hint": "string",        "instance": "string",        "message": "string",        "request_id": "string",        "retryable": true,        "status": 0,        "title": "string",        "type": "string"      },      "format": "markdown",      "id": "string",      "links": {},      "mime": "string",      "name": "string",      "object": "file",      "outputs": [        {}      ],      "pages": 0,      "role": "source",      "status": "queued",      "variant": "standard"    }  ],  "files_next_cursor": "string",  "id": "string",  "links": {},  "metadata": null,  "name": "string",  "object": "conversion",  "operation": "parse",  "status": "queued",  "summary": {    "completed": 0,    "failed": 0,    "queued": 0,    "running": 0,    "sources": 0  },  "usage": {    "credits_charged": 0,    "credits_remaining": 0,    "credits_reserved": 0  }}

Errors