Skip to main content
  1. Sign up — Create an account at platform.respan.ai
  2. Create an API key — Generate one on the API keys page
  3. Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page
Add the Docs MCP to your AI coding tool to get help building with Respan. No API key needed.
{
  "mcpServers": {
    "respan-docs": {
      "url": "https://docs.respan.ai/mcp"
    }
  }
}
This integration is for the Respan gateway.

What is BAML?

BAML is a domain-specific language for building reliable LLM functions with structured outputs. Route BAML LLM calls through the Respan gateway by updating your BAML client configuration.

Quickstart

Step 1: Install BAML

pip install baml-py

Step 2: Set environment variables

export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"

Step 3: Update your BAML client configuration

Point your BAML client to the Respan gateway in clients.baml:
// clients.baml
client<llm> OpenAIGateway {
  provider openai
  options {
    model "gpt-4o-mini"
    api_key env.RESPAN_API_KEY
    base_url "https://api.respan.ai/api"
  }
}
Register this client in your BAML config to route calls through the Respan gateway.

Step 4: Verify

Open the Logs page to see your gateway requests.

Attributes

Pass Respan attributes as headers in your BAML client configuration:
X-Respan-Customer-Identifier: user-123
Looking for tracing integration? See Tracing > BAML.