Node.js backend
Fetch and Express with TypeScript or Compress call from Next.js route handler.
Explore working server-side HTTP examples for the Compress and Generate endpoints, including RAG and agent integration patterns.
Explore working server-side HTTP examples for the Compress and Generate endpoints, including RAG and agent integration patterns.
Fetch and Express with TypeScript or Compress call from Next.js route handler.
Basic example with async request, timeout, and error handling using HTTPX.
Pipeline that optimizes the retriever output according to the query and transfers it to the model call.
Flow that minimizes agent results and task history before the next agent step.
Generate your API key, submit your input, and use the optimized context with your existing model provider.
Open installation steps →const response = await fetch("https://api.aether.tr/v1/compress", {
method: "POST",
headers: {
"Authorization": "Bearer <API_KEY>",
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json"
},
body: JSON.stringify({ context, query, level: "auto" })
});
const payload = await response.json();
if (!response.ok) throw new Error(payload.error?.code ?? "AETHER_API_ERROR");
const optimizedContext = payload.data.compressed;Contact our team to add Aether Compress to your current LLM workflow.