Skip to main content

xAI Grok Models via OpenRouter

Ever Works does not include a standalone xAI plugin. Grok models from xAI are accessed through the OpenRouter plugin, which aggregates hundreds of AI models behind a single API key. This page describes how to use Grok models for work generation and AI conversations.

Related source files:

FilePurpose
packages/plugins/openrouter/src/openrouter.plugin.tsOpenRouter AI provider plugin
apps/internal-cli/src/commands/config/ai-providers/ai-provider-registry.service.tsProvider registry listing Grok models

Available Grok Models

The AI provider registry includes Grok models in the OpenRouter model list:

// From ai-provider-registry.service.ts
models: [
// ...
'x-ai/grok-3-mini-beta'
];

Grok models available through OpenRouter use the x-ai/ prefix:

Model IDDescriptionBest For
x-ai/grok-3Grok 3 full modelComplex content generation, analysis
x-ai/grok-3-miniGrok 3 MiniFast, cost-effective general tasks
x-ai/grok-3-mini-betaGrok 3 Mini BetaEarly access to latest capabilities
x-ai/grok-2Grok 2General purpose AI tasks
note

Model availability on OpenRouter changes over time. Check openrouter.ai/models for the current list of available Grok models and their pricing.

Configuration

Setting Up Grok Models

  1. Navigate to Settings > Plugins in the Ever Works dashboard.
  2. Ensure the OpenRouter plugin is enabled (default).
  3. Enter your OpenRouter API key.
  4. Set model fields to Grok model IDs:
SettingValue
Default Modelx-ai/grok-3-mini
Simple Tasks Modelx-ai/grok-3-mini
Standard Tasks Modelx-ai/grok-3-mini
Complex Tasks Modelx-ai/grok-3

Environment Variables

PLUGIN_OPENROUTER_API_KEY=sk-or-...
PLUGIN_OPENROUTER_DEFAULT_MODEL=x-ai/grok-3-mini
PLUGIN_OPENROUTER_SIMPLE_MODEL=x-ai/grok-3-mini
PLUGIN_OPENROUTER_MEDIUM_MODEL=x-ai/grok-3-mini
PLUGIN_OPENROUTER_COMPLEX_MODEL=x-ai/grok-3

How It Works

Grok models are accessed through the same OpenRouter pipeline as every other provider:

OpenRouter's API is OpenAI-compatible, so the plugin uses LangChain's OpenAI provider with baseURL set to https://openrouter.ai/api/v1. The x-ai/ prefix in the model ID tells OpenRouter to route the request to xAI's infrastructure.

Tiered Model Strategy

Grok models pair well in a tiered configuration:

You can also mix Grok with other providers across tiers:

TierModelProvider
Simpleopenai/gpt-5-nanoOpenAI
Standardx-ai/grok-3-minixAI
Complexx-ai/grok-3xAI

Capabilities

CapabilityGrok 3Grok 3 Mini
Structured outputYesYes
StreamingYesYes
Tool callingYesYes
VisionModel-dependentModel-dependent
Max context length128,000 tokens128,000 tokens
note

Capability details depend on the specific model version available on OpenRouter. The OpenRouter plugin reports supportsVision: false at the plugin level, but individual Grok models may support vision when accessed directly.

Comparison with Other Providers

AspectGrok (via OpenRouter)OpenAI (direct)Groq
SetupOpenRouter API keyOpenAI API keyGroq API key
Model selectionx-ai/grok-*gpt-*, o*Llama, Qwen
EmbeddingsDepends on modelYesNo
SpeedStandardStandardUltra-fast
CostVaries by modelPer-token pricingFree tier available

Reasoning Model Handling

Grok models are not currently listed in the platform's reasoning model configuration (reasoning.utils.ts). This means no automatic reasoning effort parameters are applied. If xAI introduces reasoning-specific models in the future, the platform will need a pattern entry similar to:

{
pattern: /grok-.*-reasoning/,
openrouter: { reasoning: { effort: 'low' } }
}

Until then, Grok models operate in standard chat completion mode.

Troubleshooting

IssueCauseSolution
Model not foundIncorrect model ID or model removed from OpenRouterVerify the model ID at openrouter.ai/models
Authentication errorInvalid or expired OpenRouter API keyRegenerate your key at openrouter.ai/settings/keys
Rate limit exceededToo many requests to xAI via OpenRouterWait and retry; consider upgrading your OpenRouter plan
Embedding not supportedGrok may not offer embedding modelsUse OpenAI or Google Gemini for embeddings alongside Grok
High costsGrok full models may be expensiveUse grok-3-mini for simple and standard tiers

Cost Optimization

  • Use grok-3-mini for the majority of pipeline tasks (simple and standard tiers).
  • Reserve grok-3 for complex content generation only.
  • Monitor usage through the OpenRouter dashboard.
  • Compare per-token pricing against alternatives -- OpenRouter shows cost per model.

Further Reading