Llama API
Llama API is Meta's official API for Llama models.
tip
Use Llama's OpenAI-compatible /compat/v1 endpoint. See Llama's compatibility documentation.
Basic Example
client<llm> LlamaAPI {
provider openai-generic
retry_policy Exponential
options {
base_url "https://llama-api.meta.com/compat/v1"
model "Llama-3.3-8B-Instruct"
api_key env.LLAMA_API_KEY
}
}
BAML-Specific Options
| Option | Type | Default | Description |
|---|---|---|---|
base_url | string | - | https://llama-api.meta.com/compat/v1 |
api_key | string | env.LLAMA_API_KEY | API key |
model | string | - | Model identifier |
See OpenAI Generic for all supported options.