Developers · Reference
Writing-check API reference
The Silvertext REST API: JSON in and out, versioned under /v1, the same endpoints that power the Silvertext app. Plagiarism, grammar, citations, and AI content in one check. Building for agents? See the MCP server.
Authentication
Every request carries your API key in the Authorization header. Keys are issued per account from Account → API, prefixed st_live_ (or st_test_), shown once at creation, and revocable at any time. Keep them server-side; never ship a key in client code.
Authorization: Bearer st_live_…Credits & limits
API usage draws from the same credit balance as your Silvertext plan; a check costs the same credits whether it runs from the app, the API, or the MCP server. Requests are limited per key (burst and per-minute); throttled calls answer 429 with a Retry-After header. Submissions accept an Idempotency-Key header so a retried POST can never double-charge.
Submit a check
/v1/checksSend text or a file with the checks you want: plagiarism, grammar, citations, and AI content. The API answers immediately with a check id; most checks finish in about a minute, and a long document takes longer.
The document can arrive however your client sends it: JSON with text or a base64 file, a multipart upload, a form field, or the raw request body with any media type. Files are read by their bytes, never by their name or declared type: .txt, .md, .html, .csv, .docx, .xlsx and .pdf are read natively, scanned PDFs and JPEG/PNG/GIF/WebP images by OCR, and text is decoded from UTF-8, UTF-16 or Windows-1252. Size, type, emptiness, word limits and language are all judged before the check is accepted, so a 202 means the document was read and will run; there is nothing to convert on your side first.
Documents can be prose, source code, or both, in the language they were written in. The pipeline detects each segment's language and searches accordingly, and the report's languages and contentType fields say what it found. Languages written without spaces between words (Chinese, Japanese, Thai) aren't supported yet: those are refused at submission with code unsupported_language, and a refused or rejected check never consumes credits.
| Field | Type | Description |
|---|---|---|
| text | string | The document as text. Exactly one of text / file. Plain text scores most accurately. |
| file | string | binary | The document as a file: base64 or a data: URL in JSON, a file part in multipart, or the raw body. Up to your plan’s upload cap; over it answers 413 file_too_large. |
| filename | string? | The file’s name, for the check’s title (JSON and raw bodies; multipart carries it on the part). |
| title | string? | Optional label shown in reports and lists. |
| options | object? | Which checks to run: plagiarism, grammarSpelling, citations, aiContent, style (booleans; all but aiContent default on). style is the clarity + word-choice layer, returning clarity and word_choice issues plus a scores.clarity density. |
| options.register | 'academic' | 'general' | Which word-choice rules the style check applies. academic flags contractions, colloquial wording and first-person asides; general leaves register alone. Default academic. |
| citationStyle | 'APA' | 'MLA' | 'Chicago' | Style used for citation checks. Default APA. |
Sending a file
Response · 202
{ "id": "9b2f1c34-7c1d-4c7e-9a44-2f6f4be8d915" }Get a check
/v1/checks/{id}Status while running, the report when done. You control the payload size: ?view=summary returns scalars and scores only, and ?include=scores,issues,text,matches,sources,spans,meta cherry-picks exactly the report sections you want, from a bare score to the full annotated document.
Response · 200 (view=summary)
{
"id": "9b2f1c34-7c1d-4c7e-9a44-2f6f4be8d915",
"status": "done",
"title": "Q3 launch post",
"wordCount": 1184,
"scores": {
"plagiarism": 14,
"grammarSpelling": 2,
"citation": 0,
"aiContent": 9,
"clarity": 6
},
"issueCounts": { "grammar": 3, "citations": 0, "clarity": 4 },
"reportUrl": "https://app.silvertext.com/reports/9b2f1c34…"
}List checks
/v1/checksRecent checks with status, scores, and open-issue counts. Useful for dashboards and for agents resuming work.
Cancel a check
/v1/checks/{id}/cancelStops a queued or running check. Cancelled work releases its credit reservation; only completed checks settle usage.
Usage & balance
/v1/me/usageThe credit balance and current period. Check it before large batches, or read the same numbers from any scan response.
Response · 200
{
"creditsRemaining": 236,
"creditsUsed": 4,
"periodStart": "2026-08-04T00:00:00Z",
"periodEnd": "2026-09-04T00:00:00Z"
}Errors
Errors are JSON with a stable machine-readable code and a human-readable message. Branch on the code; show the message.
| Field | Type | Description |
|---|---|---|
| 400 invalid_body | Bad request | The body failed validation; the message names the field. |
| 400 no_input · too_short · too_long | Document | Nothing to check, or the word count is outside your plan’s per-check range. Judged at submission, for files too. |
| 400 unsupported_type · unreadable_file | Document | The bytes are no format we read (the message lists what is), or a supported format we could not parse. The type is sniffed from the content, never the extension. |
| 400 unsupported_language | Document | Written mostly in a script without spaces between words (Chinese, Japanese, Thai). |
| 413 file_too_large | Document | Over your plan’s upload cap; the message says the cap. |
| 401 unauthorized | Auth | Missing or invalid API key. |
| 402 insufficient_credits | Billing | Not enough credits for this check; the message says how many it needs. |
| 404 not_found | Lookup | No such check on this account. |
| 429 rate_limited | Throttle | Too many requests; honor Retry-After and back off. |
| 5xx internal | Server | Something broke on our side; safe to retry with backoff. |
{
"error": {
"code": "insufficient_credits",
"message": "This check needs 12 credits; 3 remain. Top up from your account."
}
}Ready to build? Keys are issued from the API page.
Get an API Key