Convert a document
convert_documentConvert a document from one format to another, for example Word to markdown, markdown to Word, or HTML to plain text. Supply the document as text, base64 or a public URL. Costs 1 credit.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"to_format": "<to_format>",
"from_format": "<from_format>"
},
"name": "convert_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public URL to download the document from (maximum 10 MB). | |
| text | No | The document itself, for text formats. Give exactly one of text, content_base64 or url. | |
| to_format | Yes | Format to produce. docx, odt and epub come back base64-encoded; the rest come back as text. | |
| from_format | Yes | Format of the input document. | |
| content_base64 | No | The document as base64, for binary formats such as docx, odt or epub. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||