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

# Models

Language models generate text responses, decide when to call tools, and process conversation context. They handle all text generation and reasoning for your agent. Models vary in speed (response latency), capability (reasoning quality and accuracy), context length (how much conversation history they can process), and features (vision support, function calling, structured output).

Hypertic supports 10+ language model providers, allowing you to switch between OpenAI, Anthropic, Google, xAI, and others seamlessly.

## Supported Providers

Click on a provider card to see setup and usage examples:

<Columns cols={3}>
  <Card title="Anthropic" icon="https://www.anthropic.com/favicon.ico" href="/models/anthropic">
    View guide >
  </Card>

  <Card title="Cohere" icon="https://cohere.com/favicon.ico" href="/models/cohere">
    View guide >
  </Card>

  <Card title="DeepSeek" icon="https://www.deepseek.com/favicon.ico" href="/models/deepseek">
    View guide >
  </Card>

  <Card title="FireworksAI" icon="https://fireworks.ai/favicon.ico" href="/models/fireworksai">
    View guide >
  </Card>

  <Card title="Google Gemini" icon="https://www.google.com/favicon.ico" href="/models/google">
    View guide >
  </Card>

  <Card title="Groq" icon="https://groq.com/favicon.ico" href="/models/groq">
    View guide >
  </Card>

  <Card title="Mistral" icon="https://mistral.ai/favicon.ico" href="/models/mistral">
    View guide >
  </Card>

  <Card title="Moonshot" icon="https://platform.moonshot.cn/favicon.ico" href="/models/moonshot">
    View guide >
  </Card>

  <Card title="OpenAI" icon="openai" href="/models/openai">
    View guide >
  </Card>

  <Card title="OpenRouter" icon="https://openrouter.ai/favicon.ico" href="/models/openrouter">
    View guide >
  </Card>

  <Card title="Qwen" icon="link" href="/models/qwen">
    View guide >
  </Card>

  <Card title="xAI" icon="https://x.ai/favicon.ico" href="/models/xai">
    View guide >
  </Card>
</Columns>

## Basic Usage

Here are examples for different providers:

<CodeGroup>
  ```python OpenAI theme={null} theme={null}
  from hypertic.agents import Agent
  from hypertic.models import OpenAI

  model = OpenAI(model="gpt-5.2")
  agent = Agent(
      model=model,
      tools=[get_weather],
  )

  response = agent.run("What's the weather in SF?")
  ```

  ```python Anthropic theme={null} theme={null}
  from hypertic.agents import Agent
  from hypertic.models import Anthropic

  model = Anthropic(model="claude-sonnet-4-5")
  agent = Agent(
      model=model,
      tools=[get_weather],
  )

  response = agent.run("What's the weather in SF?")
  ```

  ```python Google Gemini theme={null} theme={null}
  import os
  from hypertic.agents import Agent
  from hypertic.models import GoogleAI

  model = GoogleAI(
      model="gemini-3-pro-preview",
      api_key=os.getenv("GOOGLE_API_KEY"),
  )
  agent = Agent(
      model=model,
      tools=[get_weather],
  )

  response = agent.run("What's the weather in SF?")
  ```

  ```python xAI theme={null} theme={null}
  import os
  from hypertic.agents import Agent
  from hypertic.models import xAI

  model = xAI(
      base_url="https://api.x.ai/v1",
      api_key=os.getenv("XAI_API_KEY"),
      model="grok-4",
  )
  agent = Agent(
      model=model,
      tools=[get_weather],
  )

  response = agent.run("What's the weather in SF?")
  ```
</CodeGroup>

## Parameters

Configure your model with these common parameters:

<ParamField body="model" type="string" required>
  The model ID used to generate responses, like "gpt-4" or "claude-sonnet-4-5-20250929".
</ParamField>

<ParamField body="temperature" type="number">
  Sampling temperature. Higher values make output more random, lower values make it more deterministic.
</ParamField>

<ParamField body="max_tokens" type="number">
  Upper bound for the number of tokens that can be generated for a response, including visible output tokens.
</ParamField>

<ParamField body="api_key" type="string">
  Your API key for authenticating with the provider. Usually set via environment variables.
</ParamField>

Example configuration:

```python theme={null} theme={null}
from hypertic.models import OpenAI

model = OpenAI(
    model="gpt-4",
    temperature=0.7,
    max_tokens=1000,
)
```

<Info>
  Each provider may have additional parameters. Check your provider's documentation for details.
</Info>
