BAML
Trace BAML structured outputs with Respan.
Set up Respan
- Sign up — Create an account at platform.respan.ai
- Create an API key — Generate one on the API keys page
- Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page
Use AI
Add the Docs MCP to your AI coding tool to get help building with Respan. No API key needed.
What is BAML?
BAML is a domain-specific language for building reliable LLM functions with structured outputs. It uses Pydantic-style type definitions and a compiler to generate type-safe client code. The Respan integration uses respan-tracing decorators to capture BAML function calls.
Setup
Attributes
Via respan-tracing SDK
Via gateway headers
When using the Respan gateway, pass attributes as headers in your BAML client configuration:
Looking for gateway integration? See Gateway > BAML.