# Find where readers lose the thread readlint.com checks Markdown and MDX articles for writing that makes readers work too hard. It helps writers and writing agents find unexplained terms, missing reasons to care, ideas in the wrong order, claims about lost work that ignore backups or version control and filler phrases. A draft can be grammatically correct and still leave a newcomer lost. readlint.com asks a decision model narrow questions about the article and its paragraphs. The report points you back to the prose so you can decide what to change. ## What a report helps you change Suppose a guide opens with “Set the retention window to 30 days” before explaining what it keeps. A newcomer has no reason to choose that setting. A finding about missing context is a prompt to introduce the stored data and why the reader needs it before giving the instruction. Findings are review suggestions. They do not rewrite your article or prove that a passage is wrong. Keep the ones that help your intended reader and leave the rest. ## Start with the concepts Read [checks and findings](/docs/concepts) to learn how a report separates likely problems from uncertain answers. Then follow [evaluate an article](/docs/quickstart) to check a draft on the website or through the hosted API. You can [sign in](/app/sign-in) with an available email or Google option and manage your session on the account page. Evaluation access is granted separately from sign-in. Paste a draft on [Check article](/app), or use an API key to send drafts from a script. ## Use it from an agent Give your agent [llms.txt](/llms.txt) for the documentation index or [llms-full.txt](/llms-full.txt) for every page in one file. Both come from the same source as these pages. The [API reference](/docs/api) includes the request and report fields from the shipped OpenAPI contract. Install the [CLI](/docs/cli), [Python SDK](/docs/python) or [TypeScript SDK](/docs/typescript) from the public registries. Each guide starts by listing saved reports, so you can check authentication before sending a draft. The [MCP guide](/docs/mcp) covers local tool connections for agents without a shell. Install the [draft-review skill](/docs/skills) with `npx skills add writeitai/readlint-clients --skill readlint`, then select your agent in the installer. Ask it to review a Markdown or MDX draft with readlint.com. The skill explains how to read findings, revise relevant passages and recover a timed-out request. Agents with a shell should use the CLI. Evaluations use your account's credit. For access or help with a report, contact [support@readlint.com](mailto:support@readlint.com). --- # Checks and findings An evaluation is one review of an article. It keeps the article's title, a report and an expiry time under an evaluation ID. Your account owns that evaluation. Other accounts cannot read or delete it. ## Article and prose blocks Send Markdown or MDX source, with an optional title and description. The title defaults to the first top-level heading. A description gives the model the article's summary and intended context. The reader splits the article into paragraphs, lists, code and figures. It keeps section headings as context. Prose checks apply to paragraphs and lists. Code and figure captions help explain the surrounding text; they are not separate prose findings. MDX is read as source. It is never executed. Literal figure captions can be read, but computed JSX content can be left out. The report lists omitted computed JSX in `omitted_computed_jsx`. Review that list before treating the report as a review of everything the rendered page shows. ## Checks A check asks about a specific writing problem. Four article checks use the title, description and first three prose blocks to review the opening. The approach-comparison check uses the whole article. Prose checks look at individual blocks, such as whether terms are explained, sentences follow a useful order or a claim about lost work ignores common ways to keep it. The questions assume a software developer who knows common programming languages, Git, Docker, cloud storage and AI agent tools, but is new to your product. This reader profile is fixed. The description adds article context; it does not select a different reader profile. The model also assigns each prose block a role in the article. The report includes this role and the block's section so you can locate the passage. ## What the checks ask | Scope | Check | What to review | | --- | --- | --- | | Article | `says_what_product_is` | Does the opening explain the product? | | Article | `opening_names_problem` | Does it name a problem the reader recognizes? | | Article | `says_why_it_matters` | Does it explain the cost of leaving the problem unsolved? | | Article | `has_hook` | Does it leave a question or tension for the article to resolve? | | Article | `explains_why_this_approach` | Does it compare the approach with another way to solve the problem? | | Prose | `unexplained_term` | Are unfamiliar terms explained before use? | | Prose | `unexplained_product_command` | Is each command's purpose clear? | | Prose | `unclear_reference` | Is a reference introduced before it assumes familiarity? | | Prose | `depends_on_later` | Does this block need an explanation that comes later? | | Prose | `abrupt_change` | Does a topic change lack a heading or transition? | | Prose | `contradicts_earlier` | Do statements contradict each other? | | Prose | `adds_nothing_new` | Does the block repeat an earlier point? | | Prose | `sentence_order` | Is a thing used before it is defined? | | Prose | `ignores_usual_fix` | Does a claim about lost work mention common ways to keep it? | | Prose | `inflated_wording` | Does the wording make the idea sound grander than it is? | The first prose block skips checks that compare it with a previous block. The sentence-order check applies to multi-sentence paragraphs. ## Findings and unsure answers The model's answers become a `problem_probability` between 0 and 1. The evaluation averages three model responses. The score is a model estimate, not a measured chance that a reader will struggle. - A score below 0.4 is `clear`. - A score from 0.4 up to, but not including, 0.6 is `unsure`. - A score of 0.6 or above is a `finding`. Article-level results include all three verdicts. Each prose block has separate `findings` and `unsure` lists. Clear prose checks are left out of those lists. A report with empty lists means these checks found no likely problems; it is not a guarantee that the writing is ready to publish. Filler phrase matches are listed separately in `banned_phrases`, with a location and a block index when available. These matches come from the phrase list rather than model probability. ## Usage and access The hosted report records `input_tokens` and the model used. Input tokens measure the text sent to the model, including questions and context across the evaluation's model calls. They are not the article's word count. Evaluation access currently uses an account-specific input-token allowance. Signing in does not grant an allowance. There is no purchase or credit-balance screen in the current account page. See [limits and recovery](/docs/limits) for how admission, failed requests and retries affect usage. ## Review, revise, evaluate again Read article findings first, then the prose blocks in order. Check unsure answers against your intended audience. Revise the source yourself. A revised draft is a new evaluation with a new idempotency key; it does not replace the saved report. --- # Evaluate an article Use the website or hosted API to review a Markdown or MDX draft. You need a readlint.com account with evaluation access. Start by reading [checks and findings](/docs/concepts), then [sign in](/app/sign-in) and open [Check article](/app). ## Check a draft on the website 1. Paste the Markdown or MDX source into “Article”. A blank draft is rejected before sending. Title and description are optional; a blank title uses the article's first top-level heading. 2. Choose “Check article” once. The form is disabled while the request runs. Keep the tab open while the model checks the draft. 3. When the report opens, read “Article checks” first, then the paragraph and list notes in source order. Findings identify likely problems; “Unsure” notes ask you to judge a passage. The finding count leaves out unsure answers and phrase matches. 4. Review “Phrases to review”, “Skipped content”, the model and input-token usage. Phrase links take you to the relevant passage. Computed content that was skipped needs a separate review. The report shows its expiry date. Drafts stay in this tab's memory while you work. Copy the source somewhere private before reloading, closing or leaving the page; it is not a saved draft editor. If the session ends during submission, use “Sign in to retry” to sign in in another tab, then return to the original tab. Your draft and submission key remain there. After a lost connection or timeout, choose “Retry check” with the exact same title, description and article. The page reuses its submission key to recover the original evaluation. Editing the draft starts a new evaluation. Reloading loses the key, so check “Past checks” and reconcile saved reports before submitting again. If the model run is confirmed failed, the page offers “Open failed report” and explains that retry starts a new check. That new evaluation can add usage; recorded input tokens from the failed run stay on your account. A report still running refreshes every three seconds. If a read fails, use “Try again”; an invalid, expired, deleted or other account's report shows “Report unavailable”. ## Find and delete saved reports “Past checks” on [Check article](/app) lists your saved reports, ten per page, newest first. Use “Older checks” and “Newer checks” to move between pages, and “Open report” to read one. The list shows “Checking”, “Report ready” or “Check failed”. If the list cannot load, use “Try again”. Choose “Delete” beside a report and confirm “Delete report” to remove it permanently. Input-token usage stays in your account. A report already deleted in another tab is treated as deleted. You can also use the expiry shown in each report to decide when to save a private copy. ## Prepare a client request Install the [CLI](/docs/cli), [Python SDK](/docs/python) or [TypeScript SDK](/docs/typescript). For scripts, set `READLINT_API_KEY` through your secret manager. The CLI can also use [device login](/docs/cli#sign-in). For curl, follow the private header-file setup in [API keys](/docs/api-keys). Save your Markdown or MDX as `article.md`. For curl, save `article.json` with an `article` string containing that same source. Optional `title` defaults to the first top-level heading and `description` defaults to an empty string. Keep the exact input and submission key privately until you know the result. The examples use `article-first-check` as a submission key. Replace it with a unique value for each intentional evaluation. Reuse the original value and identical input after a timeout. A key is 1–255 visible ASCII characters without spaces. ## Send the draft :::clients Evaluate a draft ```sh CLI npx readlint.com check article.md --idempotency-key article-first-check --json ``` ```python Python from pathlib import Path from readlint import Readlint with Readlint() as client: result = client.evaluate( Path("article.md").read_text(encoding="utf-8"), idempotency_key="article-first-check", ) print(result) ``` ```ts TypeScript import { readFile } from "node:fs/promises"; import { Readlint } from "readlint.com"; const client = new Readlint(); console.log(await client.evaluate(await readFile("article.md", "utf8"), { idempotencyKey: "article-first-check", })); ``` ```sh curl curl --silent --show-error --fail-with-body \ --header @readlint-auth.header \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: article-first-check' \ --data-binary @article.json \ https://readlint.com/v1/evaluations ``` ::: A completed request returns `status: "complete"`, an `id`, `expires_at` and a `report`. The report contains article checks, prose findings, unsure answers, phrase matches, model information and input-token usage. A duplicate request still running returns `status: "running"` and `report: null` (HTTP 202). If an answer is lost, resend the identical input with the same key to recover that evaluation. A new key starts a new evaluation and can add usage. Read [limits and recovery](/docs/limits) before retrying an error. ## Read the saved result Replace `EVALUATION_UUID` with the returned `id` in each example. :::clients Read a saved report ```sh CLI npx readlint.com get EVALUATION_UUID --json ``` ```python Python from readlint import Readlint with Readlint() as client: print(client.get_evaluation("EVALUATION_UUID")) ``` ```ts TypeScript import { Readlint } from "readlint.com"; console.log(await new Readlint().getEvaluation("EVALUATION_UUID")); ``` ```sh curl curl --silent --show-error --fail-with-body \ --header @readlint-auth.header \ https://readlint.com/v1/evaluations/EVALUATION_UUID ``` ::: Reads return HTTP 200 even when the evaluation is running or failed. Inspect `status` and `error_code`. For `running`, wait 15–30 seconds before reading again. A failed evaluation has no report. Keep its ID when asking support about a failure. ## List reports from a script :::clients List saved reports ```sh CLI npx readlint.com list --limit 25 --offset 0 --json ``` ```python Python import json from readlint import Readlint with Readlint() as client: print(json.dumps(client.list_evaluations(limit=25, offset=0))) ``` ```ts TypeScript import { Readlint } from "readlint.com"; const client = new Readlint(); console.log(JSON.stringify(await client.listEvaluations({ limit: 25, offset: 0 }))); ``` ```sh curl curl --silent --show-error --fail-with-body \ --header @readlint-auth.header \ 'https://readlint.com/v1/evaluations?limit=25&offset=0' ``` ::: The result contains summary `items` and `next_offset`. An empty account returns `{"items": [], "next_offset": null}`. Continue with the returned offset until it is null. New or deleted records can shift offset pages. ## Delete a report from a script Deletion is permanent and does not erase recorded model usage. :::clients Delete a saved report ```sh CLI npx readlint.com delete EVALUATION_UUID --json ``` ```python Python from readlint import Readlint with Readlint() as client: client.delete_evaluation("EVALUATION_UUID") ``` ```ts TypeScript import { Readlint } from "readlint.com"; await new Readlint().deleteEvaluation("EVALUATION_UUID"); ``` ```sh curl curl --silent --show-error --fail-with-body \ --request DELETE --header @readlint-auth.header \ https://readlint.com/v1/evaluations/EVALUATION_UUID ``` ::: The CLI returns `{"deleted": true, "id": "..."}`. The SDK methods return no value and curl gets HTTP 204 with no body. After a lost delete response, read the same ID first. `evaluation_not_found` confirms the report is gone. Retry deletion only if it still exists. Browser sign-in and key management use the website controls described in [sign in and sessions](/docs/authentication) and [API keys](/docs/api-keys). They are website-only workflows. Client examples use account API keys rather than browser-console code so you can run the same workflow from a terminal or script. The repository's developer-only `write-eval` command calls a model provider directly; it is not a hosted account client. --- # Sign in and sessions Open [sign in](/app/sign-in). The page shows the methods available on the service. You can use an email link or Google when that method is enabled. If sign-up is closed, only invited addresses can sign in. ## Email links Enter your email address to request a link. The page gives the same confirmation whether an address is allowed or a send limit was reached, so it does not reveal who has an account. A confirmation does not prove that an email was delivered. Links expire after 15 minutes and work once. Open the link and confirm sign-in. If you open it in another browser, enter the same email address to confirm it. A wrong email consumes the link. For an expired or used link, request a new one. Each address can request at most three sends per 15-minute window. The service also has a shared daily send budget of 30. Wait before requesting more links and check your spam folder. Ask support if a fresh link still does not arrive. ## Google Choose the Google option, finish Google's sign-in flow and return to readlint.com. A cancelled, expired or invalid sign-in returns you to the sign-in page with an error. Start again there. The sign-in transaction expires after 10 minutes. ## Account page and sign-out The [Check article page](/app) shows your signed-in email in the “Account” menu. Open that menu for the sign-out actions. “Sign out” ends the current browser session. “Sign out everywhere” revokes all browser sessions for that account. It does not delete reports or erase model usage. API keys already issued remain valid until revoked or expired. An approved device request that has not yet been exchanged loses its authorization when its approving session is revoked. The session uses a secure, HTTP-only cookie. The access credential lasts 15 minutes. A valid session can be refreshed, subject to a 24-hour idle timeout and a seven-day absolute lifetime. The website refreshes access when needed; sign in again when refresh is refused. ## API authentication The evaluation routes accept an expiring [API key](/docs/api-keys) with `Authorization: Bearer `, or your browser session. An explicit Authorization header takes priority over cookies. An invalid, expired or revoked key returns 401 without falling back to the browser account. Key management and device approval require a browser session, even if you have an API key. Cookie-authenticated writes require `Origin: https://readlint.com` and `Content-Type: application/json`, including DELETE. Reads need the session cookie. A protected evaluation belongs to the signed-in account; an unknown, expired or other account's ID returns `evaluation_not_found`. ## Browser authentication routes These routes serve the website. They are separate from the client OpenAPI contract at `/v1/openapi.json`. | Method and path | Behavior | | --- | --- | | GET `/auth/methods` | Returns available methods and whether sign-up is open. | | GET `/auth/google/start` | Starts Google sign-in and redirects to Google. | | GET `/auth/google/callback` | Completes the bound Google transaction. | | POST `/auth/email/start` | Accepts `email` and optional `return_to`; returns 202 and `expires_in`. | | POST `/auth/email/complete` | Accepts the emailed `token` and, for another browser, `email`; returns `return_to` and sets the session cookie. | | GET `/auth/session` | Returns the account's `email`, or 401 when the session is invalid. | | POST `/auth/refresh` | Rotates a valid session's refresh credential and returns 204. Concurrent refreshes can conflict; use the browser's session flow. | | POST `/auth/sign-out` | Revokes the current session, clears the cookie and returns 204. | | POST `/auth/sign-out-everywhere` | Revokes all of your sessions and returns 204. | Authentication POSTs also require the same Origin and JSON headers. Only local return paths are accepted; invalid destinations return to `/app`. Never log email-link tokens, cookies or credentials. If sign-in reports `signin_unconfigured`, `email_signin_unconfigured` or another service error, contact support rather than repeatedly requesting links. --- # API keys and devices API keys let scripts and writing tools evaluate articles for your readlint.com account. A key has the same evaluation access and allowance as its account. It can read, create and delete that account's reports. It cannot manage keys or approve devices. ## Create and store a key 1. [Sign in](/app/sign-in) and open [API keys](/app/api-keys). 2. Choose “Create key”, give it a name you will recognize and choose an expiry. The page offers 7, 30, 90 or 365 days, with 30 selected by default. 3. Copy the key while it is shown. Save it in your tool's secret settings or an owner-only file, then choose “I've saved it”. The full secret cannot be retrieved later. For the curl examples, save one line in `readlint-auth.header`: `Authorization: Bearer ` followed by your actual key. Use a private directory and set that file's permissions to 600 before entering the secret. Keep it out of source control, logs, terminal history and support messages. The examples read this file so the key does not appear in curl's command arguments. They require curl 7.76 or later. :::clients List saved reports ```sh CLI npx readlint.com list --limit 25 --offset 0 --json ``` ```python Python import json from readlint import Readlint with Readlint() as client: print(json.dumps(client.list_evaluations(limit=25, offset=0))) ``` ```ts TypeScript import { Readlint } from "readlint.com"; const client = new Readlint(); console.log(JSON.stringify(await client.listEvaluations({ limit: 25, offset: 0 }))); ``` ```sh curl curl --silent --show-error --fail-with-body \ --header @readlint-auth.header \ 'https://readlint.com/v1/evaluations?limit=25&offset=0' ``` ::: For the SDK and CLI tabs, set `READLINT_API_KEY` through your secret manager. See the [client guides](/docs/cli) for installation. A valid key returns HTTP 200 with `items` and `next_offset`. An empty account returns `items: []` and `next_offset: null`. Continue with [evaluate an article](/docs/quickstart) to send a draft. Creating a key does not grant evaluation allowance. ## Expiry and revocation The list shows each key's name, prefix, expiry and active, expired or revoked state. To stop a tool's access, choose “Revoke” for its key and confirm. Future authenticated requests using that key return 401. A model request already sent cannot be recalled. If you lose a key, revoke it and create another. If creation times out, check the list first: the key may exist even though you never received its secret. Revoke that key before trying again. Signing out of the browser does not revoke issued API keys. ## Browser key-management routes These routes require a browser session. Writes require the Origin and JSON headers described in [sign in and sessions](/docs/authentication). A bearer key is not a substitute for that session. | Method and path | Behavior | | --- | --- | | GET `/auth/api-keys` | Lists your keys, including expired and revoked ones, newest first. Never returns full secrets. | | POST `/auth/api-keys` | Accepts `name` (1–200 characters, with a non-whitespace character) and optional `expires_in_days` (1–365, default 30). Returns 201 with metadata and the one-time `secret`. Names are trimmed and need not be unique. This create is not idempotent. | | DELETE `/auth/api-keys/{key_id}` | Revokes your key and returns 204, including when already revoked. An unknown or other account's ID returns 404 `api_key_not_found`. | ## Device authorization Device authorization connects a terminal tool without asking you to copy a browser cookie. Protocol implementers can use the two form-encoded routes in the [API reference](/docs/api). The public [CLI installation guide](/docs/cli) explains `readlint login`. The command shows the approval URL and code, polls for your decision and stores the resulting key in an owner-only file. It also accepts `READLINT_API_KEY` or `--api-key`. `readlint logout` removes the local credential; revoke the key here to stop all copies. 1. POST `/auth/device/code` as `application/x-www-form-urlencoded` with `client_id=readlint-cli`. Optional `hostname` (up to 200 characters) and `os` (up to 100) identify the requesting tool. The response includes a secret `device_code`, a visible `user_code`, `verification_uri`, `verification_uri_complete`, `expires_in: 600` and `interval: 5`. 2. Open the returned verification URL in a browser. Sign in, check the account, user code, device name and OS, then choose “Approve” or “Deny”. Approve only a request you started. The name and OS are supplied by the requesting tool, so they are not proof of identity. 3. Poll POST `/auth/device/token` with form fields `client_id=readlint-cli`, `grant_type=urn:ietf:params:oauth:grant-type:device_code` and `device_code`. Wait at least the returned interval before polling, including after approval. 4. A successful exchange returns `access_token`, `token_type: "Bearer"` and `expires_in`. This is an API key valid for 30 days. Save it privately. It appears on the API keys page with a name beginning `CLI:` and can be revoked there. The browser page also accepts a user code at [Approve a device](/app/device). It displays pending, approved, denied, used or expired state. A request lasts ten minutes and allows one decision. Repeating a decision returns 409 `device_request_not_pending`; read its status after an uncertain response. Token polling returns HTTP 400 with an OAuth `error` when it cannot issue a key: | Error | Next step | | --- | --- | | `authorization_pending` | Wait the polling interval and poll again. | | `slow_down` | Increase the interval by five seconds for this and later polls. | | `expired_token` | Start a new device request. | | `access_denied` | Stop. The request was denied, used, or its approving browser session is no longer valid. | | `invalid_grant` | Stop and check the device code and client ID. | | `unsupported_grant_type` | Use the exact grant type above. | The exchange is single-use. If its successful response is lost, the secret cannot be recovered by polling again. Check the API-key list for the new CLI key, revoke it and start again. Signing out of the approving session before exchange invalidates its approval. The service permits 300 device-code requests per ten minutes across the product. Browser lookups and decisions share 30 attempts per account per ten minutes. Exceeding either limit returns 429 `rate_limited` without a guaranteed `Retry-After` header. Wait for the ten-minute window before trying again. A missing or inaccessible code returns 404 `device_request_unknown`. Keep device codes and access tokens out of URLs, logs and source control; only the visible user code belongs in the verification URL. --- # CLI Use the readlint.com CLI to check articles and manage reports from your terminal. You need Node.js 22 or newer, or Python 3.11 or newer with uv. You also need an authorized readlint.com account. Listing saved reports does not require evaluation allowance. ## Install Run without a global installation: ```sh npx readlint.com --help ``` Or use the Python distribution: ```sh uvx readlint --help ``` For a permanent installation, run `npm install -g readlint.com` or `uv tool install readlint`. Both install the `readlint` command with the same commands and flags. Check the release with `npx readlint.com version --json` or `uvx readlint version --json`. ## Sign in On macOS or Linux, start device login: ```sh npx readlint.com login ``` Python users can run `uvx readlint login`. Open the URL printed on stderr, sign in, compare the code and approve the request. The CLI waits and prints `{"signed_in": true}`. The code expires in ten minutes. Denial or expiry requires a new login. Login stores a 30-day API key in an owner-only file. The two CLIs share `~/Library/Application Support/readlint/credentials.json` on macOS and the `readlint/credentials.json` file under `XDG_CONFIG_HOME` (default `~/.config`) on Linux. The key is bound to the API origin. `readlint logout` removes the local file. Revoke the key on the [API keys page](/app/api-keys) to stop every copy. For scripts, CI or Windows, create an [API key](/docs/api-keys) and set `READLINT_API_KEY` through your secret manager. Key precedence is `--api-key`, environment, then saved login. Prefer the environment over process arguments. Authentication does not grant evaluation allowance. Installation, device login and local logout are client setup operations. They are outside the four-client tabs because the SDKs do not manage the shared credential file. The [device protocol](/docs/api-keys#device-authorization) describes the underlying authorization exchange. ## First success With saved login or `READLINT_API_KEY`, list your reports. The other tabs require their [SDK installation](/docs/python) or the [curl header file](/docs/api-keys). :::clients List saved reports ```sh CLI npx readlint.com list --limit 25 --offset 0 --json ``` ```python Python import json from readlint import Readlint with Readlint() as client: print(json.dumps(client.list_evaluations(limit=25, offset=0))) ``` ```ts TypeScript import { Readlint } from "readlint.com"; const client = new Readlint(); console.log(JSON.stringify(await client.listEvaluations({ limit: 25, offset: 0 }))); ``` ```sh curl curl --silent --show-error --fail-with-body \ --header @readlint-auth.header \ 'https://readlint.com/v1/evaluations?limit=25&offset=0' ``` ::: Success exits zero and returns `items` and `next_offset`. An empty account returns `{"items": [], "next_offset": null}`. Use the [quickstart](/docs/quickstart#send-the-draft) to evaluate a draft when your account has evaluation access. ## Commands and options | Command | Result | | --- | --- | | `check FILE` or `evaluate FILE` | Submit UTF-8 Markdown or MDX. Use `-` for stdin. | | `list --limit 25 --offset 0` | Read a page of report summaries. | | `get UUID` | Read one saved evaluation. | | `delete UUID` | Permanently remove one report. | | `login`, `logout` | Save or remove a local login. | | `mcp` | Start the [local MCP server](/docs/mcp). | | `version`, `--help` | Print the version or command help. | Submission options are `--title`, `--description` and `--idempotency-key`. Save a unique key before sending. If omitted, the CLI generates a key and prints it on stderr before sending. After a timeout, reuse that key and the identical input. Follow [limits and recovery](/docs/limits) before starting another evaluation. `--json` before or after the command prints compact JSON. Without it, successful output is indented JSON. Diagnostics and login instructions go to stderr. Success exits zero even when the report has findings. Errors exit 1 with empty stdout. In JSON mode, the final stderr line has `error.code`, `error.message`, `error.status` and, when available, `error.evaluation_id`. A submission error also includes its `idempotency_key`. `--timeout` sets the HTTP timeout in seconds (default 120). `--base-url` or `READLINT_BASE_URL` changes the origin. HTTPS is required except for loopback tests. Credentials are never sent through redirects. Read [limits and recovery](/docs/limits) for error codes, bounded retries and deletion recovery. --- # Python SDK Use the Python SDK to check drafts and read saved reports from your own code. You need Python 3.11 or newer and an authorized readlint.com account. The installation commands below use a macOS or Linux shell. On Windows, use the virtual environment's Python under `.venv/Scripts/`. ## Install ```sh python -m venv .venv .venv/bin/python -m pip install readlint ``` ## Authenticate Create an [API key](/docs/api-keys) and supply `READLINT_API_KEY` through your environment or secret manager. The SDK accepts an explicit key before the environment variable. It does not read the CLI's saved login. Do not commit keys or print them. For interactive device login, use the [CLI](/docs/cli#sign-in), which saves its own credential. Scripts using the SDK should receive a separate API key from your secret manager. Both keys act for the same account. Listing reports does not require evaluation allowance. ## First success Choose the Python tab. The other tabs use the [CLI](/docs/cli), [other SDK](/docs/typescript) or [curl setup](/docs/api-keys). :::clients List saved reports ```sh CLI npx readlint.com list --limit 25 --offset 0 --json ``` ```python Python import json from readlint import Readlint with Readlint() as client: print(json.dumps(client.list_evaluations(limit=25, offset=0))) ``` ```ts TypeScript import { Readlint } from "readlint.com"; const client = new Readlint(); console.log(JSON.stringify(await client.listEvaluations({ limit: 25, offset: 0 }))); ``` ```sh curl curl --silent --show-error --fail-with-body \ --header @readlint-auth.header \ 'https://readlint.com/v1/evaluations?limit=25&offset=0' ``` ::: A valid key returns `items` and `next_offset`. An empty account returns `{"items": [], "next_offset": null}`. Follow [evaluate an article](/docs/quickstart) for submission, reading and deletion examples in every client. ## Responses and configuration Save the Python example as `list_reports.py` and run `.venv/bin/python list_reports.py`. The SDK returns typed JSON dictionaries: `Evaluation`, `EvaluationSummary`, `EvaluationPage` and `EvaluationReport`. Dates are RFC 3339 strings. `py.typed` is included. Use a context manager or call `close()` to release connections. `Readlint(api_key=...)` overrides `READLINT_API_KEY`. `base_url` overrides `READLINT_BASE_URL`. `timeout` defaults to 120 seconds and `max_retries` to 2. `transport` accepts an httpx transport for controlled tests. `ReadlintError` exposes `code`, `message`, `status` (None for transport errors) and `evaluation_id` when a stored evaluation failed. It omits credentials and raw server responses. Catch it, follow the recovery message and retain the original key for an uncertain submission. ## Retry safely `evaluate` requires an explicit submission key (`idempotency_key` in Python, `idempotencyKey` in TypeScript). Save it before sending. After a timeout, use the same key and identical article, title and description. A running evaluation has `report: null`; read its ID later. A stored failed evaluation raises `evaluation_failed`; reading its ID returns the saved failure. Reads and keyed submissions retry network failures and HTTP 429, 502, 503 and 504 at most twice. They honor `Retry-After`; waits over 60 seconds stop the call. Deletes are sent once. Read the same ID after a lost delete response before trying again. The [limits and recovery guide](/docs/limits) explains account errors, expiry and terminal failures. --- # TypeScript SDK Use the TypeScript SDK to check drafts and read saved reports from your own code. You need Node.js 22 or newer and an authorized readlint.com account. ## Install ```sh npm install readlint.com ``` ## Authenticate Create an [API key](/docs/api-keys) and supply `READLINT_API_KEY` through your environment or secret manager. The SDK accepts an explicit key before the environment variable. It does not read the CLI's saved login. Do not commit keys or print them. For interactive device login, use the [CLI](/docs/cli#sign-in), which saves its own credential. Scripts using the SDK should receive a separate API key from your secret manager. Both keys act for the same account. Listing reports does not require evaluation allowance. ## First success Choose the TypeScript tab. The other tabs use the [CLI](/docs/cli), [other SDK](/docs/python) or [curl setup](/docs/api-keys). :::clients List saved reports ```sh CLI npx readlint.com list --limit 25 --offset 0 --json ``` ```python Python import json from readlint import Readlint with Readlint() as client: print(json.dumps(client.list_evaluations(limit=25, offset=0))) ``` ```ts TypeScript import { Readlint } from "readlint.com"; const client = new Readlint(); console.log(JSON.stringify(await client.listEvaluations({ limit: 25, offset: 0 }))); ``` ```sh curl curl --silent --show-error --fail-with-body \ --header @readlint-auth.header \ 'https://readlint.com/v1/evaluations?limit=25&offset=0' ``` ::: A valid key returns `items` and `next_offset`. An empty account returns `{"items": [], "next_offset": null}`. Follow [evaluate an article](/docs/quickstart) for submission, reading and deletion examples in every client. ## Responses and configuration Save the TypeScript example as `list_reports.mjs` and run `node list_reports.mjs`. It uses JavaScript syntax that also compiles in a TypeScript project. Keep account keys on your server, outside public browser bundles. The package exports `Readlint`, `ReadlintError` and response types including `Evaluation`, `EvaluationPage` and `EvaluationReport`. Results use the API's JSON field names. Dates are strings and `report` is nullable. `new Readlint({ apiKey, baseUrl, timeoutMs, maxRetries, fetch })` accepts overrides. `apiKey` and `baseUrl` override `READLINT_API_KEY` and `READLINT_BASE_URL`. The defaults are `https://readlint.com`, 120000 milliseconds and 2 retries. `fetch` supplies a test transport. Redirects are refused. `ReadlintError` exposes `code`, `message`, `status` (null for transport errors) and `evaluationId`. Invalid local options throw `TypeError`. `createDeviceCode({ hostname, os })` and `createDeviceToken(deviceCode)` expose the [device protocol](/docs/api-keys#device-authorization). Callers must respect its polling interval and keep the returned key private. ## Retry safely `evaluate` requires an explicit submission key (`idempotency_key` in Python, `idempotencyKey` in TypeScript). Save it before sending. After a timeout, use the same key and identical article, title and description. A running evaluation has `report: null`; read its ID later. A stored failed evaluation raises `evaluation_failed`; reading its ID returns the saved failure. Reads and keyed submissions retry network failures and HTTP 429, 502, 503 and 504 at most twice. They honor `Retry-After`; waits over 60 seconds stop the call. Deletes are sent once. Read the same ID after a lost delete response before trying again. The [limits and recovery guide](/docs/limits) explains account errors, expiry and terminal failures. --- # MCP server Connect a writing agent to readlint.com with a local MCP server. MCP lets an agent discover named tools and call them without a shell. Agents with shell access should use the [CLI](/docs/cli). You need Node.js 22 or newer, or Python 3.11 or newer with uv, an MCP client such as Claude Code, and an authorized readlint.com account. ## Install and authenticate The npm package runs without a global installation. On macOS or Linux, sign in before starting your MCP client: ```sh npx readlint.com login ``` Follow the printed URL, compare the code and approve it in your browser. Login prints `{"signed_in": true}` and saves a 30-day key. The MCP process uses that saved login. Python users can run `uvx readlint login` and then `uvx readlint mcp`. For CI, Windows or a separate agent key, create an [API key](/docs/api-keys). Give `READLINT_API_KEY` to the MCP server process through your client's secret settings. Key precedence is `--api-key`, environment, saved login. Prefer the environment over process arguments. Never put credentials in tool arguments. The server cannot use browser cookies or start interactive login. ## Configure a client For Claude Code, save this configuration as `readlint-mcp.json` in your project: ```json { "mcpServers": { "readlint.com": { "command": "npx", "args": ["--yes", "readlint.com", "mcp"] } } } ``` Start Claude Code with that file: ```sh claude --mcp-config ./readlint-mcp.json ``` Run `/mcp` in Claude Code to confirm `readlint.com` is connected. If it cannot find `npx`, use its absolute path from `command -v npx`. For Python, set `command` to the absolute path to `uvx` and `args` to `["readlint", "mcp"]`. Both CLIs share the same login on macOS and Linux. If you use a key instead, supply `READLINT_API_KEY` in the environment before starting the client. This is local stdio MCP. Standard output carries protocol messages and diagnostics go to stderr. Installation, MCP configuration and tool calls are outside the four-client tabs because they configure or use the MCP interface itself. [API operations](/docs/quickstart) have examples for every client. ## Discover tools Connect the server and inspect its tool list. It contains exactly four tools: | Tool | Arguments | Result | | --- | --- | --- | | `list_evaluations` | Optional `limit` and `offset` | Summary `items` and `next_offset`. | | `get_evaluation` | `evaluation_id` (UUID) | Saved status and report. | | `evaluate_article` | `article` and `idempotency_key`; optional `title` and `description` | Evaluation `id`, `status`, `expires_at` and `report`. Uses account credit. | | `delete_evaluation` | `evaluation_id` (UUID) | `deleted` and `id`. Permanently deletes the report. | ## First success Ask your agent: “Use readlint.com's list_evaluations tool with limit 25 and offset 0. Tell me whether there are saved reports. Do not submit an article.” The tool arguments are: ```json {"limit": 25, "offset": 0} ``` For an empty account, expect `{"items": [], "next_offset": null}` with `isError: false`. Tool results include the same JSON in text and structured content. Listing reports needs authentication but no evaluation allowance. ## Evaluate and recover When your account has evaluation access, ask the agent to review an approved draft with `evaluate_article`. It must choose and retain a unique `idempotency_key` with the exact source, title and description. See [checks and findings](/docs/concepts) before acting on a report. For `running`, call `get_evaluation` every 15–30 seconds for up to ten minutes. Stop and retain the ID and key if it has not finished. After a timed-out submission, read the ID if known. Otherwise repeat `evaluate_article` with the same key and identical input. A new key starts another evaluation and can add usage. Errors set `isError: true` and include `error.code` and a sanitized `error.message`. For `authentication_required`, log in again or replace the key. For invalid input, correct the arguments. Reads and keyed submissions retry transient failures at most twice. A stored failed evaluation is terminal. After a lost delete response, get the ID first; `evaluation_not_found` confirms deletion. See [limits and recovery](/docs/limits) for expiry and retry details. --- # Draft-review skill Install the readlint skill so your writing agent knows when to check a draft, how to read findings and how to revise relevant passages. A skill is a set of agent instructions. It uses the [CLI](/docs/cli) when the agent has a shell and [MCP tools](/docs/mcp) otherwise. You need Node.js 22 or newer for the installer, a supported agent such as Codex, and an authorized readlint.com account. Evaluation access is required to submit drafts. Listing saved reports only requires authentication. ## Install Run this exact command in your agent's project directory: ```sh npx skills add writeitai/readlint-clients --skill readlint ``` Select your agent in the installer and choose the project installation. The source is the public [writeitai/readlint-clients repository](https://github.com/writeitai/readlint-clients), with selector `readlint`. Its instructions are in [skills/readlint/SKILL.md](https://github.com/writeitai/readlint-clients/blob/main/skills/readlint/SKILL.md). For Codex, confirm the installed `.agents/skills/readlint/SKILL.md` exists, then start or reload a session in that project. The agent discovers the skill by its `name: readlint` and description. Invoke it explicitly as `$readlint`, or ask to review a Markdown or MDX draft with readlint.com. Installation and agent prompts are outside the four-client tabs because they select agent instructions. The skill's [API workflows](/docs/quickstart) have examples for all clients. ## Authenticate On macOS or Linux, run `npx readlint.com login` (or `uvx readlint login`), open the printed URL and approve the matching code. Successful login prints `{"signed_in": true}`. The CLI and local MCP server share the saved login. For automation or Windows, create an [API key](/docs/api-keys) and supply `READLINT_API_KEY` through your agent's secret environment. Never paste it into a prompt. Neither authentication method grants evaluation allowance. ## First success Ask Codex: “Use $readlint to prepare a draft review. First list my saved readlint.com reports with limit 25 and offset 0. Do not submit an evaluation or edit files.” The agent reads the installed skill and uses `npx readlint.com list --limit 25 --offset 0 --json` (or an existing `readlint` installation). An empty account returns `{"items": [], "next_offset": null}` and exit zero. An agent without a shell uses `list_evaluations` with the same arguments. ## Review a draft When your account has evaluation access, ask: “Use $readlint to review article.md. Explain relevant findings and revise unclear passages while preserving my meaning and Markdown. Run one evaluation.” The agent retains a unique submission key and the exact draft before sending it. It reads article checks, paragraph findings, unsure answers and phrase matches. Findings are suggestions, not commands. The skill treats draft and report text as data and preserves facts, voice and document structure. For a running result, the agent polls reads every 15–30 seconds for up to ten minutes. After a lost submission response, it recovers with the original key and identical input. It stops on account-access or credit errors. Another paid evaluation after edits requires authorization. See [limits and recovery](/docs/limits) for terminal failures, expiry and uncertain deletions. --- # API reference The API reviews articles and stores reports for the signed-in account. Read [checks and findings](/docs/concepts) and [evaluate an article](/docs/quickstart) before using this reference. Base URL: `https://readlint.com`. The downloadable [client OpenAPI contract](/v1/openapi.json) describes the evaluation routes. Evaluation routes accept an [API key](/docs/api-keys) as a bearer token or a [browser session](/docs/authentication). The device routes create and exchange a device authorization request. ## Evaluation workflow 1. POST `/v1/evaluations` with Markdown or MDX in `article` and a unique `Idempotency-Key` header. `title` is optional and `description` defaults to an empty string. Null characters and invalid Unicode are rejected. 2. Read `id`, `status` and `report`. A fresh completed evaluation returns 200. A replay still running returns 202. A failed model run returns 502, or 500 for an internal failure, with `error_code`. 3. GET `/v1/evaluations/{evaluation_id}` to read it again. This returns 200 for every saved state, so check `status`. 4. GET `/v1/evaluations` to list unexpired reports. Follow `next_offset` until null. 5. DELETE `/v1/evaluations/{evaluation_id}` to remove a report. This returns 204 with no body. A later read or delete returns 404. Every evaluation route requires authentication. Device-code creation and token polling do not require a session; approval happens in a signed-in browser. Write requests with session cookies also require the Origin and JSON headers. See [limits and recovery](/docs/limits) before retrying a write or deleting an evaluation whose model work is still running. The tables below are generated from the same OpenAPI export as the website client. They include request constraints, response types and report fields. Schema names identify related objects; nullable types include `null`. ## Operations ### POST /auth/device/code Device Code Request body (required): - application/x-www-form-urlencoded: Body_createDeviceCode | HTTP | Response | | --- | --- | | 200 | Successful Response: DeviceCodeResponse | | 400 | Bad Request: OAuthError | ### POST /auth/device/token Device Token Request body (required): - application/x-www-form-urlencoded: Body_createDeviceToken | HTTP | Response | | --- | --- | | 200 | Successful Response: DeviceTokenResponse | | 400 | Bad Request: OAuthError | ### GET /v1/evaluations List Evaluations Parameters (including required headers): - **limit** (query, optional): integer; minimum: 1 or null - **offset** (query, optional): integer; default: 0; maximum: 9223372036854775807; minimum: 0 | HTTP | Response | | --- | --- | | 200 | Successful Response: EvaluationPage | | 401 | Account authentication required: ErrorResponse | | 422 | Invalid request: ValidationResponse | | 500 | Unexpected server failure: ErrorResponse | | 503 | Service unavailable: ErrorResponse | ### POST /v1/evaluations Create Evaluation Parameters (including required headers): - **idempotency-key** (header, required): string; maxLength: 255; minLength: 1; pattern: ^[!-~]+$ Request body (required): - application/json: EvaluationRequest | HTTP | Response | | --- | --- | | 200 | Successful Response: EvaluationResult | | 202 | Evaluation in progress: EvaluationResult | | 401 | Account authentication required: ErrorResponse | | 402 | Evaluation credit exhausted: ErrorResponse | | 403 | Evaluation access denied: ErrorResponse | | 409 | Idempotency key reused: ErrorResponse | | 413 | Article exceeds model context: ErrorResponse | | 422 | Invalid request: ValidationResponse | | 500 | Unexpected evaluation failure: EvaluationResult or ErrorResponse | | 502 | Provider send failed: EvaluationResult | | 503 | Service unavailable: ErrorResponse | ### DELETE /v1/evaluations/{evaluation_id} Remove Evaluation Parameters (including required headers): - **evaluation_id** (path, required): string (uuid) | HTTP | Response | | --- | --- | | 204 | Successful Response | | 401 | Account authentication required: ErrorResponse | | 404 | Evaluation not found: ErrorResponse | | 422 | Invalid request: ValidationResponse | | 500 | Unexpected server failure: ErrorResponse | | 503 | Service unavailable: ErrorResponse | ### GET /v1/evaluations/{evaluation_id} Get Evaluation Parameters (including required headers): - **evaluation_id** (path, required): string (uuid) | HTTP | Response | | --- | --- | | 200 | Successful Response: EvaluationResult | | 401 | Account authentication required: ErrorResponse | | 404 | Evaluation not found: ErrorResponse | | 422 | Invalid request: ValidationResponse | | 500 | Unexpected server failure: ErrorResponse | | 503 | Service unavailable: ErrorResponse | ## Schemas ### Body_createDeviceCode | Field | Required | Schema | | --- | --- | --- | | client_id | yes | string; const: readlint-cli | | hostname | no | string; default: ; maxLength: 200 | | os | no | string; default: ; maxLength: 100 | ### Body_createDeviceToken | Field | Required | Schema | | --- | --- | --- | | client_id | yes | string; maxLength: 40 | | device_code | yes | string; maxLength: 100 | | grant_type | yes | string; maxLength: 100 | ### CheckResult | Field | Required | Schema | | --- | --- | --- | | check | yes | string | | group | yes | string | | problem_probability | yes | number | | verdict | yes | string; enum: ["clear","unsure","finding"] | ### DeviceCodeResponse | Field | Required | Schema | | --- | --- | --- | | device_code | yes | string | | expires_in | yes | integer | | interval | yes | integer | | user_code | yes | string | | verification_uri | yes | string | | verification_uri_complete | yes | string | ### DeviceTokenResponse | Field | Required | Schema | | --- | --- | --- | | access_token | yes | string | | expires_in | yes | integer | | token_type | no | string; default: Bearer | ### ErrorDetail | Field | Required | Schema | | --- | --- | --- | | code | yes | string | ### ErrorResponse | Field | Required | Schema | | --- | --- | --- | | detail | yes | ErrorDetail | ### EvaluationPage | Field | Required | Schema | | --- | --- | --- | | items | yes | EvaluationSummary[] | | next_offset | yes | integer or null | ### EvaluationReport | Field | Required | Schema | | --- | --- | --- | | article_checks | yes | CheckResult[] | | banned_phrases | yes | PhraseResult[] | | description | yes | string | | expires_at | yes | string (date-time) | | input_tokens | yes | integer | | model | yes | string | | omitted_computed_jsx | yes | string[] | | prose_blocks | yes | ProseResult[] | | title | yes | string | ### EvaluationRequest | Field | Required | Schema | | --- | --- | --- | | article | yes | string; minLength: 1; Markdown or MDX source | | description | no | string; default: | | title | no | string or null | ### EvaluationResult | Field | Required | Schema | | --- | --- | --- | | created_at | yes | string (date-time) | | error_code | yes | string or null | | expires_at | yes | string (date-time) | | id | yes | string (uuid) | | report | yes | EvaluationReport or null | | status | yes | string; enum: ["running","complete","failed"] | | title | yes | string | ### EvaluationSummary | Field | Required | Schema | | --- | --- | --- | | created_at | yes | string (date-time) | | error_code | yes | string or null | | expires_at | yes | string (date-time) | | id | yes | string (uuid) | | status | yes | string; enum: ["running","complete","failed"] | | title | yes | string | ### HTTPValidationError | Field | Required | Schema | | --- | --- | --- | | detail | no | ValidationError[] | ### InvalidField | Field | Required | Schema | | --- | --- | --- | | location | yes | string or integer[] | | type | yes | string | ### OAuthError | Field | Required | Schema | | --- | --- | --- | | error | yes | string | ### PhraseResult | Field | Required | Schema | | --- | --- | --- | | block | yes | integer or null | | phrase | yes | string | | where | yes | string | ### ProseResult | Field | Required | Schema | | --- | --- | --- | | findings | yes | CheckResult[] | | index | yes | integer | | kind | yes | string; enum: ["paragraph","list"] | | role | yes | string | | section | yes | string | | text | yes | string | | unsure | yes | CheckResult[] | ### ValidationDetail | Field | Required | Schema | | --- | --- | --- | | code | yes | string | | fields | no | InvalidField[] or null | ### ValidationError | Field | Required | Schema | | --- | --- | --- | | ctx | no | object | | input | no | object | | loc | yes | string or integer[] | | msg | yes | string | | type | yes | string | ### ValidationResponse | Field | Required | Schema | | --- | --- | --- | | detail | yes | ValidationDetail | --- # Limits and recovery Keep the request body, idempotency key and evaluation ID together. They let you recover a request without starting a second evaluation. ## Safe retries GET requests are safe to retry. If a read fails temporarily, wait before trying again. The report's saved `status` tells you whether the evaluation is running, complete or failed. POST `/v1/evaluations` requires an `Idempotency-Key`. The key is scoped to your account. While the saved evaluation exists and is unexpired, resending the same key and request body returns that evaluation without starting another model run. This includes failed evaluations. Reusing the key with different input returns HTTP 409 `idempotency_key_reused`. If a POST times out or the connection closes, its outcome is unknown. Retry with the original key and exact body. If you have an ID, read it first. Do not generate a new key just because the first response was lost. If you lost the key, list recent evaluations and reconcile them before sending again. Titles are not unique. Deleting an evaluation removes its retained idempotency record. Expiry also ends that record. After deletion or expiry, reusing the old key can start a new evaluation and add usage. Keep keys unique across intentional runs. DELETE removes a report and its stored source content. A successful delete returns 204. Repeating it returns 404; that means the report is already absent or unavailable to this account. Deleting a running evaluation stops later model sends where possible, but cannot undo a request already sent to the provider. It does not refund or erase recorded usage. Email link requests send messages and consume send limits, so do not repeat them blindly after a timeout. Email confirmation consumes a one-use link. Check `/auth/session` after an uncertain confirmation before asking for another link. Session refresh rotates credentials; avoid parallel refresh requests. If a refresh outcome is lost, check the session and sign in again if necessary. Signing out is safe to repeat; after an uncertain global sign-out, a 401 session response confirms that this session is no longer usable. API-key creation is not idempotent. After an uncertain create, check the key list and revoke any key whose secret you did not receive before creating another. Revoking the same owned key again returns 204. For an uncertain device approval, read the request status before deciding again. A device-token exchange is single-use: if its successful response is lost, check the API-key list for the issued CLI key, revoke it, and start a new device request. Repeating the exchange cannot recover the secret. ## Usage and credits Evaluation admission currently uses an account-specific input-token allowance. If no allowance is assigned, the API returns 403. When recorded usage has reached the allowance, it returns 402. This is not a prepaid credit purchase flow. The allowance is checked before admitting an evaluation. It is not a per-request token cap or an exact remaining balance: an admitted evaluation can cross it, and concurrent work may already be in progress. Each evaluation asks the model three times and records input-token usage for provider sends whose usage is returned, including sends in an evaluation that later fails. The report's `input_tokens` describes a successful evaluation. Deletion keeps usage records. ## Retention and limits Reports expire after 90 days by default. Use the returned `expires_at` as the authority for each report. Expired reports are unavailable immediately even before cleanup removes them. Save a private copy before expiry if you need it longer. List requests default to 25 results and accept at most 100 by default. `offset` starts at 0 and `next_offset` is null at the end. Results are newest first, with ID as a tie-breaker. New reports or deletions can shift offsets between pages; this is not a snapshot. There is no fixed article word limit. The API conservatively checks the serialized article, questions and framing against the model's context window. HTTP 413 means the request does not fit. Shorten the article, or evaluate coherent sections separately with enough context in the title and description. The model request uses a 60-second HTTP timeout by default. A lost worker can leave a report running until cleanup marks it failed with `evaluation_interrupted`. Cleanup runs hourly by default and considers runs older than ten provider timeout periods interrupted. Do not start repeated evaluations while waiting for reconciliation. ## Errors and next steps Most errors have `detail.code`. Validation errors add `detail.fields` with field locations and types. Failed evaluations returned by POST instead use the evaluation object with `status: "failed"` and `error_code`; its `report` is null. Read saved evaluations with GET to check the same fields even on HTTP 200. | HTTP | Code or state | Next step | | --- | --- | --- | | 400 | `email_link_invalid` | Request a fresh sign-in link. | | 401 | `authentication_required` | For a browser session, refresh or sign in again. For an API key, check that the header contains the full `rlk_…` key. Replace an expired or revoked key from the [API keys page](/app/api-keys). | | 402 | `evaluation_credit_exhausted` | Contact support about your allowance. A new key does not restore access. | | 403 | `evaluation_not_allowed` | Ask support for evaluation access. | | 403 | `bad_origin` | Send a browser write from the readlint.com origin. | | 404 | `evaluation_not_found` | Check the account and ID. The report may have expired or been deleted. | | 409 | `idempotency_key_reused` | Recover the original body, or use a new key only for a deliberate new evaluation. | | 409 | `email_confirmation_required` | Enter the email address that received the link. | | 413 | `evaluation_context_exceeded` | Shorten the source before sending a new request. | | 415 | `json_required` | Use `Content-Type: application/json`. | | 429 | `rate_limited` | Wait for the rate-limit window; see [API keys and devices](/docs/api-keys). | | 422 | `invalid_request`, `invalid_page_size` | Fix the fields or pagination bounds before retrying. | | 500 | `evaluation_internal_error`, `auth_internal_error` | Reconcile the saved evaluation or session. Contact support if it persists. | | 502 | Failed evaluation with a provider error | Read `error_code`. Replaying the same key returns that failure; a new run adds usage. | | 503 | `evaluation_disabled`, `database_unavailable`, sign-in unavailable | Wait and retry reads. For writes, preserve the same key and body. | Device-token polling uses an OAuth `error` field instead of `detail.code`. See [API keys and devices](/docs/api-keys) for pending, slow-down and terminal errors. Provider error codes include `openrouter_transport_error`, `openrouter_http_error`, `openrouter_invalid_response`. Do not assume a provider failure means nothing was sent or no usage was recorded. For HTTP 429 from a gateway, respect `Retry-After` if present and keep the same evaluation key when retrying. ## Client errors The CLI, SDKs and MCP server translate HTTP and local failures into these codes. CLI failures exit 1 with empty stdout. In JSON mode, read the final stderr line's `error` object. SDKs raise `ReadlintError`; MCP returns `isError: true` with `error.code` and `error.message`. | Code | Meaning and next step | | --- | --- | | `invalid_input` | The command or tool arguments are invalid. Check help, file encoding, UUID and options before retrying. Python SDK local validation can raise `ValueError`; TypeScript can throw `TypeError`. | | `validation_error` | The API rejected request fields with HTTP 422. Correct the fields before retrying. | | `network_error` | No reliable response arrived; `status` is null. Retry reads later. For a submission, reuse the original key and identical article, title and description. | | `api_error` | An HTTP failure without a recognized API code. Check its `status` and wait before retrying a temporary read failure. Keep the original submission key and input when reconciling a write. | | `evaluation_failed` | A stored evaluation failed and will not be retried automatically. Read `evaluation_id` (TypeScript: `evaluationId`). A deliberate new attempt needs a new key and can add usage. | | `invalid_response` | The service returned an unexpected success body. Update the client or contact support; preserve the submission key and input. | | `unsupported_platform` | Saved device login needs macOS or Linux file permissions. Use `READLINT_API_KEY` on Windows. | | `authentication_required` | Run CLI login again or replace an expired or revoked API key. | | `rate_limited` | Wait for the rate-limit window. Honor `Retry-After` when provided. | Clients retry reads and keyed submissions at most twice after network failures or HTTP 429, 502, 503 and 504. They wait 1 then 2 seconds, honoring `Retry-After` seconds or dates. A requested wait over 60 seconds stops the call. Authentication, validation and stored evaluation failures are not retried. Deletes and device-token exchanges are not automatically retried. Use the reconciliation rules above after an uncertain write. ## Current interfaces The website supports article submission, saved reports, report reading and deletion, plus sign-in, session management, API keys and device approval. The same evaluation operations are available through the API. Use the [CLI](/docs/cli), [Python SDK](/docs/python), or [TypeScript SDK](/docs/typescript) to call the hosted API with your account key. [Evaluate an article](/docs/quickstart#prepare-a-client-request) links installation and first-success examples. The [MCP guide](/docs/mcp) covers agent setup.