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| Field | Type | Required | What it does |
|---|
from | string | Required | The input format: docx, html, markdown, csv, json or tsv. |
|---|
to | string | Required | The output format. Supported pairs are returned on every response and on an unsupported_conversion error. |
|---|
text | string | Optional | The document as text. Not accepted for docx, which is binary. |
|---|
url | string | Optional | A public http(s) URL to read the document from. |
|---|
file_base64 | string | Optional | The 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| Field | What it holds |
|---|
result_text | The converted document. |
|---|
from | The input format. |
|---|
to | The output format. |
|---|
input_source | Which of text, url or file_base64 was used. |
|---|
input_encoding | The character encoding the input was read as. |
|---|
bytes_in | Bytes read. |
|---|
bytes_out | Bytes produced. |
|---|
truncated | Whether the output was cut at a cap. |
|---|
stats | Counts from the conversion, such as rows and columns for tabular formats. |
|---|
warnings | What was dropped or changed in the conversion. |
|---|
limits | The caps that applied to this conversion. |
|---|
supported_pairs | Every 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| Code | Status | Meaning |
|---|
unsupported_conversion | 400 | This from/to pair is not converted; the response lists every pair that is. |
|---|
input_required | 400 | None of text, url or file_base64 was sent. |
|---|
too_many_inputs | 400 | More than one of text, url or file_base64 was sent. |
|---|
text_input_not_supported | 400 | A binary input format was sent as text. |
|---|
input_too_large | 400 | The input is larger than the cap for this pair. |
|---|
invalid_file_base64 | 400 | file_base64 is not decodable base64. |
|---|
invalid_json | 400 | The JSON input does not parse. |
|---|
json_not_tabular | 400 | The JSON is not an array of flat objects, so it cannot become a CSV. |
|---|
invalid_docx | 400 | The file is not a readable .docx. |
|---|
compression_ratio_rejected | 400 | The archive expands far beyond its packed size and was refused. |
|---|
source_http_error | 502 | The URL did not return the document. Not charged. |
|---|
On every service
Scroll the table horizontally to see all fields.
Code / Status / Meaning| Code | Status | Meaning |
|---|
invalid_api_key | 401 | The authorization header is missing or the key is unknown. |
|---|
insufficient_credits | 402 | The balance is below this call's cost. The response carries credits_required and credits_remaining. |
|---|
rate_limit_exceeded | 429 | Free keys share 10 calls a minute across every service. The response carries limit and window_seconds. |
|---|
services_unavailable | 503 | The credit store could not be reached. Retry once after 30 seconds. |
|---|
6 worked examples
Examples
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