DocsAPI
Quickstart
Make your first request through condense in a couple of minutes, then choose where to go next.
Help me route this project's LLM calls through condense with as few changes as possible. condense is a proxy between my app and my LLM provider that manages context on the way through. Read https://condense.chat/docs/quickstart/ and https://condense.chat/docs/reference/ first. Find where this project calls its LLM provider and change the base URL to the matching route. OpenAI SDK: https://api.condense.chat/openai/v1 Anthropic SDK: https://api.condense.chat/anthropic Claude or Gemini on Vertex AI: swap the Vertex host for https://api.condense.chat/vertex and keep the rest of the path Amazon Bedrock: swap the Bedrock host for https://api.condense.chat/bedrock/{region} and keep the rest of the path. This route needs a Bedrock API key as a bearer token, because SigV4 isn't supported. Keep my provider credentials as they are. Send my condense key (ck_api_...) in the X-Condense-Auth-Token header, read from an environment variable. Never hardcode or print a key. The key needs the Proxy permission. If I don't have a condense key, stop and tell me how to get one: in an organization, create it under API > Keys in the dashboard at https://helm.condense.chat, or ask an admin; otherwise API access is enabled for organization accounts after an email or call with the condense team: https://condense.chat/docs/api/#signup If the project has a conversation or session id, send it as X-Condense-Session-Id so the dashboard can group requests. Ask me before making one test request, then show me the response status. Do not change models, prompts or anything else.
Prerequisites
- A condense API key (
ck_api_…). See Get API access. - Your upstream provider key, such as
sk-…for OpenAI.
Send your first request
Point your SDK at condense
Set your SDK's base URL to a condense provider route.
Add your condense key
Send your condense key in
X-Condense-Auth-Tokenand keep passing your provider key.Send the request
The request and response shapes are unchanged.
Send your first request from openai import OpenAI client = OpenAI( api_key="sk-...", # your upstream OpenAI key base_url="https://api.condense.chat/openai/v1", default_headers={"X-Condense-Auth-Token": "ck_api_..."}, ) resp = client.chat.completions.create( model="gpt-4o-mini", messages=[{"role": "user", "content": "hi"}], ) print(resp.choices[0].message.content)import OpenAI from "openai"; const client = new OpenAI({ apiKey: "sk-...", // your upstream OpenAI key baseURL: "https://api.condense.chat/openai/v1", defaultHeaders: { "X-Condense-Auth-Token": "ck_api_..." }, }); const resp = await client.chat.completions.create({ model: "gpt-4o-mini", messages: [{ role: "user", content: "hi" }], }); console.log(resp.choices[0].message.content);package main import ( "context" "fmt" "github.com/openai/openai-go" "github.com/openai/openai-go/option" ) func main() { client := openai.NewClient( option.WithAPIKey("sk-..."), // your upstream OpenAI key option.WithBaseURL("https://api.condense.chat/openai/v1"), option.WithHeader("X-Condense-Auth-Token", "ck_api_..."), ) resp, _ := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{ Model: openai.F("gpt-4o-mini"), Messages: openai.F([]openai.ChatCompletionMessageParamUnion{openai.UserMessage("hi")}), ) fmt.Println(resp.Choices[0].Message.Content) }// raw HTTP with reqwest — cleanest way to send the condense header use reqwest::Client; use serde_json::json; #[tokio::main] async fn main() -> Result< (), Box<dyn std::error::Error>> { let resp = Client::new() .post("https://api.condense.chat/openai/v1/chat/completions") .header("X-Condense-Auth-Token", "ck_api_...") .header("Authorization", "Bearer sk-...") .json(&json!({ "model": "gpt-4o-mini", "messages": [{"role": "user", "content": "hi"}] })) .send() .await?; println!("{}", resp.text().await?); Ok(()) }curl https://api.condense.chat/openai/v1/chat/completions \ -H "X-Condense-Auth-Token: ck_api_..." \ -H "Authorization: Bearer sk-..." \ -H "Content-Type: application/json" \ -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"hi"}]}'
Use another route
The Anthropic route works the same way. Point base_url at /anthropic and send your sk-ant-… key. For calls that go through your cloud account, see Vertex AI, Gemini on Vertex AI and Amazon Bedrock.
Next steps
/v1/compress and get them back compacted.Choose a modelHelene 1.1 for general use, Adeline 1 for long agent traces.Bring your own upstreamForward to any OpenAI- or Anthropic-shaped endpoint, not just the provider default.Tune per requestHeaders for compaction mode, min-tokens, session pinning, and upstream overrides.