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 request small edits 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 $9 of usage credits before any tax. 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.005'   --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.005. 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

{"provider":"mixed","max_calls":4,"semantic_review":false}

This quotes an upper bound using the maximum supported input size for every call. Actual calls are usually smaller. Quotes do not hold funds. For a standalone review or voice-profile import, use max_calls:0 and semantic_review:true, with the intended provider.

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 costs only $0.005. Each accepted patch changes a small original span; the server assembles the result.

Read accepted, validation, rewrite_gate and micro_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. Earlier provider calls can still be charged if a later call reaches the cap.
409A changed request reused a key, or the original is still running. For running jobs, retry the identical request/key after a delay. A stalled hold needs the owner; do not create another job.
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. A new key is a new paid attempt and needs a fresh spending decision.

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.