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-Keyvalue). - 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:
curl https://api.lexicor.dev/v1/healthThen export your key so the examples below can reuse it:
export LEXICOR_API_KEY="lx-your-key"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.
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.
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.
Install
bashpip install lexicor-client # Python npm install lexicor-client # TypeScriptCall the API
Pythonfrom 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
- Python SDK and TypeScript SDK — full quickstarts including negotiation and transport packets.
- API reference — every endpoint with schemas and a Try-it console.
- Concepts — the vocabulary behind these calls.