BAML-over-REST requires BAML version >=0.55
Supported Languages
Through OpenAPI, BAML supports:- C#
- C++ (5 different client types)
- Elixir
- Go
- Java
- PHP
- Ruby
- Rust
- And many more
Installation Steps
Install BAML VSCode Extension
Install the extension from: https://marketplace.visualstudio.com/items?itemName=boundary.baml-extensionFeatures include:
- Syntax highlighting
- Testing playground
- Prompt previews
Initialize BAML with OpenAPI
Choose your target language and run the corresponding init command:This creates a
baml_src directory with starter BAML code.Start the BAML Development Server
- Serve your BAML functions over REST on
localhost:2024 - Generate an OpenAPI schema in
baml_client/openapi.yaml - Generate an OpenAPI client in the
baml_clientdirectory - Re-run these steps whenever you modify
.bamlfiles
Verify the Server is Running
Check that the server is running:
-
Ping endpoint: Visit http://localhost:2024/_debug/ping or use curl. You should see:
- Swagger UI: Visit http://localhost:2024/docs to see and interact with all your routes.
If using Docker, replace
localhost with the container hostname or IP.