> ## Documentation Index
> Fetch the complete documentation index at: https://phidatainc-studio-tools-doc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Model as String

> Use the convenient provider:model_id string format to specify models without importing model classes.

<Badge icon="code-branch" color="orange">
  <Tooltip tip="Introduced in v2.2.6" cta="View release notes" href="https://github.com/agno-agi/agno/releases/tag/v2.2.6">v2.2.6</Tooltip>
</Badge>

Agno provides a convenient string syntax for specifying models using the `provider:model_id` format. This approach reduces code verbosity by eliminating the need to import model classes while maintaining full functionality.

Both the traditional object syntax and the string syntax are equally valid and work identically. Choose the approach that best fits your coding style and requirements.

## Format

The string format follows this pattern:

```
"provider:model_id"
```

* **provider**: The model provider name (case-insensitive)
* **model\_id**: The specific model identifier

**Examples:**

* `"openai:gpt-4o"`
* `"anthropic:claude-sonnet-4-20250514"`
* `"google:gemini-2.0-flash-exp"`
* `"groq:llama-3.3-70b-versatile"`

## Basic Usage

### Agent with String Syntax

```python theme={null}
from agno.agent import Agent

agent = Agent(
    model="openai:gpt-4o",
    instructions="You are a helpful assistant.",
    markdown=True,
)

agent.print_response("Share a 2 sentence horror story.")
```

### Teams with String Syntax

Use model strings with Teams for coordinated multi-agent workflows:

```python theme={null}
from agno.agent import Agent
from agno.team import Team
from agno.tools.hackernews import HackerNewsTools
from agno.tools.yfinance import YFinanceTools

news_agent = Agent(
    name="News Agent",
    role="Search for tech news",
    model="openai:gpt-4o",
    tools=[HackerNewsTools()],
)

finance_agent = Agent(
    name="Finance Agent",
    role="Analyze financial data",
    model="openai:gpt-4o-mini",
    tools=[YFinanceTools()],
)

agent_team = Team(
    members=[news_agent, finance_agent],
    model="openai:gpt-4o",
    instructions="Coordinate research and provide comprehensive reports.",
)

agent_team.print_response("Research Tesla's latest developments")
```

### Multiple Model Types

Agents support different models for various purposes:

```python theme={null}
from agno.agent import Agent

agent = Agent(
    # Main model for general responses
    model="openai:gpt-4o",
    # Reasoning model for complex thinking
    reasoning_model="anthropic:claude-sonnet-4-20250514",
    # Parser model for structured outputs
    parser_model="openai:gpt-4o-mini",
    # Output model for final formatting
    output_model="openai:gpt-4o",
)
```

## Common Providers

| Provider         | String Format               | Example                                     |
| ---------------- | --------------------------- | ------------------------------------------- |
| OpenAI           | `openai:model_id`           | `"openai:gpt-4o"`                           |
| Anthropic        | `anthropic:model_id`        | `"anthropic:claude-sonnet-4-20250514"`      |
| Google           | `google:model_id`           | `"google:gemini-2.0-flash-exp"`             |
| Groq             | `groq:model_id`             | `"groq:llama-3.3-70b-versatile"`            |
| Ollama           | `ollama:model_id`           | `"ollama:llama3.2"`                         |
| Azure AI Foundry | `azure-ai-foundry:model_id` | `"azure-ai-foundry:gpt-4o"`                 |
| Mistral          | `mistral:model_id`          | `"mistral:mistral-large-latest"`            |
| LiteLLM          | `litellm:model_id`          | `"litellm:gpt-4o"`                          |
| OpenRouter       | `openrouter:model_id`       | `"openrouter:anthropic/claude-3.5-sonnet"`  |
| Together         | `together:model_id`         | `"together:meta-llama/Llama-3-70b-chat-hf"` |

For the complete list and provider-specific documentation, see the [Models Overview](/models/overview).

## Developer Resources

* View [All Model Providers](/models/providers/model-index)
