Developers
Lev-Al Prose API for developers
A paid-plan API built on the same editing, MeaningLock verification and Passport signing that Workspace uses. Submitted and edited text are not stored in the application database or application-authored logs. Gateway and provider non-retention has not been independently verified; see our Privacy and Data Handling policy.
Download OpenAPI 3.1 (openapi.json)Authentication
- With an active paid plan, create an integration key in your account. It is shown once; we store only a hash.
- Give the key only the scopes it needs. Revoked keys stop working immediately.
- Send it as
Authorization: Bearer lvp_…. Never put a key in a URL — such requests are refused.
Scopes: contract:createedit:runverify:rundocument:runpassport:createpassport:verify
Base URL: https://levalprose.com/api/v1. All endpoints accept POST with a JSON body. Rate limit: 30 requests per minute per key.
Endpoints
| Endpoint | Scope | What it does |
|---|---|---|
| POST /contracts | contract:create | Build a MeaningLock contract. No words deducted. |
| POST /edits | edit:run | Edit one passage (1–500 words) into three revisions, each verified. |
| POST /verifications | verify:run | Verify a revision against its source. No words deducted. |
| POST /documents | document:run | Edit pasted text up to 5,000 words in 500-word sections. Pasted text only — no .docx. |
| POST /passports | passport:create | Sign a Fidelity Passport from a server receipt for a fully verified revision. No words deducted. |
| POST /passports/verify | passport:verify | Check a Passport's Ed25519 signature. No words deducted. |
Modes
faithful(default) — natural length; no padding toward the source count.exact_length— exacttarget_words(defaults to the input count), or Review required.tighten— shorter (max_wordsorreduction_percent) without removing locked meaning, or Review required.
Accounting
- Only
/editsand/documentsuse words. Both need anIdempotency-Keyheader. - The original input word count is deducted once, only after success. Failed runs are refunded in full.
- Reusing an Idempotency-Key never deducts twice; results are not stored in the application database, so use a new key to run again.
- Monthly words are used before Extra Words. The free passage cannot be used through the API.
Verification and Passports
/verificationsuses the same independent meaning review as Workspace. If that review is unavailable, the verdict is Review required, never Preserved.- Every
/edits,/verificationsand/documentsrevision carries a serverreceipt. To sign, send the source, the revision and that receipt to/passports; the server re-checks everything and never signs self-declared statuses. An edited revision needs a fresh/verificationscall first. - Only revisions where every check is verified can be signed. Failed or Review required revisions are never signed.
- A valid signature confirms the Passport is authentic and unaltered. It does not prove the source facts are true or prove authorship.
- A Passport holds counts, statuses and salted digests — no passage text. Public key: /.well-known/lev-al-passport-key.json.
Integrations: what is available
- REST API — available now on paid plans, as documented on this page.
- MCP server — available now at
https://levalprose.com/mcp(JSON-RPC over HTTP). Send your integration key asAuthorization: Bearer lvp_…; it uses the same scopes, limits and accounting as the REST API. - Microsoft Word, Google Docs and Overleaf — development builds only. They are not listed in Microsoft AppSource, Google Workspace Marketplace or the Chrome Web Store, and are not publicly installable yet. Until they are, use the REST API or MCP, or paste text into the Workspace.
Errors
Errors return { "error": { "code": "…", "message": "…" } } with no prompts, stack traces or secrets.
| 401 | unauthenticated | Missing, malformed, invalid or revoked key. |
| 400 | key_in_url | A key was sent in the URL. Revoke it and create a new one. |
| 403 | insufficient_scope | The key lacks this endpoint's scope. |
| 402 | plan_inactive | No active paid plan. The free passage cannot use the API. |
| 402 | insufficient_allowance | Not enough words left. Nothing was deducted. |
| 429 | rate_limited | More than 30 requests per minute for this key. |
| 400 | invalid_input / invalid_json / idempotency_key_required | The request is malformed. |
| 422 | too_long / invalid_document / not_verified | Input over the limit, or a revision that cannot be signed. |
| 415 | pasted_text_only | The documents endpoint needs a JSON "text" field. |
| 409 | idempotency_replayed / request_in_progress | Same Idempotency-Key reused. Nothing was deducted again. |
Examples (synthetic text)
Requests only. Responses follow the schemas in openapi.json.
Edit a passage
curl -X POST https://levalprose.com/api/v1/edits \
-H "Authorization: Bearer $LEVAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: edit-2026-10-22-0001" \
-d '{
"mode": "faithful",
"text": "The pilot program may reduce wait times by 12% (Rivera, 2024), but the sample was small."
}'Verify a revision
curl -X POST https://levalprose.com/api/v1/verifications \
-H "Authorization: Bearer $LEVAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "exact_length",
"source": "The results do not support a causal link.",
"revision": "The findings do not establish a causal link."
}'Edit pasted document text
curl -X POST https://levalprose.com/api/v1/documents \
-H "Authorization: Bearer $LEVAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: doc-2026-10-22-0001" \
-d '{ "mode": "tighten", "reduction_percent": 15, "text": "First paragraph...\n\nSecond paragraph..." }'Verify a Passport
curl -X POST https://levalprose.com/api/v1/passports/verify \
-H "Authorization: Bearer $LEVAL_API_KEY" \
-H "Content-Type: application/json" \
-d @passport.json