DocsAPI

Quickstart

Make your first request through condense in a couple of minutes, then choose where to go next.

Agent prompt

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

  1. Point your SDK at condense

    Set your SDK's base URL to a condense provider route.

  2. Add your condense key

    Send your condense key in X-Condense-Auth-Token and keep passing your provider key.

  3. 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)

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