> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tuning Engines

> Use Tuning Engines with Agno through an OpenAI-compatible governed endpoint.

Tuning Engines exposes an OpenAI-compatible endpoint for teams that want Agno agents to run through a governed AI control plane. Agno owns the agent behavior, tools, memory, and orchestration, while Tuning Engines centralizes model access, policy checks, audit logs, traces, and usage/cost reporting.

## Authentication

Create a Tuning Engines inference key and enable the model alias you want the agent to use.

<CodeGroup>
  ```bash Mac theme={null}
  export TUNING_ENGINES_API_KEY=sk-te-your-inference-key
  export TUNING_ENGINES_MODEL=your-model-alias
  # Optional, only when using a custom host:
  export TUNING_ENGINES_BASE_URL=https://api.tuningengines.com/v1
  ```

  ```bash Windows theme={null}
  setx TUNING_ENGINES_API_KEY sk-te-your-inference-key
  setx TUNING_ENGINES_MODEL your-model-alias
  :: Optional, only when using a custom host:
  setx TUNING_ENGINES_BASE_URL https://api.tuningengines.com/v1
  ```
</CodeGroup>

## Example

Install the `openai` package:

```shell theme={null}
uv pip install -U agno openai
```

Use Agno's `TuningEngines` model provider:

<CodeGroup>
  ```python agent.py theme={null}
  from os import getenv

  from agno.agent import Agent
  from agno.models.tuning_engines import TuningEngines

  agent = Agent(
      model=TuningEngines(
          id=getenv("TUNING_ENGINES_MODEL", "your-model-alias"),
      ),
      markdown=True,
  )

  agent.print_response("Share a short checklist for running production AI agents.", stream=True)
  ```
</CodeGroup>

## Params

| Parameter  | Type            | Description                                                      | Default                                                           |
| ---------- | --------------- | ---------------------------------------------------------------- | ----------------------------------------------------------------- |
| `id`       | `str`           | Model alias enabled in Tuning Engines                            | `"gpt-4o"`                                                        |
| `api_key`  | `Optional[str]` | Tuning Engines inference key, read from `TUNING_ENGINES_API_KEY` | `None`                                                            |
| `base_url` | `str`           | Tuning Engines OpenAI-compatible API endpoint                    | `TUNING_ENGINES_BASE_URL` or `"https://api.tuningengines.com/v1"` |

`TuningEngines` extends `OpenAILike`, so it supports the same OpenAI-compatible model parameters documented in [OpenAI Like](/models/providers/openai-like).

<Note> View a runnable example [here](/examples/models/tuning-engines/basic). </Note>
