Developer hub

Your context.
Your call.

Ask TrimLayer for a smaller verified context, then use that value in the model, RAG pipeline or agent you already own.

optimize.ts
const result = await fetch("https://api.trimlayer.com/v1/context/optimize", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-TrimLayer-Key": process.env.TRIMLAYER_KEY!
  },
  body: JSON.stringify({
    content: longSourceContext,
    query: "Which conditions apply?",
    domain: "auto"
  })
}).then((response) => response.json());

// Use this in your own LLM, RAG or agent call.
const contextForNextStep = result.optimized_context;

Quick integration

A small code change.
Clear operational boundaries.

01

Authenticate once

Send only your TrimLayer project key to the optimize endpoint.

02

Receive safe context

Use optimized_context; protected results include the original unchanged.

03

Choose the next step

Your application decides whether to send the result to a model, store it or retrieve exact evidence.