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

  1. Sign in, open your workspace, and choose API keys.
  2. Create a key and copy it. We show it once, so put it straight into your server's secrets.
  3. 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.

Check request fields
FieldWhat it does
textRequired. 1 to 20,000 characters.
localeOptional language tag, like en-US.
protectedRangesOptional. Up to 100 { start, end } character ranges the engine must leave alone.
optionsOptional switches, all on by default:fixClearGrammar, removeEmDashes,cutGenericPhrases, cutEmptyTransitions,softenAbsoluteClaims,removeRepeatedSentences.
contractOptional voice contract: banned terms, word swaps, sentence length, contractions, and tone. Same shape as the site's contract export.
voiceProfileOptional 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:

Extra rewrite request fields
FieldWhat it does
toneOptional: keep, warm, direct, or professional.
variantsOptional. How many candidate rewrites to try, 1 to 3. DeSlop tries at most 2 at a time; larger values are treated as 2.
contributionConsentRequired 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

See pricing for the plans.

Errors

Errors come back with an HTTP status and a stable code:

{
  "error": {
    "code": "INVALID_API_KEY",
    "message": "…"
  }
}
StatusCodeMeaning
401INVALID_API_KEYThe key is missing, unknown, or revoked.
429RATE_LIMITEDOver 60 requests a minute on this key. Wait for the retry-after seconds.
429CHECK_LIMIT_REACHEDThis key has used its 5,000 checks for today. Resets at 00:00 UTC.
429FREE_LIMIT_REACHEDThe Free plan's 10 rewrites for today are used. Resets at 00:00 UTC.
429PRO_LIMIT_REACHEDThe Pro plan's 100 rewrites for today are used. Resets at 00:00 UTC.
409DUPLICATE_REQUESTThat Idempotency-Key was already used. Send a new one for a new rewrite.
409REWRITE_IN_PROGRESSAnother rewrite on this account is still running. Queue rewrites and retry when it finishes.
428CONTRIBUTION_AGREEMENT_REQUIREDA Free-plan rewrite was sent without contributionConsent.
400CONTRIBUTION_NOT_ALLOWEDA Pro key sent contributionConsent. Pro text is never kept.
400INVALID_REQUESTThe body is missing a field or has a bad value.
413PAYLOAD_TOO_LARGEThe request body is too big.
415UNSUPPORTED_MEDIA_TYPEContent-Type isn't application/json.

Build on the code, not the message. We may reword messages.

Privacy

The privacy policy andterms have the full details.