Unslop APIv1.3.0

Use Unslop from an agent

You can create a workspace and get a key over HTTP. A human pays for credits. After that, your agent can check drafts and edit complete drafts within its spending limit.

Short machine-readable guide | OpenAPI schemas | Live pricing and checkout status

1. Create a workspace

Call this only when your operator has authorized an account. Use a password manager or secret store for the credentials. No email address or browser is required.

POST /agent/register
Content-Type: application/json

{"username":"my_writing_agent","password":"REPLACE_WITH_A_LONG_RANDOM_PASSWORD","agree":true}

The response contains api_key and recovery_code. Save them now. Usernames use 3–32 lowercase letters, digits or underscores and start with a letter. Passwords use 15–128 characters. agree:true accepts the account notes and pricing and data terms.

If signup succeeded but the response was lost, POST /agent/token with the same username and password returns replacement credentials. This revokes the previous key and recovery code. Routine API requests need only the key.

2. Let a human add credits

Read GET /pricing.json first. When checkout_available is false, checkout has not been activated. Account creation and public docs still work.

POST /v1/billing/checkout
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Idempotency-Key: UNIQUE_CHECKOUT_ID_16_CHARS_MIN

{"amount_usd":10}

Send the returned checkout_url to the person paying for this workspace. The $10 purchase adds $10 of usage credits before any tax. The minimum top-up is $4; $4, $10, $25 and $50 purchases are available. The human reviews and submits Stripe checkout. There are no automatic top-ups. A redirect back to the site is not proof of payment. Check GET /v1/billing/balance after the webhook credits the account.

3. Check a draft

curl https://unslopapi.vercel.app/v1/analyze   -H "Authorization: Bearer $UNSLOP_API_KEY"   -H 'Content-Type: application/json'   -H 'Idempotency-Key: analysis-job-00000001'   -H 'X-Max-Cost-USD: 0.00575'   --data '{"text":"Paste your draft here.","include":["score","quality","explain"]}'

Each new request needs a new idempotency key. Keep the same key and exact request for retries. With prepaid billing enabled, deterministic requests cost $0.00575. GET requests and billing routes have no usage charge, but still count toward rate limits.

4. Quote and edit

POST /v1/billing/quote
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{"mode":"document","model_level":"medium","retry_on_failure":true}

This quotes an upper bound using the maximum supported input size for every call. Actual calls are usually smaller. Quotes do not hold funds. Set model_level to low, medium, high or max, and use the same level for the AI request. Medium is the default. For a standalone review or voice-profile import, use mode:"micro", max_calls:0 and semantic_review:true.

Choose a X-Max-Cost-USD cap your operator has approved, up to $10, then call POST /v1/rewrite using the rewrite example. You need that full amount available while the request runs. The original is scored before any model call. A gate skip or rewrite with no accepted edits costs nothing. Document mode edits the whole draft, checks meaning and permits one correction attempt.

Read accepted, validation, rewrite_gate and document_editing. Do not replace a file when constraints fail. X-Billed-Micro-USD reports the charge in millionths of a US dollar. Reading targets support ages 6–18 and custom grades, with the limits explained in the API guide.

Handle retries without spending twice

StatusAction
402Read the error code. Add credits through the human or change an authorized budget. A failed request costs nothing, even when earlier model calls completed.
409A changed request reused a key, or the original is still running. For running jobs, retry the identical request/key after a delay. Interrupted holds expire after ten minutes and are released on the next balance check or processing request.
410The response cache expired. The service will not execute that key again during its 24-hour idempotency window.
428Add the missing idempotency, budget or profile revision header.
429Wait for the minute or UTC daily quota reset. Do not loop.
502 / 503Retry the same key to retrieve the saved failure. Failures cost nothing. A new key runs a new attempt and can charge if it returns a result.

Idempotency protects paid processing requests for 24 hours. Up to five response bodies are cached for one hour. Older responses may be evicted earlier; charge records remain. API keys and passwords never belong in URLs or logs.

Discovery and limits

The site publishes a sitemap, crawler rules, OpenAPI, llms.txt and a small discovery manifest. The manifest is Unslop's own format. These help agents read the service; they do not guarantee a search ranking or inclusion in any agent directory.

Scores describe writing patterns. They cannot prove who wrote a draft or certify watermark removal. See the research notes before using scores to make decisions about people.