# Model Selection

In Zaia Endless, each Agent can be powered by a specific **Provider** and **Model**.\
This configuration defines:

* Which **LLM** is used for reasoning
* How **billing and credit consumption** are handled

The model selection is part of the Agent configuration flow and is defined **after the Prompt**, ensuring that the Agent’s instructions are clear before choosing how it will reason.

***

### Where to Select the Model

The **Provider** and **Model** selector is located **below the main Prompt field** in the Agent configuration screen.

This positioning reflects the recommended workflow:

1. Define the Agent’s **Role**
2. Write the **Prompt**
3. Select the **Provider and Model**
4. Adjust behavioral settings (Temperature, Effort, Planning, Reasoning)

***

### How Providers Work

There are two ways to connect LLMs to your Agents.

#### Option 1 — Using Zaia Provider

When you select **Zaia** as the provider, your Agent uses models natively available on the platform (such as *Claude Sonnet 4.5* or *GPT-4o mini*).

In this mode:

* You consume **Zaia platform credits** per execution
* Authentication and billing are fully managed by Zaia
* No API key configuration is required

This is the recommended option for most users who want a fully managed experience with instant access to multiple LLMs.

***

#### Option 2 — Adding a Custom Provider

You can also connect your **own LLM provider**, bypassing Zaia’s managed credits.

To configure a custom provider, go to:

```
Platform → Settings → Providers → Configure Provider
```

In this panel, you can:

* Set a **provider name** (e.g., “OpenAI Personal”, “Anthropic Enterprise”)
* Select the **provider type** (Anthropic, OpenAI, or Google AI)
* Paste your **API key**
* Optionally add an internal description for identification

Once saved, the provider becomes available in the **Provider** dropdown inside the Agent configuration.

When an Agent uses a custom provider:

* It consumes **your own API credits**
* Billing happens directly with the external provider
* Zaia does not charge credits for model execution

> 🔒 **Security note:** API tokens are stored in encrypted form and are only used when invoking the selected model for your Agent.

***

### Switching Models Per Agent

Model selection is **Agent-specific**.\
This allows you to:

* Use lightweight models for FAQs or simple Agents
* Assign more powerful models to complex, reasoning-heavy Agents
* Optimize cost, latency, and accuracy across your workspace

You can change the model at any time without modifying the Agent’s Prompt or logic.

***

### Best Practices

* Always define the **Prompt first**, then select the model
* Use **Zaia Provider** for faster setup and predictable billing
* Use **custom providers** when you need:
  * Cost optimization at scale
  * Enterprise contracts
  * Provider-specific features

***

👉 Choosing the right model ensures your Agent balances **performance, cost, and reasoning quality** according to its purpose.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zaia.app/agents/agent-settings/model-selection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
