Attest tools · file_convert

File converter

a task has a file in one format and needs it in another: a Word document (.docx) to HTML, Markdown or plain text; HTML to Markdown or plain text; Markdown to HTML; CSV to JSON; JSON to CSV; or CSV and TSV either way.

1 credit per successful callPOST /api/v1/files/convert

Bearer key · JSON

POST /api/v1/files/convert

curl -s -X POST https://getattest.com.au/api/v1/files/convert \
  -H "authorization: Bearer $ATTEST_API_KEY" \
  -H "content-type: application/json" \
  -d '{"from":"markdown","to":"html","text":"# Attest\n\nOne key, one balance.\n"}'

Send the key as a bearer token in the authorization header. One key and one credit balance cover every service, including Attest Capture. A failed call is refunded automatically. No key yet? POST /api/v1/keys issues one with 25 free credits and no signup — see the key guide.

Captured 2026-09-21

Example

This request was run against the running service on 2026-09-21 and the response below is what came back, unedited.

Request JSON

{
  "from": "markdown",
  "to": "html",
  "text": "# Attest\n\nOne key, one balance.\n"
}

Captured response JSON

{
  "call_id": "b1a48204-0f6e-492d-befe-92bcad8e4633",
  "from": "markdown",
  "to": "html",
  "input_source": "text",
  "input_encoding": "utf-8",
  "bytes_in": 32,
  "bytes_out": 44,
  "response_bytes": 47,
  "result_text": "<h1>Attest</h1>\n<p>One key, one balance.</p>",
  "truncated": false,
  "stats": {},
  "warnings": [],
  "limits": {
    "max_input_bytes": 6291456,
    "max_base64_characters": 8388608,
    "max_output_bytes": 3145728,
    "max_response_bytes": 3670016,
    "max_rows": 200000,
    "max_columns": 2000,
    "max_inline_image_bytes": 65536
  },
  "supported_pairs": [
    "docx -> html",
    "docx -> markdown",
    "docx -> text",
    "html -> markdown",
    "html -> text",
    "markdown -> html",
    "csv -> json",
    "csv -> tsv",
    "json -> csv",
    "tsv -> csv"
  ],
  "source": "Converted in this process from the bytes supplied with the request. Formatting that has no equivalent in the target format (page layout, fonts, colours, comments, tracked changes) is dropped, so the output is a working copy of the content, not a reproduction of the original document. General information, not advice.",
  "checked_at": "2026-09-20T16:55:57.504Z",
  "credits_charged": 1,
  "credits_remaining": 9991
}

For agents

Use when

Use this when a task has a file in one format and needs it in another: a Word document (.docx) to HTML, Markdown or plain text; HTML to Markdown or plain text; Markdown to HTML; CSV to JSON; JSON to CSV; or CSV and TSV either way. Send the file as a URL or base64, or paste the text. Input is capped at 6 MB, or 1 MB when the target is Markdown, and nothing is stored.

5 fields

Input

Scroll the table horizontally to see all fields.

Field / Type / Required / What it does
FieldTypeRequiredWhat it does
fromstringRequiredThe input format: docx, html, markdown, csv, json or tsv.
tostringRequiredThe output format. Supported pairs are returned on every response and on an unsupported_conversion error.
textstringOptionalThe document as text. Not accepted for docx, which is binary.
urlstringOptionalA public http(s) URL to read the document from.
file_base64stringOptionalThe document as base64. Exactly one of text, url or file_base64.

HTTP 200

Response

Every successful response also carries call_id (your receipt for the charge), credits_charged and credits_remaining.

Scroll the table horizontally to see all fields.

Field / What it holds
FieldWhat it holds
result_textThe converted document.
fromThe input format.
toThe output format.
input_sourceWhich of text, url or file_base64 was used.
input_encodingThe character encoding the input was read as.
bytes_inBytes read.
bytes_outBytes produced.
truncatedWhether the output was cut at a cap.
statsCounts from the conversion, such as rows and columns for tabular formats.
warningsWhat was dropped or changed in the conversion.
limitsThe caps that applied to this conversion.
supported_pairsEvery from -> to pair this service converts.

Machine-readable failures

Errors

Errors return JSON such as {"error":"invalid_api_key"}. A failed call is refunded automatically.

Scroll the table horizontally to see all fields.

Code / Status / Meaning
CodeStatusMeaning
unsupported_conversion400This from/to pair is not converted; the response lists every pair that is.
input_required400None of text, url or file_base64 was sent.
too_many_inputs400More than one of text, url or file_base64 was sent.
text_input_not_supported400A binary input format was sent as text.
input_too_large400The input is larger than the cap for this pair.
invalid_file_base64400file_base64 is not decodable base64.
invalid_json400The JSON input does not parse.
json_not_tabular400The JSON is not an array of flat objects, so it cannot become a CSV.
invalid_docx400The file is not a readable .docx.
compression_ratio_rejected400The archive expands far beyond its packed size and was refused.
source_http_error502The URL did not return the document. Not charged.

On every service

Scroll the table horizontally to see all fields.

Code / Status / Meaning
CodeStatusMeaning
invalid_api_key401The authorization header is missing or the key is unknown.
insufficient_credits402The balance is below this call's cost. The response carries credits_required and credits_remaining.
rate_limit_exceeded429Free keys share 10 calls a minute across every service. The response carries limit and window_seconds.
services_unavailable503The credit store could not be reached. Retry once after 30 seconds.

Where the answer comes from

Source and scope

Converted in this process from the bytes supplied with the request. Formatting with no equivalent in the target format is dropped, so the output is a working copy of the content.

Attest reports what it read, with the source it read it from. It is general information, not advice, and not a legal record.

All Attest tools · Service list as JSON · OpenAPI

Same key as every Attest tool

One key. One balance. 1 credit a call.

Issue a free key, then use it here, on Attest Capture and on every other tool in the box.

Get a free key