API.
Score texts for AI authorship with our models on dedicated GPUs. Every call needs an API key from your dashboard; scoring also needs an active deslop Cloud subscription. Machine-readable: OpenAPI 3.1.
deslop Cloud isn't open yet: API keys work for beta accounts only. Join the waitlist.
POST /v1/detect
Score texts for AI authorship
Send one text as text or up to 32 as texts; each may be up to 20,000 characters. Inputs of about 100 words or more score most reliably. Needs an active deslop Cloud subscription.
curl https://deslop.lunarly.dev/v1/detect \
-H "Authorization: Bearer $DESLOP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"texts": ["First comment ...", "Second comment ..."]}'
Optionally say who wrote each text: send objects instead of strings. Every author field but site is optional; send whatever the site shows. With one text, put author next to it.
{
"texts": [
{
"text": "First comment ...",
"author": {
"site": "reddit",
"username": "some_user",
"url": "https://www.reddit.com/user/some_user"
}
},
{
"text": "Second comment ...",
"author": {"site": "x", "username": "someone", "id": "1234567"}
},
"a text with no author"
]
}
Request body
| Field | Type | Description |
|---|---|---|
texts |
array of string or object | Up to 32 texts, each a string or an object with its author. Results come back in the same order. |
texts[].text * |
string | The text, up to 20,000 characters. |
texts[].author |
object | Who wrote it (optional). Authors don't change scores or billing. |
texts[].author.site * |
string | The site the text is from, e.g. reddit, x, youtube, hn. |
texts[].author.username |
string | The author's handle. Compared case-insensitively; @name and u/name match name. |
texts[].author.id |
string | The site's stable account id, when it shows one. The most stable identity wins: id, then username, then url. |
texts[].author.url |
string | The author's profile URL. |
text |
string | Or one text to score. Send either texts or text. |
author |
object | Who wrote text (optional). Same fields as texts[].author. |
* required
Response
{
"model": "deslop-v1",
"results": [
{
"ai_probability": 0.97, "label": "ai", "score": 2.41, "n_tokens": 182,
"truncated": false, "cached": false,
"author": {"posts": 20, "flagged": 18}
},
{
"ai_probability": 0.04, "label": "human", "score": -1.03,
"n_tokens": 96, "truncated": false, "cached": true
},
{
"ai_probability": 0.12, "label": "human", "score": -0.6,
"n_tokens": 41, "truncated": false, "cached": false
}
],
"usage": {
"chars": 1840, "month_chars": 120400, "quota_chars": 30000000,
"remaining_chars": 29879600, "period_start": "2026-11-01T00:00:00Z"
}
}
| Field | Type | Description |
|---|---|---|
model |
string | The version of our model that scored the texts. We pick the model; when we upgrade it, this changes. |
results |
array of object | One result per text, in the order sent. |
results[].ai_probability |
number | How likely the text is AI-written, 0..1. Calibrated so 0.5 is the model's decision threshold, set to flag about 1% of human text: raise your cut-off to hide less. |
results[].label |
string: ai, human | ai when ai_probability > 0.5, else human. |
results[].score |
number | The model's raw score, for setting your own threshold. |
results[].n_tokens |
integer | Tokens the model read. |
results[].truncated |
boolean | True when the text was longer than the model reads and only its beginning was scored. |
results[].cached |
boolean | The score was computed earlier for the exact same text and reused. Texts are never stored; scores are kept for 30 days under a SHA-256 fingerprint of the text. |
results[].author |
object | The author's shared reputation; only when you sent an author. |
results[].author.posts |
integer | Posts by this author checked by any deslop Cloud user in the last 12 months, each counted once, including this request. |
results[].author.flagged |
integer | How many of those were flagged as AI. |
usage |
object | Your usage, including this request. |
usage.chars |
integer | Characters (Unicode code points) this request counted; 0 in /v1/usage. |
usage.month_chars |
integer | Characters used this calendar month (UTC). |
usage.quota_chars |
integer or null | This month's quota in characters; null when unlimited. |
usage.remaining_chars |
integer or null | Characters left this month; null when unlimited. |
usage.period_start |
timestamp | When the current usage month started (UTC). |
usage.month_texts |
integer | Texts scored this month (in /v1/usage). |
usage.month_requests |
integer | Successful detection requests this month (in /v1/usage). |
Usage counts the characters you send, once per successful request, cached or not. Failed requests count nothing.
If no GPU worker is online you get 503 at once; a busy GPU may take up to a minute.
Errors
| Status | Code | When |
|---|---|---|
| 400 | bad_request | Malformed body, no text, an empty text, too many or too long texts, or an author without a valid site. |
| 401 | unauthenticated | Missing, invalid or revoked API key. |
| 402 | subscription_required | No active subscription (or beta access) on the key's account. |
| 429 | rate_limited | More requests a minute than your plan allows (Basic 120, Plus 300, Pro 600). Retry shortly. |
| 429 | quota_exceeded | The request would exceed this month's quota. Upgrade your plan in the dashboard, or wait for the 1st (UTC). |
| 503 | unavailable | No GPU worker is online, or none answered in time. Nothing was counted; retry later. |
GET /v1/usage
This month's usage
This month's usage and quota, whether the subscription is active, and which plan's limits apply.
curl https://deslop.lunarly.dev/v1/usage \ -H "Authorization: Bearer $DESLOP_API_KEY"
Response
{
"subscription": "active",
"active": true,
"beta": false,
"plan": "basic",
"usage": {
"chars": 0, "month_chars": 120400, "quota_chars": 30000000,
"remaining_chars": 29879600, "period_start": "2026-11-01T00:00:00Z",
"month_texts": 64, "month_requests": 31
}
}
| Field | Type | Description |
|---|---|---|
subscription |
string: none, active, trialing, past_due, paused, canceled | The subscription's status; none if the account never subscribed. |
active |
boolean | Whether /v1/detect is allowed. |
beta |
boolean | Whether the account has beta access: the API works without a subscription, on the basic plan's limits. |
plan |
string: basic, plus, pro or null | The plan whose limits apply now; null without access. |
usage |
object | This month's usage. |
usage.chars |
integer | Characters (Unicode code points) this request counted; 0 in /v1/usage. |
usage.month_chars |
integer | Characters used this calendar month (UTC). |
usage.quota_chars |
integer or null | This month's quota in characters; null when unlimited. |
usage.remaining_chars |
integer or null | Characters left this month; null when unlimited. |
usage.period_start |
timestamp | When the current usage month started (UTC). |
usage.month_texts |
integer | Texts scored this month (in /v1/usage). |
usage.month_requests |
integer | Successful detection requests this month (in /v1/usage). |
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthenticated | Missing, invalid or revoked API key. |
GET /v1/me
The key's account and subscription
Who the API key belongs to and the state of their deslop Cloud subscription and plan. Works without a subscription, so an app can show the account it's connected to and send the user to subscribe.
curl https://deslop.lunarly.dev/v1/me \ -H "Authorization: Bearer $DESLOP_API_KEY"
Response
{
"account": {"name": "Ada Lovelace", "email": "[email protected]"},
"subscription": {
"status": "active",
"active": true,
"beta": false,
"plan": {
"id": "basic", "name": "Basic", "price_cents": 199,
"monthly_chars": 30000000, "requests_per_minute": 120
},
"next_plan": null,
"renews_at": "2026-12-14T09:30:00Z",
"ends_at": null,
"manage_url": "https://deslop.lunarly.dev/dashboard"
}
}
| Field | Type | Description |
|---|---|---|
account |
object | The account the API key belongs to. |
account.name |
string | Display name from the sign-in provider (the email address when it sent none). |
account.email |
string | Email address from the sign-in provider. |
subscription |
object | The account's deslop Cloud subscription. |
subscription.status |
string: none, active, trialing, past_due, paused, canceled | none if the account never subscribed; otherwise the subscription's status. |
subscription.active |
boolean | Whether /v1/detect is allowed: with beta access, or a subscription that is active, trialing or past_due (while the payment is retried). |
subscription.beta |
boolean | Whether the account has beta access: the API works without a subscription, on the basic plan's limits. |
subscription.plan |
object or null | The plan in force now; null without access. |
subscription.plan.id |
string: basic, plus, pro | The plan's id. |
subscription.plan.name |
string | The plan's name. |
subscription.plan.price_cents |
integer | Monthly price in US cents, before taxes (699 = $6.99). |
subscription.plan.monthly_chars |
integer or null | Characters included per calendar month (UTC); null when unlimited. |
subscription.plan.requests_per_minute |
integer | Detection requests allowed per minute. |
subscription.next_plan |
object or null | The plan the subscription renews on when a downgrade is scheduled (the current plan stays until renews_at); else null. Same fields as subscription.plan. |
subscription.renews_at |
timestamp or null | When the subscription renews next; null when it won't renew. |
subscription.ends_at |
timestamp or null | When access ends, for a subscription that is canceled or set to cancel; else null. |
subscription.manage_url |
string | Where the user subscribes, changes plan or manages billing: their dashboard. |
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthenticated | Missing, invalid or revoked API key. |
POST /v1/connect/token
Connect an app: exchange a code for an API key
How the deslop extension's Connect button gets a key without copy and paste (OAuth 2.0 authorization code with PKCE). The app opens https://deslop.lunarly.dev/connect?client=chrome&redirect_uri=…&code_challenge=…&code_challenge_method=S256&state=… in a browser window; the user signs in and approves, and the site redirects to redirect_uri with code and state (or error=access_denied). The app then posts the code here with its PKCE verifier and gets a new API key. Only redirect URIs of the deslop extension are accepted.
curl https://deslop.lunarly.dev/v1/connect/token \
-H "Content-Type: application/json" \
-d '{
"code": "q2Vt0Z…",
"code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",
"redirect_uri": "https://abcdefghijklmnopabcdefghijklmn.chromiumapp.org/"
}'
Request body
| Field | Type | Description |
|---|---|---|
code * |
string | The one-time code /connect sent to your redirect URI. |
code_verifier * |
string | The PKCE verifier whose S256 challenge you sent to /connect (43 to 128 characters). |
redirect_uri * |
string | The same redirect_uri you sent to /connect. |
* required
Response
{"api_key": "dsl_1a2b3c4d_…", "name": "Chrome extension · 27 Nov 2026"}
| Field | Type | Description |
|---|---|---|
api_key |
string | A new API key for the account that approved the connection. Store it; it isn't shown again. |
name |
string | The key's name in the dashboard, e.g. 'Chrome extension · 27 Nov 2026'. |
A code works once, for 2 minutes; a failed exchange uses it up too. Connecting works without a subscription: /v1/me tells the app whether there is one.
Errors
| Status | Code | When |
|---|---|---|
| 400 | bad_request | Malformed body, or the code is invalid, expired, already used, or doesn't match the verifier or redirect_uri. |
| 409 | conflict | The account already has the most active API keys allowed; revoke one in the dashboard. |
| 429 | rate_limited | Too many code exchanges from this address. Wait for the number of seconds in the Retry-After header. |
Errors
Errors are JSON with a stable code and a readable message: {"error": {"code": "...", "message": "..."}}. Each endpoint above lists the ones it returns.
In the extension
In deslop's settings open Detectors → + Add detector → Custom HTTP (JSON) and set:
| POST URL | https://deslop.lunarly.dev/v1/detect |
|---|---|
| Headers (JSON) | {"Authorization": "Bearer dsl_…"} |
| Body template | {"text": {{text}}} (the default) |
| Probability path | results[0].ai_probability |
| Value means | P(AI), 0..1 |
Then make it the current detector from the toolbar popup.