API reference
The API reviews articles and stores reports for the signed-in account. Read checks and findings and evaluate an article before using this reference.
Base URL: https://readlint.com. The downloadable client OpenAPI contract describes the evaluation routes. Evaluation routes accept an API key as a bearer token or a browser session. The device routes create and exchange a device authorization request.
- 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.
- 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.
- GET
/v1/evaluations/{evaluation_id} to read it again. This returns 200 for every saved state, so check status.
- GET
/v1/evaluations to list unexpired reports. Follow next_offset until null.
- 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 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.
Device Code
Request body (required):
- application/x-www-form-urlencoded: Body_createDeviceCode
| HTTP | Response |
|---|
| 200 | Successful Response: DeviceCodeResponse |
| 400 | Bad Request: OAuthError |
Device Token
Request body (required):
- application/x-www-form-urlencoded: Body_createDeviceToken
| HTTP | Response |
|---|
| 200 | Successful Response: DeviceTokenResponse |
| 400 | Bad Request: OAuthError |
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 |
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 |
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 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 |
| Field | Required | Schema |
|---|
| client_id | yes | string; const: readlint-cli |
| hostname | no | string; default: ; maxLength: 200 |
| os | no | string; default: ; maxLength: 100 |
| Field | Required | Schema |
|---|
| client_id | yes | string; maxLength: 40 |
| device_code | yes | string; maxLength: 100 |
| grant_type | yes | string; maxLength: 100 |
| Field | Required | Schema |
|---|
| check | yes | string |
| group | yes | string |
| problem_probability | yes | number |
| verdict | yes | string; enum: ["clear","unsure","finding"] |
| 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 |
| Field | Required | Schema |
|---|
| access_token | yes | string |
| expires_in | yes | integer |
| token_type | no | string; default: Bearer |
| Field | Required | Schema |
|---|
| code | yes | string |
| Field | Required | Schema |
|---|
| detail | yes | ErrorDetail |
| Field | Required | Schema |
|---|
| items | yes | EvaluationSummary[] |
| next_offset | yes | integer or null |
| 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 |
| Field | Required | Schema |
|---|
| article | yes | string; minLength: 1; Markdown or MDX source |
| description | no | string; default: |
| title | no | string or null |
| 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 |
| 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 |
| Field | Required | Schema |
|---|
| detail | no | ValidationError[] |
| Field | Required | Schema |
|---|
| location | yes | string or integer[] |
| type | yes | string |
| Field | Required | Schema |
|---|
| error | yes | string |
| Field | Required | Schema |
|---|
| block | yes | integer or null |
| phrase | yes | string |
| where | yes | string |
| 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[] |
| Field | Required | Schema |
|---|
| code | yes | string |
| fields | no | InvalidField[] or null |
| Field | Required | Schema |
|---|
| ctx | no | object |
| input | no | object |
| loc | yes | string or integer[] |
| msg | yes | string |
| type | yes | string |
| Field | Required | Schema |
|---|
| detail | yes | ValidationDetail |