# `PhoenixKitAI.AIModel`
[🔗](https://github.com/BeamLabEU/phoenix_kit_ai/blob/v0.26.1/lib/phoenix_kit_ai/ai_model.ex#L1)

Struct representing a normalized AI model from the OpenRouter API.

Constructed in `OpenRouterClient.normalize_models/2` from JSON API responses.
Consumed by `EndpointForm` LiveView for model selection and configuration.

## Fields

- `id` - Model identifier (e.g., `"anthropic/claude-3-opus"`)
- `name` - Human-readable name (e.g., `"Claude 3 Opus"`)
- `description` - Model description
- `context_length` - Maximum context window size in tokens
- `max_completion_tokens` - Maximum output tokens
- `supported_parameters` - List of supported parameters (e.g., `["temperature", "top_p"]`)
- `pricing` - Pricing info map with `"prompt"` and `"completion"` keys
- `architecture` - Architecture info map with `"modality"` key
- `top_provider` - Top provider metadata map
- `capabilities` - `PhoenixKitAI.Capabilities` read from the catalogue row
  (all `:unknown` for a provider without a catalogue)

# `t`

```elixir
@type t() :: %PhoenixKitAI.AIModel{
  architecture: map(),
  capabilities: PhoenixKitAI.Capabilities.t() | nil,
  context_length: integer() | nil,
  description: String.t() | nil,
  id: String.t(),
  max_completion_tokens: integer() | nil,
  name: String.t() | nil,
  pricing: map(),
  supported_parameters: [String.t()],
  top_provider: map()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
