Skip to content
Lexicor Docs

Get started

Quickstart

Send your first request to the Lexicor API, then run a full round-trip to confirm meaning survives encode and decode. You can follow along with cURL or an official SDK.

Prerequisites

  • A tenant API key (the X-API-Key value).
  • An IntentGraph to work with — either one you build, or the response from /v1/ingress, which parses a directive string into a graph.
  • cURL, or Python 3.11+ / Node.js 18+ for the SDKs.

1 · Authenticate

Every mutating route takes your key in the X-API-Key header. Confirm connectivity first with the unauthenticated health check:

Health check
curl https://api.lexicor.dev/v1/health

Then export your key so the examples below can reuse it:

bash
export LEXICOR_API_KEY="lx-your-key"
Never expose keys in a browser

Call the API from a server or an integration platform. A key embedded in client-side JavaScript is a key you have published.

2 · First request

Turn a plain directive into a canonical IntentGraph with /v1/ingress. Template ingress is the default; the graph comes back in intent_graph.

POST /v1/ingress
curl -X POST https://api.lexicor.dev/v1/ingress \
  -H "X-API-Key: $LEXICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"directive": "Notify the ops team that the deployment is complete."}'

3 · Prove equivalence

Send a graph through /v1/roundtrip to run the whole normalize → encode → decode → equivalence pipeline in one call. A healthy round-trip returns is_equivalent: true and a fidelity score.

POST /v1/roundtrip
curl -X POST https://api.lexicor.dev/v1/roundtrip \
  -H "X-API-Key: $LEXICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"intent_graph": { /* the graph from step 2 */ }}'

See the full request and response shapes on the roundtrip reference.

4 · Use an SDK

The official clients wrap the same endpoints with typed models, retries, and rate-limit handling.

  1. Install

    bash
    pip install lexicor-client        # Python
    npm install lexicor-client        # TypeScript
  2. Call the API

    Python
    from lexicor_client import LexicorClient
    
    client = LexicorClient("https://api.lexicor.dev", api_key="lx-your-key")
    
    ing = client.ingest("Notify the ops team that the deployment is complete.")
    result = client.roundtrip(ing["intent_graph"])
    print(result["is_equivalent"], result["fidelity_score"])

Next steps

Patent pending — Appl. No. 64/042,667

© 2026 Lexicor. All rights reserved.