anoman
Sign InGet API Key
Documentation home

Connect Zed to Anoman AI

Zed's AI assistant supports OpenAI-compatible providers via a custom api_url in settings.json. Point it at Anoman to add the full guardrail pipeline and observability to every inline assist and chat request.

← Agent Integration Guides

Prerequisites

  • An Anoman AI account with an active API key (anm-sk-...)
  • Zed installed (zed.dev)

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: Set your API key

Provide your Anoman key to Zed's OpenAI provider. Zed reads the key from the OPENAI_API_KEY environment variable (or you can enter it in the assistant panel).

export OPENAI_API_KEY=anm-sk-your-key-here

Step 2: Point the OpenAI provider at Anoman

Open Zed settings (settings.json) and set the OpenAI provider's api_url to Anoman's OpenAI-compatible endpoint. Add the model(s) you want available in the assistant.

{
  "language_models": {
    "openai": {
      "api_url": "https://api.anoman.io/v1",
      "available_models": [
        { "name": "gpt-4o", "max_tokens": 128000 },
        { "name": "claude-sonnet-4-6", "max_tokens": 200000 }
      ]
    }
  }
}

Step 3: Use the assistant

Open the assistant panel and select an Anoman-backed model. Zed sends completions to the base URL; Anoman routes them to the right provider and applies guardrails before and after the call.

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 Zed 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