API v1

All /v1/* endpoints require Authorization: Bearer sls_.... Use HTTPS outside loopback. Create and revoke API keys from your browser dashboard at /app. A new key is shown once; its stored secret cannot be retrieved later. /health is an unauthenticated liveness endpoint, not a guarantee that the provider has credits.

Summarize text

POST /v1/summarize processes text up to 12,000 UTF-8 bytes synchronously. Use async jobs for larger inputs. Synchronous calls may take several provider requests; clients should allow several minutes or use jobs. If a persistent worker claims the same newly created durable job first, the synchronous endpoint returns HTTP 202 with its ID for polling.

curl --fail-with-body https://summarize.lawlesssolutions.us/v1/summarize \
  -H "Authorization: Bearer $SUMMARIZELS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"text":"Alice will deliver the revised plan on Friday. The launch remains on schedule.","length":"brief","style":"executive","extract":["key_points","action_items"]}'
FieldMeaning
textRequired nonempty Unicode string. Default maximum: 2,000,000 UTF-8 bytes per document.
lengthbrief (75), short (150), medium (350), detailed (750), exhaustive (1500); numbers are target words. Default medium.
target_wordsInteger 20–2000. Overrides the named length target. Actual length is always reported.
styleexecutive, bullet_points, narrative, plain_language, technical. Default executive.
extractOptional array: key_points, action_items, dates, people, organizations, locations, topics, keywords, decisions, questions, entities.
retentionstandard, temporary, or none. Cannot weaken the account policy. none requires the synchronous endpoint.
webhook_urlReserved; V1 responds 422 rather than claiming that notification is scheduled. No URL is fetched.

Unknown fields are rejected. Entity groups include people, organizations, and locations. Extractions share a uniform item shape; an item contains kind, text, nullable owner and deadline, sources, grounding, and nullable evidence. Source IDs and exact character offsets refer to the submitted Unicode text, not UTF-8 byte positions. Nullable fields distinguish missing information from inferred facts.

Durable asynchronous jobs

# Prepare request.json without embedding documents or keys in shell command history.
curl --fail-with-body https://summarize.lawlesssolutions.us/v1/jobs \
  -H "Authorization: Bearer $SUMMARIZELS_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: report-2026-10-05-v1' \
  --data-binary @request.json

curl --fail-with-body https://summarize.lawlesssolutions.us/v1/jobs/sum_REPLACE \
  -H "Authorization: Bearer $SUMMARIZELS_API_KEY"

Creation returns 202 with id, status, timestamps, usage, and estimated_cost_ceiling. Poll every five seconds. States: queued, processing, completed, failed. An unknown job or another account's job returns 404. All keys belonging to the same account can retrieve that account's jobs.

Use Idempotency-Key on POST to safely repeat creation after a lost HTTP response. It is scoped to the API key, 1–128 ASCII letters/digits/_.:-. Same key and payload returns the original job; a changed payload returns 409. Generated summaries and provider responses are never automatically posted to third parties.

Completed responses include:

{
  "id": "sum_example",
  "status": "completed",
  "summary": "The launch remains on schedule, with a revised plan due Friday.",
  "summary_words": 13,
  "target_words": 75,
  "style": "executive",
  "document": {"input_words": 16, "input_bytes": 94, "chunks": 1, "synthesis_levels": 1},
  "key_points": [],
  "action_items": [{
    "kind": "action_items", "text": "Deliver the revised plan", "owner": "Alice", "deadline": "Friday",
    "source": "chunk_1", "quote": "Alice will deliver the revised plan on Friday.",
    "sources": ["chunk_1"], "grounding": "quote_verified",
    "evidence": {"quote": "Alice will deliver the revised plan on Friday.", "start_char": 0, "end_char": 45}
  }],
  "sources": [{"id":"chunk_1","start_char":0,"end_char":94,"section":"","words":16}],
  "usage": {"input_tokens":600,"output_tokens":200,"estimated_cost":0.0002,"provider_reported_cost":0.0002,"cost_complete":true,"uncertain_calls":0,"currency":"USD","calls":[]},
  "duration_seconds": 5.2,
  "warnings": []
}

This is an illustrative shape, not a billing estimate or an exact-length guarantee. Real results include every model attempt in usage.calls. provider_reported_cost includes only provider-reported charges; estimated_cost also includes configured-rate estimates and conservative reservations for unknown outcomes. cost_complete=false means the service cannot honestly report a fully confirmed provider total. Token totals include only reported counts, with unknown attempts separately identified. Reconcile uncertain attempts with the provider's usage dashboard.

quote_verified proves that a quote exists in a known source chunk and survived the synthesis lineage. It does not certify semantic entailment or factual truth. Missing or invalid evidence yields grounding=unverified with no source references. Owners and deadlines are returned only when their exact text appears in the verified quote. Extraction selects salient items, capped at 16 per synthesis; it is not an exhaustive entity database.

GET /v1/usage returns the current key's request count and recorded usage totals. For complete cost/uncertainty information, use job-level usage. Expired/no-retention completed jobs retain status and usage but return result_expired=true.

Errors and limits

Errors use {"error":{"code":"...","message":"..."},"request_id":"req_..."}. Common statuses: 400 invalid input, 401 invalid/revoked key, 402 quota or cost ceiling, 404 unknown resource, 409 idempotency conflict, 413 oversized input, 415 non-JSON content type, 422 unsupported retention/webhook option, 429 rate limit, 502 terminal provider failure, 503 sync concurrency full.

Default limits per account: 30 HTTP requests/minute shared by all keys; 2 MB documents; 10 million reserved/reported tokens and $20 per UTC calendar month; $2 worst-case estimate per job. Estimates reserve every planned stage and both possible attempts, so they can considerably exceed actual cost. Large jobs may require an explicitly higher account allowance. Caps are enforced before admission and before each call. Existing reservations count against available monthly quota. Configure limits through the operator's account configuration, not an unauthenticated API.

Processing allowances

Self-service requests also have a processing allowance based on their input credits. HTTP 422 credit_cost_limit means the request was rejected before any credits were reserved; try a shorter target_words value or contact support. HTTP 503 processing_budget_unavailable means the shared or account processing budget is unavailable; retry later or contact support. These checks include pending work and provider costs from failed jobs. Adding credits does not bypass these limits. Credit units remain one per started 10,000 UTF-8 input bytes.

Browser workspace

Visit /signup to create your own customer account and /app to use the service without code. You can submit text, monitor jobs, retrieve recent results, download JSON, view credits, and create/revoke API keys. Save the recovery code shown once at signup; password recovery currently uses that code, not email. Session cookies are secure and HttpOnly. Browser POST requests require same-origin and CSRF validation.

Self-service accounts use one summary credit per started 10,000 UTF-8 input bytes. Credits are reserved atomically on both browser and API submissions and charged only on completion. Failures release the reservation. The initial short-document trial is one credit while capacity remains. Trial accounts accept 10 KB with a $0.10 internal provider reservation ceiling; paid accounts can be upgraded when Stripe purchase configuration is active. Existing operator-created accounts keep their previous quotas and are not silently converted.