API docs
The DeSlop API
Two endpoints. /v1/check runs text through the DeSlop engine alone: no AI, nothing stored. /v1/rewrite asks an AI for a rewrite, and the engine rejects any version that drops the numbers, names, or quotes it found in your text.
Quick start
- Sign in, open your workspace, and choose API keys.
- Create a key and copy it. We show it once, so put it straight into your server's secrets.
- Send some text:
curl https://api.deslopit.com/v1/check \
-H "Authorization: Bearer $DESLOP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "In today\u0027s fast-paced world, our new dashboard cut reporting time from 45 to 12 minutes. It is important to note that the team shipped it on Friday."}'You get the cleaned text back, with a list of what changed:
{
"engineVersion": "1.4.0",
"text": "Our new dashboard cut reporting time from 45 to 12 minutes. The team shipped it on Friday.",
"changeCount": 2,
"changes": [
{
"kind": "generic_phrase",
"before": "In today's fast-paced world, o",
"after": "O"
},
{
"kind": "generic_phrase",
"before": "It is important to note that t",
"after": "T"
}
],
"remainingFindingCount": 0
}Authentication
Send your key as a bearer token on every request:Authorization: Bearer dsk_live_…. Keys start withdsk_live_. The API is for server-to-server use, so never put a key in browser or mobile code.
You can have up to 5 active keys. A key uses the plan of the account that created it. Revoke a key in your workspace and requests using it fail with 401 straight away.
Every request and response is JSON. SendContent-Type: application/json. The base URL ishttps://api.deslopit.com.
POST /v1/check
Runs the deterministic DeSlop engine only. It cuts filler phrases and empty transitions, softens absolute claims, removes repeated sentences, fixes clear grammar, and applies your voice contract. No AI is involved, it doesn't use your plan's rewrite quota, and your text is never stored.
| Field | What it does |
|---|---|
text | Required. 1 to 20,000 characters. |
locale | Optional language tag, like en-US. |
protectedRanges | Optional. Up to 100 { start, end } character ranges the engine must leave alone. |
options | Optional switches, all on by default:fixClearGrammar, removeEmDashes,cutGenericPhrases, cutEmptyTransitions,softenAbsoluteClaims,removeRepeatedSentences. |
contract | Optional voice contract: banned terms, word swaps, sentence length, contractions, and tone. Same shape as the site's contract export. |
voiceProfile | Optional My Voice profile. Only derived style numbers, never sample text. |
The response is the example in the quick start.changes lists each edit with its kind(grammar, em_dash, generic_phrase,empty_transition, absolute_claim,repeated_sentence, voice,glossary, or contraction).remainingFindingCount counts issues the engine spotted but didn't fix on its own.
POST /v1/rewrite
Cleans the text with the engine, then asks an AI model for up to three rewrites. The engine compares each one with your text and rejects any version that drops a number, link, quote, name, or “not” it found. The best remaining version comes back. If none pass, you get the engine's cleanup instead and assist.status is fallback.
Takes the same text, locale, options,contract, and voiceProfile fields as a check, plus:
| Field | What it does |
|---|---|
tone | Optional: keep, warm, direct, or professional. |
variants | Optional. How many candidate rewrites to try, 1 to 3. DeSlop tries at most 2 at a time; larger values are treated as 2. |
contributionConsent | Required on Free-plan keys, rejected on Pro keys. The only value is "2026-09-09-v1". See Privacy. |
curl https://api.deslopit.com/v1/rewrite \
-H "Authorization: Bearer $DESLOP_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 7f1c2d9e-4b1a-4c8e-9f3d-2a6b5c4d3e21" \
-d '{
"text": "Our dashboard is truly a game changer. It cut reporting time from 45 to 12 minutes.",
"tone": "direct"
}'A trimmed response. Model output varies, so treat the text as an example:
{
"engineVersion": "1.4.0",
"text": "Our dashboard cut reporting time from 45 to 12 minutes.",
"changeCount": 1,
"changes": [ … ],
"remainingFindingCount": 0,
"assist": {
"requested": "auto",
"used": true,
"status": "used",
"reason": "DeSlop produced a meaning-preserving full rewrite for your review."
},
"variants": [
{
"text": "Our dashboard cut reporting time from 45 to 12 minutes.",
"reason": "…",
"model": "…",
"score": 94
}
],
"judge": { "candidates": 3, "accepted": 2, "chosenScore": 94 },
"usage": {
"tier": "pro",
"quota": {
"limit": 100,
"used": 1,
"remaining": 99,
"period": "utc_day",
"resetsAt": "2026-09-25T00:00:00.000Z"
},
"contribution": {
"enabled": true,
"required": false,
"noticeVersion": "2026-09-09-v1"
}
}
}assist.status is used when an AI rewrite passed,fallback when you got the engine's cleanup instead, andnot_needed when the text was already clean.usage shows what's left of today's quota.
Retries and Idempotency-Key
Send an Idempotency-Key header with a UUID you generate for each rewrite. If a network error makes you retry with the same key, we won't charge twice; the retry returns 409 DUPLICATE_REQUEST. Without the header, every request counts as a new rewrite.
Limits
- Every key: 60 requests a minute across both endpoints. Responses carry
x-ratelimit-limit,x-ratelimit-remaining, andx-ratelimit-reset. - Checks: 5,000 per key each UTC day. Checks can run in parallel.
- Rewrites: share your plan's daily quota with the website: 10 a day on Free, 100 a day on Pro. The count resets at 00:00 UTC.
- One rewrite at a time per account. A second
/v1/rewritecall while one is running, from any of your keys, gets409 REWRITE_IN_PROGRESS. Queue your rewrites. - Only a finished, changed rewrite counts. Fallbacks and unchanged results are refunded.
- Text can be up to 20,000 characters.
See pricing for the plans.
Errors
Errors come back with an HTTP status and a stable code:
{
"error": {
"code": "INVALID_API_KEY",
"message": "…"
}
}| Status | Code | Meaning |
|---|---|---|
| 401 | INVALID_ | The key is missing, unknown, or revoked. |
| 429 | RATE_ | Over 60 requests a minute on this key. Wait for the retry-after seconds. |
| 429 | CHECK_ | This key has used its 5,000 checks for today. Resets at 00:00 UTC. |
| 429 | FREE_ | The Free plan's 10 rewrites for today are used. Resets at 00:00 UTC. |
| 429 | PRO_ | The Pro plan's 100 rewrites for today are used. Resets at 00:00 UTC. |
| 409 | DUPLICATE_ | That Idempotency-Key was already used. Send a new one for a new rewrite. |
| 409 | REWRITE_ | Another rewrite on this account is still running. Queue rewrites and retry when it finishes. |
| 428 | CONTRIBUTION_ | A Free-plan rewrite was sent without contributionConsent. |
| 400 | CONTRIBUTION_ | A Pro key sent contributionConsent. Pro text is never kept. |
| 400 | INVALID_ | The body is missing a field or has a bad value. |
| 413 | PAYLOAD_ | The request body is too big. |
| 415 | UNSUPPORTED_ | Content-Type isn't application/json. |
Build on the code, not the message. We may reword messages.
Privacy
- Text sent to the API is processed in memory and never logged.
/v1/checknever stores your text.- On a Free-plan key, a rewrite needs
contributionConsent. That text and its result are kept for 30 days after submission to improve DeSlop. It's the same agreement as free rewrites on the site. - Text sent with a Pro key is never kept, and Pro keys can't opt in.
- Rewrites go through OpenRouter to the model provider, the same as on the site.
- We store your key only as a SHA-256 hash. Alongside it we keep the name, the last four characters, your account's user ID, and when you created it.
The privacy policy andterms have the full details.