OpenRouter
openrouter.ai › docs › quickstart
OpenRouter Quickstart Guide | Developer Documentation | OpenRouter | Documentation
OpenRouter provides a unified API that gives you access to hundreds of AI models through a single endpoint, while automatically handling fallbacks and selecting the most cost-effective options. Get started with just a few lines of code using your preferred SDK or framework. Looking for information about free models and rate limits? Please see the FAQ · In the examples below, the OpenRouter-specific headers are optional.
Videos
12:26
How to use Openrouter (Access Every LLM At Once) - YouTube
04:11
How to Use OpenRouter Models in Cursor - YouTube
10:42
OpenRouter: Easily access multiple AI models (including FREE ones) ...
13:12
n8n adds DEEPSEEK & OpenRouter Chat Models!! - YouTube
11:10
How I am Autoblogging With OpenRouter AI | Access Any AI Model ...
06:36
OpenRouter, Perplexity Online, and URL Merge! Massive ZimmWriter ...
DataCamp
datacamp.com › tutorial › openrouter
OpenRouter: A Guide With Practical Examples | DataCamp
August 14, 2025 - First, the base_url parameter redirects your requests to OpenRouter's servers instead of OpenAI's. Second, the model name follows a provider/model-name format - openai/gpt-5-mini instead of just gpt-5-mini. This tells OpenRouter which provider's version you want while keeping the familiar interface. Here are some common models that you can plug into the above example without any errors:
Relevance AI
relevanceai.com › llm-models › set-up-and-use-openrouter-auto-llm-for-ai-applications
OpenRouter Auto llm - Relevance AI
At its core, OpenRouter provides an OpenAI-compatible completion API that developers can leverage either through direct calls or by utilizing the OpenAI SDK. The base URL for all API interactions is 'https://openrouter.ai/api/v1'. When making requests, developers can enhance their application's ...
Cline
docs.cline.bot › provider-config › openrouter
OpenRouter - Cline
Enter API Key: Paste your OpenRouter API key into the “OpenRouter API Key” field. Select Model: Choose your desired model from the “Model” dropdown. (Optional) Custom Base URL: If you need to use a custom base URL for the OpenRouter API, check “Use custom base URL” and enter the URL.
Kilo
kilo.ai › openrouter
Using OpenRouter With Kilo Code | Kilo Code Docs
Enter API Key: Paste your OpenRouter API key into the "OpenRouter API Key" field. Select Model: Choose your desired model from the "Model" dropdown. (Optional) Custom Base URL: If you need to use a custom base URL for the OpenRouter API, check "Use custom base URL" and enter the URL.
Reddit
reddit.com › r/openwebui › openrouter?
r/OpenWebUI on Reddit: OpenRouter?
October 30, 2024 -
Sorry for the dumb question - how do I go about connecting my OpenRouter API key? I'm using the Anthropic function to connect my Anthropic API and that seems to be working well. Could not find similar for OpenRouter.
Thanks in advance!
Top answer 1 of 2
9
Openrouter has an OpenAI compatible API. In the Admin settings under 'Connections' you can add an OpenAI API connection. Use https://openrouter.ai/api/v1 as your API Base URL, and the key by Openrouter as your API Key.
2 of 2
1
I went to the connections from the admin settings and added the openrouter api, but the models do not appear, only when I add the connection from the user settings, the models appear like that.
OpenRouter
openrouter.ai › docs › guides › overview › multimodal › images
OpenRouter Image Inputs | Complete Documentation | OpenRouter | Documentation
The image_url can either be a URL or a base64-encoded image. Note that multiple images can be sent in separate content array entries. The number of images you can send in a single request varies per provider and per model. Due to how the content is parsed, we recommend sending the text prompt first, then the images. If the images must come first, we recommend putting it in the system prompt. OpenRouter supports both direct URLs and base64-encoded data for images:
OpenRouter
openrouter.ai
OpenRouter
250k+ apps using OpenRouter with 4.2M+ users globallyView all
OpenRouter
openrouter.ai › docs › faq
OpenRouter FAQ | Developer Documentation | OpenRouter | Documentation
OpenRouter implements the OpenAI API specification for /completions and /chat/completions endpoints, allowing you to use any model with the same request/response format. Additional endpoints like /api/v1/models are also available. See our API documentation for detailed specifications. The API supports text, images, and PDFs. Images can be passed as URLs or base64 encoded images.
Reddit
reddit.com › r/chatgptcoding › eli5: how does openrouter work?
r/ChatGPTCoding on Reddit: ELI5: how does Openrouter work?
September 10, 2024 -
https://openrouter.ai/
How does it work? Is it spammy/legit? I only ask because with all my recent comments about my workflow and tools I use, I have been getting unsolicited DMs, inviting me to "join, we have room". Just seems spammy to me.
My bill this month for ChatGPT Pro + API, Claude Sonnet + API, and Cursor will probably be over $60 easy. I'm okay with that.
BUT if this OpenRouter service is cheaper? why not, right?
I just don't get it.
ELI5?
LiteLLM
docs.litellm.ai › supported models & providers › openrouter
OpenRouter | liteLLM
For production environments, you can dynamically configure the base_url using environment variables: import os from litellm import completion # Configure with environment variables OPENROUTER_API_KEY = os.getenv("OPENROUTER_API_KEY") OPENROUTER_BASE_URL = os.getenv("OPENROUTER_API_BASE", "https://openrouter.ai/api/v1") # Set environment for LiteLLM os.environ["OPENROUTER_API_KEY"] = OPENROUTER_API_KEY os.environ["OPENROUTER_API_BASE"] = OPENROUTER_BASE_URL response = completion( model="openrouter/google/palm-2-chat-bison", messages=messages, base_url=OPENROUTER_BASE_URL # Explicitly pass base_url for clarity )
OpenRouter
openrouter.ai › docs › use-cases › byok
BYOK | Use Your Own Provider Keys with OpenRouter | OpenRouter | Documentation
Make sure to append /chat/completions to the base URL. You can read more in the Azure Foundry documentation. api_key: In the same “Overview” section of your Azure AI Services resource, you can find your API key under “Keys and Endpoint”. model_id: This is the name of your model deployment in Azure AI Services. model_slug: This is the OpenRouter model identifier you want to use this key for.
GitHub
github.com › cline › cline › pull › 5636
feat(openrouter): Support Custom Base URL for OpenRouter API by xiaoguomeiyitian · Pull Request #5636 · cline/cline
Uses BaseUrlField component to handle custom URL input. This description was created by for a0bfaef. You can customize this summary. It will automatically update as commits are pushed. feat(openrouter): Allow custom base URL for OpenRouter …
Author cline