Guardrails (gateway)
Guardrails (gateway)
Route Guardrails’ underlying LLM calls through the Respan gateway to use 250+ models from different providers. Only your RESPAN_API_KEY is needed — no separate provider keys required.
Setup
Switch models
Change the model parameter on guard(...) to use another OpenAI model through the same gateway-backed endpoint.
Guardrails routes through LiteLLM. Bare Claude or Gemini model strings make LiteLLM call those providers directly instead of the Respan OpenAI-compatible gateway, so this page keeps the switch examples to OpenAI models. Use the Respan API or OpenAI SDK gateway pages for provider-neutral Claude and Gemini examples.
See the full model list.