- 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 implementation-versus-semantic-evidence contract everywhere.
One key, two surfaces: the HTTP API and the MCP server expose the same registered direct-adapter conversion, with the same shared daily quota. Each fragment reports implementation separately from admissible semantic verification; exact-text regression establishes implementation only, and missing implementation is an honest gap.
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 registered implementation from semantic verification: read each fragment, 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.1",
"ok": true, // true only for complete conversion
"status": "converted", // or: partial | no-implemented-route | ...
"sourceLanguage": "python",
"targetLanguage": "javascript",
"text": "...", // complete or honest partial assembly
"fragments": [ { "facetKey": "...", "text": "...", "implemented": true,
"semanticVerified": false, "verified": false } ], // verified is a deprecated semantic alias
"gaps": [ { "facetKey": "...", "reason": "...", "message": "..." } ],
"verification": { "inputLaw": "pass", "outputAdapters": "registered-direct-only", ... },
"requestId": "..."
}Read fragments and gaps for assembly completeness: fragments without gaps are complete, fragments with gaps are partial, and no fragments is none. These states do not establish semantic support. Each fragment exposes implemented and semanticVerified separately; the deprecated verified alias mirrors semanticVerified. Current transform receipts have no per-invocation semantic oracle, so both semantic fields fail closed to false. A partial result may have text null when no ordered assembly is available. Partial text keeps ok false, preserves each gap form in place as a target-language comment around its original source, and may not compile or run.
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, input verified counts, output implemented counts, and output semantic-verified counts. Call this first — never guess ids. |
| lena_check_route | Free | Pre-flight for a source/target pair: implemented and semantic-verified atomic intersections without spending quota or source tokens. |
| lena_transform | Counts | The conversion itself. Read domain ok, status, each fragment's implemented and semanticVerified fields, gaps, and guidance. Current receipts have no per-invocation semantic oracle, so semanticVerified and verified fail closed to false. Partial text may preserve gap forms as comments and may not compile or run. An unassembled partial can keep text null. |
| lena_transform_batch | Counts | Multiple conversions in one call. Each item consumes quota individually, and any partial item may not compile or run. |
| lena_get_coverage | Free | Aggregate input verified coverage, legacy-inclusive output allocation, and separated output evidence indicators. |
| lena_get_language_coverage | Free | Input verified, output implemented, and output semantic-verified 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/exposureseparated input verification, output implementation, and output semantic evidence; 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-09-21
Featured updates
30/50
- a01336956
Update
Merge branch 'develop' into main
Update · 2026-09-21
- 681c836beweb
Web surface update
Open the plan page and sell only what production serves
Update · 2026-09-21
- b64e70e7averification
Verification system update
Refresh the evidence ledger after the repaired sweep
Update · 2026-09-21
- c3f29350averification
Verification system update
Re-measure the 46-pair golden sweep on the repaired observation profile
Update · 2026-09-21
Recent changes
Observe Objective-C nil as the null tag
Declare the standard library the observation programs provide
Observe Objective-C booleans as BOOL rather than C _Bool
Refresh evidence ledger after native measurements
Extend the native golden sweep to 46 language pairs
Refresh measurement report bindings and script graph
Record native execution evidence for 24 languages
Declare division, operand order and index bases for systems languages
Earlier trail
- verification
Verification system update
Update · 2026-09-2016b0457e0Measure native execution for the C family, Go, Rust, Java and C#
- verification
Verification system update
Update · 2026-09-20f0bb71ff2Align the session bootstrap markers with the current agent rules
Documentation update
Update · 2026-09-20388528d4bDrop the model-generation gate from the agent rules
Documentation update
Update · 2026-09-19f961999d5Refresh the public changelog and codebase stats
- verification
Verification system update
Update · 2026-09-19923b8231cResettle the reports behind the derived expectations
- verification
Verification system update
Update · 2026-09-190cff3dd1aDerive the stale public lineage expectations instead of pinning them
- verification
Verification system update
Update · 2026-09-1954f6edd07Carry the node type count into the coverage measurement and its derivations
- verification
Verification system update
Update · 2026-09-19e818bf8b8Resettle the derivations that read the regenerated lineage
- verification
Verification system update
Update · 2026-09-19701c4ea9eRegenerate the public lineage reports the owner approved
Documentation update
Update · 2026-09-18fcd63f6a8Rebuild the evidence ledger binding
Documentation update
Update · 2026-09-1841c3841dbRefresh the public changelog and codebase stats
- verification
Verification system update
Update · 2026-09-187dd336d88Refresh the consumer differential and the report source graph
- verification
Verification system update
Update · 2026-09-188bfcd404dRefresh the golden lineage behind the registry citations
Verification harness update
Update · 2026-09-18b024ed469Run the depth readiness census inside the output credit chain
- verification
Verification system update
Update · 2026-09-18abe826627Reconverge the capability road cluster on the refreshed registry
- verification
Verification system update
Update · 2026-09-18473fbdf1fClassify the JS/TS projection frontier reason
- verification
Verification system update
Update · 2026-09-18e7a91def7Record the missing spec authority references
- verification
Verification system update
Update · 2026-09-1822f11af4eRegenerate the stale dev-only reports and the showcase surfaces