---
description: "Llama OpenAI-compatible provider for using Llama models with OpenAI API format."
sidebar_label: Remote - Llama-Openai-Compat
title: remote::llama-openai-compat
---

# remote::llama-openai-compat

## Description

Llama OpenAI-compatible provider for using Llama models with OpenAI API format.

## Configuration

| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `allowed_models` | `list[str] \| None` | No |  | List of models that should be registered with the model registry. If None, all models are allowed. |
| `refresh_models` | `bool` | No | False | Whether to refresh models periodically from the provider |
| `api_key` | `SecretStr \| None` | No |  | Authentication credential for the provider |
| `base_url` | `HttpUrl \| None` | No | https://api.llama.com/compat/v1/ | The URL for the Llama API server |

## Sample Configuration

```yaml
base_url: https://api.llama.com/compat/v1/
api_key: ${env.LLAMA_API_KEY}
```
