FAQ
Q: How is this different from Instructor or Pydantic AI?
A: BAML is a dedicated DSL, not a Python library. You define schemas once in .baml and generate type-safe clients for any language. It also handles retries, streaming, and provider switching declaratively.
Q: Does it work with Claude? A: Yes. Supports Anthropic Claude, OpenAI, Google Gemini, Ollama, Azure OpenAI, and any OpenAI-compatible API.
Q: What about complex nested types? A: Fully supported — arrays, optionals, enums, unions, nested classes, recursive types. The type system is richer than JSON Schema.
Works With
- Claude Code, Cursor, Codex (via generated Python/TS clients)
- VS Code (official BAML extension with playground)
- Any LLM: OpenAI, Anthropic, Google, Ollama, Azure
- Python, TypeScript, Ruby, Java