- Sign in with GitHub or Google in the editor.
- Open the API & Usage panel and issue a key (format: lena_sk_…).
- Copy it immediately — only a short display prefix is ever shown again.
Production hub
Docs, evidence snapshot, and release history.
A public operations hub for the compiler pipeline, current evidence, API contracts, and shipped release history.
Docs
Developer API guide
Issue a key in the editor, call the HTTP API, or connect your agent over MCP — one key, one shared quota, the same honest verified-subset contract everywhere.
One key, two surfaces: the HTTP API and the MCP server expose the same conversion over a machine-verified construct subset, with the same shared daily quota. Where a construct has no verified route, results report an honest gap instead of inventing output.
Step 1
Get an API key
Keys are issued in the editor and shown exactly once — store yours in a secret manager. Rotating or revoking a key takes effect immediately on both the HTTP API and the MCP server.
Step 2
REST quickstart
POST your source to /api/v1/convert with the key in the x-lena-api-key header. The response separates what is verified from what is not: read status and gaps before using text.
The full request/response contract — every status value, error shape, and field — is pinned in the OpenAPI document below. The response carries schemaVersion so future envelope changes are explicit, never silent.
/api/openapi.jsoncurl -X POST https://www.lenacode.com/api/v1/convert \
-H "x-lena-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"sourceLanguage": "python",
"targetLanguage": "javascript",
"code": "def add(a, b):\n return a + b"
}'{
"schemaVersion": "1.0",
"ok": true,
"status": "converted", // or: partial | no-verified-route | ...
"sourceLanguage": "python",
"targetLanguage": "javascript",
"text": "...", // set ONLY when conversion is complete
"fragments": [ { "facetKey": "...", "text": "...", "verified": true } ],
"gaps": [ { "facetKey": "...", "reason": "...", "message": "..." } ],
"verification": { "inputLaw": "pass", "outputAdapters": "verified-direct-only", ... },
"requestId": "..."
}Anything listed under gaps means the result is not safe to apply as-is. text is null unless every construct in your input had a verified route.
Step 3
Connect over MCP
The MCP server (streamable HTTP) gives agents the same conversion plus discovery tools. It is read/transform only: no tool edits files, applies patches, or executes code — applying results is always the caller’s decision.
Recommended call order: lena_list_languages → lena_check_route → lena_transform. Discovery tools are free; only submitting source code consumes the shared daily quota.
claude mcp add --transport http lena-code https://www.lenacode.com/api/mcp \
--header "Authorization: Bearer YOUR_KEY"{
"mcpServers": {
"lena-code": {
"url": "https://www.lenacode.com/api/mcp",
"headers": { "Authorization": "Bearer YOUR_KEY" }
}
}
}| Tool | Quota | What it does |
|---|---|---|
| lena_list_languages | Free | Canonical language ids, accepted aliases, per-language verified counts. Call this first — never guess ids. |
| lena_check_route | Free | Pre-flight for a source/target pair: verified construct-route count without spending quota or source tokens. |
| lena_transform | Counts | The conversion itself. Read status, fragments, gaps, and guidance — text is set only when conversion is complete. |
| lena_transform_batch | Counts | Multiple conversions in one call; each item consumes quota individually. |
| lena_get_coverage | Free | Aggregate verified-coverage numbers. |
| lena_get_language_coverage | Free | Verified-coverage numbers for one language. |
Metering
Quotas & plans
API and MCP conversions draw from one shared daily pool per key. Editor conversions are metered separately. Quotas reset at UTC midnight.
Plans & pricing| Plan | API + MCP / day (shared) | Price |
|---|---|---|
| free | 25 | $0/mo |
| pro | 1,000 | $5/mo |
| max | 5,000 | $15/mo |
Per-request input limit: 256 KB UTF-8; binary content is rejected. Rate limiting applies on top of daily quotas — exceeded requests return 429 with a retry-after header.
Contract
Errors & limits
Errors are JSON with a stable code and a requestId you can quote to support. The same key and quota semantics apply on MCP — tool errors carry the equivalent reason.
- 401
- Missing, malformed, revoked, or rotated key.
- 429
- Rate limit or daily quota exceeded — the body says which, and retry-after says when.
- 400 / 413
- Invalid body, binary content, or input over the 256 KB limit.
- 503
- Entitlement state temporarily unavailable — the API refuses rather than guessing your plan. Retry shortly.
Submitted source is processed in memory for the request only; generated results may use a short-window hash-keyed cache. Privacy details
For agents
Machine-readable resources
Agents can learn this surface without scraping HTML: the OpenAPI contract over HTTP, and MCP resources served by the server itself.
- /api/openapi.jsonfull HTTP contract (also served as the MCP resource lena://openapi)
- lena://usage-guideagent-directed guide served by the MCP server
- lena://health-publicpublic health snapshot
- /api/coverage/exposureverified-coverage numbers; append /{languageId} for one language
- /llms.txtthis guide’s entry points, in plain text
RELEASE LOG
Changelog
Slice-level release history derived from git log and curated public titles.
Changelog generated at 2026-07-09
Featured updates
30/50
- 8331dd7ed
Update
Update · 2026-07-09
- e714ad201landing
Landing surface
Update · 2026-07-09
- 9045991c5editor
Editor refresh
Update · 2026-07-09
- 92880ce99
Deployment pipeline
Update · 2026-07-09
Recent changes
Earlier trail
Bug fix
Update · 2026-07-095d5a25c7eBug fix
Update · 2026-07-0979d048c1aUpdate
Update · 2026-07-098c8355723- verification
Verification system update
Update · 2026-07-0901f83209f - verification
Verification system update
Update · 2026-07-095357575df - verification
Verification system update
Update · 2026-07-09e27684c9a - verification
Verification system update
Update · 2026-07-092c9316e36 - verification
Verification system update
Update · 2026-07-09ba4e8125a - verification
Verification system update
Update · 2026-07-094a16e01e3 - verification
Verification system update
Update · 2026-07-09b0d3ec86e - verification
Verification system update
Update · 2026-07-091b70fb280 - verification
Verification system update
Update · 2026-07-09181b06060 - verification
Verification system update
Update · 2026-07-098b2cbc47a - verification
Verification system update
Update · 2026-07-0966f0a19d9 - verification
Verification system update
Update · 2026-07-0969fc31b26 - verification
Verification system update
Update · 2026-07-098a710d27d - verification
Verification system update
Update · 2026-07-09cb16154cb - verification
Verification system update
Update · 2026-07-091f73cc31e