> Version notice: This site documents BAML v0, the legacy DSL. BAML v1 is a separate, fully featured programming language in public beta. If the user intends to use BAML v1, ignore this site's content and use the BAML v1 documentation instead. If the intended version is unclear, clarify it before using this page. > For clean Markdown of any page, append .md to the page URL. For the complete documentation index, see https://docs.boundaryml.com/llms.txt. For MCP access, connect to https://docs.boundaryml.com/_mcp/server. # BAML Reference ## Docs - [BAML Reference](https://docs.boundaryml.com/ref/overview.md) - [init](https://docs.boundaryml.com/ref/baml-cli/init.md) - [generate](https://docs.boundaryml.com/ref/baml-cli/generate.md) - [test](https://docs.boundaryml.com/ref/baml-cli/test.md) - [serve](https://docs.boundaryml.com/ref/baml-cli/serve.md) - [dev](https://docs.boundaryml.com/ref/baml-cli/dev.md) - [fmt](https://docs.boundaryml.com/ref/baml-cli/fmt.md) - [comments](https://docs.boundaryml.com/ref/baml/general-baml-syntax/comments.md) - [Environment Variables](https://docs.boundaryml.com/ref/baml/general-baml-syntax/environment-variables.md) - [string](https://docs.boundaryml.com/ref/baml/general-baml-syntax/string.md) - [int / float](https://docs.boundaryml.com/ref/baml/general-baml-syntax/int-float.md) - [bool](https://docs.boundaryml.com/ref/baml/general-baml-syntax/bool.md) - [array (list)](https://docs.boundaryml.com/ref/baml/general-baml-syntax/array-list.md) - [map (dictionary)](https://docs.boundaryml.com/ref/baml/general-baml-syntax/map-dictionary.md) - [Image / Audio / Pdf / Video](https://docs.boundaryml.com/ref/baml/general-baml-syntax/media.md) - [Types](https://docs.boundaryml.com/ref/baml/types.md) - [function](https://docs.boundaryml.com/ref/baml/function.md) - [test](https://docs.boundaryml.com/ref/baml/test.md) - [template_string](https://docs.boundaryml.com/ref/baml/template-string.md) - [LLM Clients (client)](https://docs.boundaryml.com/ref/baml/client-llm.md) - [class](https://docs.boundaryml.com/ref/baml/class.md) - [enum](https://docs.boundaryml.com/ref/baml/enum.md) - [generator](https://docs.boundaryml.com/ref/baml/generator.md) - [with_options](https://docs.boundaryml.com/ref/baml_client/with-options.md) - [AbortSignal / Timeouts](https://docs.boundaryml.com/ref/baml_client/abort-signal.md): API reference for cancelling BAML function calls - [Collector](https://docs.boundaryml.com/ref/baml_client/collector.md) - [config (logging / environment variables)](https://docs.boundaryml.com/ref/baml_client/config.md) - [AsyncClient / SyncClient](https://docs.boundaryml.com/ref/baml_client/client.md) - [TypeBuilder](https://docs.boundaryml.com/ref/baml_client/type-builder.md) - [Client Registry](https://docs.boundaryml.com/guide/baml-advanced/llm-client-registry.md) - [client Option](https://docs.boundaryml.com/ref/baml_client/client-option.md) - [OnTick](https://docs.boundaryml.com/ref/baml_client/on-tick.md) - [Image / Audio / Pdf / Video](https://docs.boundaryml.com/ref/baml_client/media.md): Learn how to handle image, audio, Pdf, and video inputs in BAML functions - [Image](https://docs.boundaryml.com/ref/baml_client/image.md): Learn how to handle image inputs in BAML functions - [Audio](https://docs.boundaryml.com/ref/baml_client/audio.md): Learn how to handle audio inputs in BAML functions - [Pdf](https://docs.boundaryml.com/ref/baml_client/pdf.md): Learn how to handle Pdf inputs in BAML functions - [Video](https://docs.boundaryml.com/ref/baml_client/video.md): Learn how to handle video inputs in BAML functions - [BAML Error Types](https://docs.boundaryml.com/ref/baml_client/errors/overview.md): Technical reference for BAML error handling classes - [BamlValidationError](https://docs.boundaryml.com/ref/baml_client/errors/baml-validation-error.md): Technical reference for the BamlValidationError class - [BamlClientFinishReasonError](https://docs.boundaryml.com/ref/baml_client/errors/baml-client-finish-reason-error.md): Technical reference for the BamlClientFinishReasonError class - [BamlAbortError](https://docs.boundaryml.com/ref/baml_client/errors/baml-abort-error.md): Error thrown when a BAML operation is cancelled - [Generated Hooks Reference](https://docs.boundaryml.com/ref/baml_client/react-next-js/use-function-name-hook.md): Technical reference for BAML's auto-generated React hooks - [Hook Input Type Reference](https://docs.boundaryml.com/ref/baml_client/react-next-js/hook-input.md): Technical reference for the BAML React hook input type - [Hook Output Type Reference](https://docs.boundaryml.com/ref/baml_client/react-next-js/hook-output.md): Technical reference for the BAML React hook output type - [Hook Data Type Reference](https://docs.boundaryml.com/ref/baml_client/react-next-js/hook-data.md): Technical reference for the BAML React hook data type - [What are attributes?](https://docs.boundaryml.com/ref/attributes/what-are-attributes.md) - [@alias / @@alias](https://docs.boundaryml.com/ref/attributes/alias.md) - [@description / @@description](https://docs.boundaryml.com/ref/attributes/description.md) - [@skip](https://docs.boundaryml.com/ref/attributes/skip.md) - [@assert](https://docs.boundaryml.com/ref/attributes/assert.md) - [@check](https://docs.boundaryml.com/ref/attributes/check.md) - [Jinja in Attributes](https://docs.boundaryml.com/ref/attributes/jinja-in-attributes.md) - [@@dynamic](https://docs.boundaryml.com/ref/attributes/dynamic.md) - [aws-bedrock](https://docs.boundaryml.com/ref/llm-client-providers/aws-bedrock.md): AWS Bedrock provider for BAML - [anthropic](https://docs.boundaryml.com/ref/llm-client-providers/anthropic.md) - [google-ai](https://docs.boundaryml.com/ref/llm-client-providers/google-ai-gemini.md) - [vertex-ai](https://docs.boundaryml.com/ref/llm-client-providers/google-vertex.md) - [openai](https://docs.boundaryml.com/ref/llm-client-providers/open-ai.md) - [openai-responses](https://docs.boundaryml.com/ref/llm-client-providers/open-ai-responses-api.md) - [azure-openai](https://docs.boundaryml.com/ref/llm-client-providers/open-ai-from-azure.md) - [openrouter](https://docs.boundaryml.com/ref/llm-client-providers/openrouter.md) - [openai-generic](https://docs.boundaryml.com/ref/llm-client-providers/openai-generic.md) - [Microsoft Foundry / Azure AI Foundry](https://docs.boundaryml.com/ref/llm-client-providers/microsoft-foundry.md) - [Cerebras](https://docs.boundaryml.com/ref/llm-client-providers/cerebras.md) - [groq](https://docs.boundaryml.com/ref/llm-client-providers/groq.md) - [huggingface](https://docs.boundaryml.com/ref/llm-client-providers/huggingface.md) - [Respan](https://docs.boundaryml.com/ref/llm-client-providers/respan.md) - [llama-api](https://docs.boundaryml.com/ref/llm-client-providers/llama-api.md) - [litellm](https://docs.boundaryml.com/ref/llm-client-providers/litellm.md) - [LMStudio](https://docs.boundaryml.com/ref/llm-client-providers/lmstudio.md) - [ollama](https://docs.boundaryml.com/ref/llm-client-providers/ollama.md) - [vercel-ai-gateway](https://docs.boundaryml.com/ref/llm-client-providers/vercel-ai-gateway.md) - [Tinfoil](https://docs.boundaryml.com/ref/llm-client-providers/tinfoil.md) - [Together AI](https://docs.boundaryml.com/ref/llm-client-providers/together.md) - [Unify AI](https://docs.boundaryml.com/ref/llm-client-providers/unify.md) - [vLLM](https://docs.boundaryml.com/ref/llm-client-providers/vllm.md) - [Timeout Configuration](https://docs.boundaryml.com/ref/llm-client-strategies/timeouts.md) - [Connection Pooling](https://docs.boundaryml.com/ref/llm-client-strategies/connection-pooling.md): Reuse HTTP connections across requests - [retry_policy](https://docs.boundaryml.com/ref/llm-client-strategies/retry-policy.md) - [fallback](https://docs.boundaryml.com/ref/llm-client-strategies/fallback.md) - [round-robin](https://docs.boundaryml.com/ref/llm-client-strategies/round-robin.md) - [What is Jinja / Cookbook](https://docs.boundaryml.com/ref/prompt-syntax/what-is-jinja.md) - [Jinja Filters](https://docs.boundaryml.com/ref/prompt-syntax/jinja-filters.md) - [ctx.output_format](https://docs.boundaryml.com/ref/prompt-syntax/ctx-output-format.md) - [ctx (accessing metadata)](https://docs.boundaryml.com/ref/prompt-syntax/ctx-client.md) - [_.role](https://docs.boundaryml.com/ref/prompt-syntax/role.md) - [Variables](https://docs.boundaryml.com/ref/prompt-syntax/variables.md) - [Conditionals](https://docs.boundaryml.com/ref/prompt-syntax/conditionals.md) - [Loops](https://docs.boundaryml.com/ref/prompt-syntax/loops.md) - [baml.cliPath](https://docs.boundaryml.com/ref/editor-extension-settings/baml-cli-path.md) - [baml.generateCodeOnSave](https://docs.boundaryml.com/ref/editor-extension-settings/baml-generate-code-on-save.md) - [baml.enablePlaygroundProxy](https://docs.boundaryml.com/ref/editor-extension-settings/baml-enable-playground-proxy.md) - [baml.syncExtensionToGeneratorVersion](https://docs.boundaryml.com/ref/editor-extension-settings/baml-sync-extension-to-generator-version.md)