Sending files

Send a .docx, .pdf, spreadsheet or image instead of text, as base64 in JSON, a multipart upload, or the raw request body.

The document can arrive however your client already sends files. In every shape the file is read by its bytes, never by its name or declared type, and every refusal (size, type, word count, language) is judged before the check is accepted.

Read natively
.txt .md .html .csv .docx .xlsx .pdf
Read by OCR
Scanned PDFs, JPEG, PNG, GIF, WebP
Size cap
25 MB
Text encodings
UTF-8, UTF-16, Windows-1252

Three ways to send bytes

The shape an agent or an MCP tool hands over: the file as base64 (or a data: URL) in the JSON body, with filename for the title.

import { readFile } from 'node:fs/promises';

const bytes = await readFile('thesis-draft.docx');
const res = await fetch('https://api.silvertext.com/v1/checks', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SILVERTEXT_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    file: bytes.toString('base64'),
    filename: 'thesis-draft.docx',
    options: { plagiarism: true, aiContent: true },
  }),
});

Send exactly one of text or file; both at once answers 400 multiple_inputs.

What happens to a file

Text is extracted at submission, so a .docx with 30,000 words is refused with too_long before any credits are reserved. A scanned PDF or an image is the one exception: its text is read by OCR while the check runs (status: extracting), and a scan with no readable text ends rejected with unreadable_file, without charge.

Spreadsheets are checked cell by cell as prose. HTML is checked as its visible text.

Plain text scores most accurately

Extraction is faithful, but a paste of the text you actually want checked (no headers, footers, page numbers or boilerplate) gives the cleanest report. When your product already has the text, send text.

On this page