Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: ScanForAI Cleanup API
description: 'Detect AI-written text and clean it up. Public endpoints: **scan** a document for AI-writing signals, and **cleanup** (strip machine typography, no rewriting). Authenticate with an `at_sk_` API key: `Authorization: Bearer `. The score is a signal, not a verdict.'
version: '1'
tags:
- name: Cleanup
paths:
/api/cleanup:
post:
tags:
- Cleanup
summary: Cleanup
operationId: cleanup_api_cleanup_post
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
parameters:
- $ref: '#/components/parameters/XUILang'
- $ref: '#/components/parameters/LangQuery'
get:
tags:
- Cleanup
summary: List Items
operationId: list_items_api_cleanup_get
parameters:
- name: limit
in: query
required: false
schema:
type: integer
default: 50
title: Limit
- name: offset
in: query
required: false
schema:
type: integer
default: 0
title: Offset
- $ref: '#/components/parameters/XUILang'
- $ref: '#/components/parameters/LangQuery'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
headers:
Content-Language:
description: Language of `message`; sent only when the request named a language.
schema:
type: string
delete:
tags:
- Cleanup
summary: Delete All
operationId: delete_all_api_cleanup_delete
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
parameters:
- $ref: '#/components/parameters/XUILang'
- $ref: '#/components/parameters/LangQuery'
/api/cleanup/file:
post:
tags:
- Cleanup
summary: Cleanup File
description: 'Clean an uploaded document IN PLACE and stream the cleaned file back — .docx
and .odt keep their full structure/formatting; .pdf degrades to cleaned .txt.
This is the fix for ''cleaned file comes back as broken plain text''.'
operationId: cleanup_file_api_cleanup_file_post
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
parameters:
- $ref: '#/components/parameters/XUILang'
- $ref: '#/components/parameters/LangQuery'
/api/cleanup/{hid}:
get:
tags:
- Cleanup
summary: Get Item
operationId: get_item_api_cleanup__hid__get
parameters:
- name: hid
in: path
required: true
schema:
type: string
title: Hid
- $ref: '#/components/parameters/XUILang'
- $ref: '#/components/parameters/LangQuery'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
headers:
Content-Language:
description: Language of `message`; sent only when the request named a language.
schema:
type: string
delete:
tags:
- Cleanup
summary: Delete Item
operationId: delete_item_api_cleanup__hid__delete
parameters:
- name: hid
in: path
required: true
schema:
type: string
title: Hid
- $ref: '#/components/parameters/XUILang'
- $ref: '#/components/parameters/LangQuery'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
headers:
Content-Language:
description: Language of `message`; sent only when the request named a language.
schema:
type: string
components:
parameters:
XUILang:
name: X-UI-Lang
in: header
required: false
description: Language of the answer's `message` fields (a language code such as `en` or `es`; only the part before any `-` is used). Without it, the answer is English as always and error bodies carry no `message`.
schema:
type: string
maxLength: 16
LangQuery:
name: lang
in: query
required: false
description: The same as the `X-UI-Lang` header, for requests a browser makes without custom headers. If both are sent, `lang` wins.
schema:
type: string
maxLength: 16
schemas:
ErrorBody:
type: object
required:
- detail
- code
- params
properties:
detail:
description: The error in English, exactly as it has always read. A list of field problems for status 422.
anyOf:
- type: string
- type: array
items:
type: object
code:
type: string
description: Stable identifier of the error, for programs. Never changes wording.
example: err.rate_limit.scan
params:
type: object
additionalProperties: true
description: The values the error is about (for example the seconds to wait as `retry`).
message:
type: string
description: The error in the language the request named. Present only when it named one.