OpenRouter Chat Model

Access multiple LLM providers through OpenRouter's unified API

Written By pvdyck

Last updated About 5 hours ago

OpenRouter Chat Model

Connects to OpenRouter's unified API gateway to access models from multiple providers (Anthropic, OpenAI, Meta, Mistral, Google, and more) through a single credential. This is the recommended model node for most workflows.

How It Works

OpenRouter provides a unified API endpoint that routes your requests to the selected model provider. It handles provider-level fallbacks and cost optimization automatically. You specify a model ID (e.g., anthropic/claude-sonnet-4) and OpenRouter routes the request to the best available provider for that model.

Authentication

Requires an OpenRouter API key configured via Secure Vault. Pricing varies by model -- check openrouter.ai/models for current rates.

Parameters

ParameterDescription
ModelThe model to use, specified as provider/model (e.g., anthropic/claude-sonnet-4, openai/gpt-4o).
TemperatureControls randomness (0 = deterministic, 1 = creative). Default: 0.7.
Max TokensMaximum number of tokens in the response.
Top PNucleus sampling (0-1). Alternative to temperature.
Frequency PenaltyReduces repetition of frequent tokens (-2.0 to 2.0).
Presence PenaltyEncourages topic diversity (-2.0 to 2.0).

Key Features

FeatureDescription
100+ modelsAccess Claude, GPT, Llama, Mistral, Gemini, and more from one API key.
Automatic fallbackIf your chosen model is unavailable, OpenRouter can fall back to alternatives.
Provider routingRoutes requests to the fastest/cheapest available provider for a given model.
Cost trackingTrack spending per model and per workflow through OpenRouter's dashboard.
Free modelsSome models are available for free (rate-limited) β€” useful for testing.

Popular Models

Model IDProviderBest For
anthropic/claude-sonnet-4AnthropicBest all-rounder, tool use
openai/gpt-4oOpenAIMultimodal, strong reasoning
openai/gpt-4o-miniOpenAIFast, affordable
google/gemini-2.5-flashGoogleLarge context, fast
meta-llama/llama-3.1-405bMetaOpen-source, large scale
mistralai/mistral-largeMistralEuropean provider, strong code

Connects To

Parent NodeDescription
AgentPowers the agent's reasoning and tool-calling decisions.
Chain LLMGenerates text responses from prompts.
Information ExtractorExtracts structured data from text.
Text ClassifierClassifies text into categories.
Sentiment AnalysisAnalyzes text sentiment.

Limitations

  • Must be connected to a parent node β€” cannot run standalone.
  • No streaming support in the Worker environment.
  • Token pricing varies significantly by model β€” monitor costs.
  • Some models may have rate limits or availability constraints.

Tips

  • Start with anthropic/claude-sonnet-4 β€” best overall quality for agent workflows and tool calling.
  • Use openai/gpt-4o-mini for high-volume, cost-sensitive workloads.
  • Browse available models at openrouter.ai/models to compare pricing and capabilities.
  • OpenRouter is the simplest way to try different models without managing multiple API keys.
  • Set Temperature to 0 for data extraction and classification tasks.

Related