anoman
Sign InGet API Key
Documentation home

Connect LibreChat to Anoman AI

LibreChat supports custom OpenAI-compatible endpoints in librechat.yaml. Add Anoman to give your self-hosted chat UI a single gateway to hundreds of LLMs with prompt-injection detection, PII masking, and content moderation on every message.

← Agent Integration Guides

Prerequisites

  • An Anoman AI account with an active API key (anm-sk-...)
  • A running LibreChat deployment (librechat.ai)

Enable streaming for long agent runs

Set stream: true on requests. Autonomous, multi-step, and long-thinking tasks can exceed the 100-second edge timeout and fail with a 524 error; streaming returns tokens as they are generated and keeps the connection alive, so the request completes. Most tools stream by default — confirm it is on for agentic use.

More detail in the streaming guide.

Step 1: Add a custom endpoint to librechat.yaml

Under endpoints.custom, add an Anoman entry with the OpenAI-compatible base URL and your API key. List the models you want to expose in the model picker.

endpoints:
  custom:
    - name: "Anoman"
      apiKey: "${ANOMAN_API_KEY}"
      baseURL: "https://api.anoman.io/v1"
      models:
        default: ["gpt-4o", "claude-sonnet-4-6", "claude-haiku-4-5"]
        fetch: false
      titleConvo: true
      titleModel: "gpt-4o-mini"

Step 2: Set the API key

Put your Anoman key in the LibreChat environment so the ${ANOMAN_API_KEY} reference resolves. Never commit the raw key.

# .env
ANOMAN_API_KEY=anm-sk-your-key-here

Step 3: Restart and select Anoman

Restart LibreChat and pick Anoman from the endpoint selector. Every message now routes through the gateway — guardrails run first, and usage is metered and traced per key.

Verify the guardrails are active

Every Anoman response carries guardrail result headers. Inspect them in your dashboard traces to confirm the pipeline is running on LibreChat requests — prompt-injection detection, PII masking, and content moderation all apply automatically.

X-Anoman-Guardrail-Injection: pass score=0.03
X-Anoman-Guardrail-Pii: pass
X-Anoman-Guardrail-Content: pass
X-Anoman-Cache: none

Need help with your integration?

Join the Founding 50 for early access and direct support from the Anoman team.

Join Founding 50

On this page