
Null Lens — API Docs
Null Lens produces a deterministic Authorized Intent Record(AIR) prior to model execution. Each request yields a fixed, auditable declaration of claimed intent and scope — without inference, enrichment, or policy logic.
Public Access (Shared Runtime)
Optimized for SDKs, quick integration, and non-sensitive workloads. Uses a multi-tenant GPU runtime.
Endpoint
POST https://null-core.ai/api/lens
Example cURL — replace <your_api_key_here>.
curl -X POST https://null-core.ai/api/lens \
-H "Authorization: Bearer <your_api_key_here>" \
-H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"Summarize the latency impact of our RAG pipeline for 100k qps"}]}'Python SDK
pip install null-lens
from null_lens import NullLens
import os
lens = NullLens(api_key=os.getenv("NULL_LENS_API_KEY"))
print(lens.parse("Summarize Q4 strategy across LATAM markets."))JavaScript / TypeScript SDK
npm install null-lens
import { NullLens } from "null-lens";
const lens = new NullLens(process.env.NULL_LENS_API_KEY);
const result = await lens.parse("Summarize Q4 strategy across LATAM markets.");
console.log(result);Private Instance (Enterprise)
Runs on a dedicated GPU, isolated memory, and org-specific endpoints. Use for regulated or production environments.
Endpoint
Example URL: https://null-core.ai/api/lens-enterprise
import requests, os
r = requests.post(
"https://null-core.ai/api/lens-enterprise",
headers={
"Authorization": f"Bearer {os.getenv('NULL_LENS_API_KEY')}",
"Content-Type": "application/json"
},
json={"messages":[{"role":"user","content":"Summarize internal audit posture"}]}
)
print(r.text)curl -X POST "https://null-core.ai/api/lens-enterprise" \
-H "Authorization: Bearer <PRIVATE_API_KEY_HERE>" \
-H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"Summarize internal audit posture"}]}'Response
A typical 200 response:
{
"object": "chat.completion",
"org_id": "27a1dc4e-ab57-44e9-89af-c66231a2296b",
"response": "[Motive] Pre-execution governance attestation.\n[Scope] API v2, auth microservice, token verification\n[Boundary] No additional domains are inferred beyond what appears in [Scope]."
}JavaScript Parser
function parseLensResponse(text) {
const lines = text.split(/\r?\n/).map(l => l.trim()).filter(Boolean);
const find = (p) =>
(lines.find(l => l.toLowerCase().startsWith(p)) || '')
.split(']')
.slice(1)
.join(']')
.trim();
return { motive: find('[motive]'), scope: find('[scope]'), boundary: find('[boundary]') };
}Python Parser
def parse_lens_response(text):
lines = [l.strip() for l in text.splitlines() if l.strip()]
def find(prefix):
for l in lines:
if l.lower().startswith(prefix):
return l.split(']', 1)[1].strip()
return None
return {
"motive": find("[motive]"),
"scope": find("[scope]"),
"boundary": find("[boundary]")
}response field. Outputs always follow [Motive] / [Scope] / [Boundary].Best Practices
- One call per user input. Send the full natural-language instruction in messages[0].content. Lens is optimized for complete inputs rather than token streams.
- Full structural and lexical determinism. Identical input produces an identical intent schema (Motive / Scope / Boundary) with no phrasing variation across runs. Governance relies on invariant structure and exact domain extraction.
- Persist the contract. Store [Motive],[Scope], and[Boundary] as canonical intent records for audits, review, and downstream enforcement.
- Call Lens first. Always run Lens before retrieval, RAG, tool calls, or agent steps. Treat the output as the authoritative pre-execution intent record.
- Input hygiene. Remove HTML, control characters, or malformed markup to protect downstream systems. Lens itself is stateless and does not require sanitization for correctness.
- Fallbacks & human review. If a field is missing or malformed, retry once and then route to human review. Never infer or reconstruct intent outside of the Lens record.
- Privacy posture. Lens is fully stateless. No user data is stored, persisted, or trained upon.
Schema Stability & Governance Guarantees
Lens v1.0 defines a permanently fixed three-field intent schema: [Motive] [Scope] [Boundary]. This schema is frozen for governance. It does not expand, contract, or change shape.
- Immutable schema. [Motive] [Scope] [Boundary]is the complete and final structure for Lens v1.0. No new fields will be introduced.
- Fixed Motive and Boundary invariants. Motive and Boundary are static by design and never depend on the input. This guarantees a predictable, non-drifting contract shape.
- Deterministic Scope extraction. Scope captures only explicit domains from the input. Scope extraction may be refined within fixed constraints, but its structural behavior and domain boundaries remain invariant.
- Lens is structurally deterministic. Identical input always produces the same schema, the same Motive and Boundary invariants, and the same extracted domain set in Scope.
- Version pinning. Enterprises may rely on Lens v1.0 indefinitely. No auto-upgrade, no silent migration, no behavioral drift.
- Future compatibility. If new versions exist, v1.0 remains permanently available. Customers explicitly choose versions; none are forced.
- Stateless by design. Versioning applies only to schema behavior. Lens never stores, retains, or trains on user data.
These guarantees allow teams to attach policy and controls to a contract whose structure remains stable across years — a requirement for SOC2, ISO 42001, and EU AI Act aligned environments.
Integration Notes
- Fixed schema. Lens always returns[Motive],[Scope],[Boundary]. No extra fields, no branching formats, no schema drift.
- Long-form inputs. Large instructions are reduced into a bounded intent record while preserving explicit domains. No semantic expansion is introduced.
- Structural idempotence. Identical input produces an identical contract: same Motive, same Boundary, same extracted domain set. Lens behavior is fully deterministic across hardware and runtimes.
- Latency & scale. Typical latency: 1–4 seconds depending on hardware and model size. Tuned for consistency and schema safety rather than raw throughput.
- Operational guidance. Stateless API: retry once on transient failures with exponential backoff. Never regenerate or infer a contract outside of Lens.
Troubleshooting & Resilience
Containment Responses
When Lens encounters unsafe, malformed, or schema-corrupting input, it returns the sealed fallback:
[Motive] Pre-execution governance attestation. [Scope] Input [Boundary] No additional domains are inferred beyond what appears in [Scope].
This indicates successful containment. Lens preserves the contract shape and prevents unsafe content from influencing downstream systems. This is not an error — the schema remains intact.
- Inspect the input for prompt-injection or structural override attempts.
- Retry once — fallback behavior is deterministic.
- Route to human review if the fallback persists.
Operational Reliability
Lens is stateless and designed for high availability. Target uptime: ≥99.9%. Retry once on transient network errors. Use lightweight health checks to verify readiness before routing production traffic.
FAQ
Q: Does Lens store my data or learn from my inputs?
No. Lens is fully stateless. It does not store, retain, or train on user inputs. Only minimal operational telemetry such as latency and error counts is collected.
Q: What exactly is Lens?
Lens is a governance primitive that reduces any natural-language instruction into a deterministic three-field intent record: [Motive], [Scope], [Boundary]. It records the requester’s declared authorization claim prior to execution.
Q: Is Lens deterministic?
Lens is structurally and lexically deterministic. Identical input yields identical output across runs, environments, and hardware.
Q: Does Lens improve model accuracy?
No. Lens does not alter or influence model reasoning. It defines intent prior to reasoning — acting as an attestation layer, not an optimization layer.
Q: Will the output format ever change?
No. The schema is fixed: [Motive], [Scope], [Boundary]. Only wording may evolve for clarity without affecting structure.
Q: What latency should I expect?
Typical latency ranges from 1–4 seconds depending on hardware and load. Responses undergo schema validation before being returned.
Q: How should I handle malformed outputs?
Retry once with the same input. If a valid contract is still not produced, route to human review. Never attempt to construct or guess a contract manually.
Q: Who is Lens built for?
Teams operating in regulated or accountability-driven environments — financial services, healthcare, enterprise governance teams, and compliance-heavy platforms.