---
title: "OpenRouter for C# and .NET in Visual Studio 2026 | iolys"
description: "Use OpenRouter in Visual Studio 2026 for C# and .NET with iolys. Discover models, attach images, use native web tools, and track credit, key budgets, and costs."
url: "https://getiolys.com/providers/openrouter"
language: "en"
updated: "2026-09-23"
---

# Use OpenRouter for C# and .NET in Visual Studio 2026.

Bring your OpenRouter API key to your C# and .NET workspace. Find models by price, context, and tool support, attach images with a Vision model, and use native web tools. Keep account credit, key spending, and reported conversation costs in view.

- Provider: OpenRouter
- Connection type: OpenAI-compatible API
- Access: Use your OpenRouter account directly
- Who pays for the AI usage: Uses your own API key, billed by the provider as prepaid credits or pay-as-you-go. There is no subscription to reuse.
- Where the model runs: The model runs in the provider's own cloud service.
- Best for: Choosing coding models across vendors, reviewing screenshots, researching documentation, and tracking API spending from Visual Studio.
- Official site: https://openrouter.ai/

Bring your own OpenRouter API key and keep provider usage under the account you control. iolys supplies the Visual Studio 2026 integration rather than bundling or reselling model tokens.

## How to connect OpenRouter in Visual Studio 2026

1. Create or retrieve an API key from your OpenRouter account.
2. Open Manage Models in iolys, choose Add Provider, select OpenRouter, and enter your API key. The endpoint is already configured. Use Test Connection to check access and refresh the catalog.
3. Pin the compatible models you want in the conversation picker, then choose an OpenRouter model and start a task in your C# or .NET solution.

## What you get

- **Find and pin your models** — Search your account's catalog, filter by price, context, and tool support, and pin models to your conversation picker. Paid-model eligibility depends on account credit and key limits.
- **Bring images into the conversation** — Attach screenshots and other images with a tool-capable Vision model. Image input support depends on the selected model.
- **Choose the reasoning effort** — Use the effort levels explicitly advertised by the selected model. Models without supported effort metadata do not show an effort selector.
- **Research with native tools** — Enable or disable Web Search, Web Fetch, and Datetime independently. They work alongside permitted iolys and MCP tools; native tools are an upstream beta feature and may incur additional charges.
- **See credit and key spending** — Check available account credit, spending by day, week, month, and total, plus the API key's budget when configured. Reported BYOK spending appears when available.
- **Follow conversation costs** — See API-reported costs accumulated across model calls in a turn, with token details and session totals when available. Missing usage can leave the amount incomplete.

## Requirements

iolys targets the Visual Studio 2026 IDE on 64-bit Windows. It requires access to a supported AI provider or a local Ollama instance. Git is required for isolated parallel workspaces. Visual Studio Code is a separate editor; iolys is an extension for the Visual Studio IDE.

## Price

All currently available iolys features are free for personal and commercial use. AI provider subscriptions, API usage, and infrastructure costs remain separate. iolys does not include a bundled model allowance.

## OpenRouter questions

### How can I use OpenRouter in Visual Studio for C#?

Install the iolys extension for Visual Studio 2026 and open your C# solution. Create or retrieve an API key from your OpenRouter account. Open Manage Models in iolys, choose Add Provider, select OpenRouter, and enter your API key. The endpoint is already configured. Use Test Connection to check access and refresh the catalog. Pin the compatible models you want in the conversation picker, then choose an OpenRouter model and start a task in your C# or .NET solution. You can then ask OpenRouter to help with your C# and .NET code from the iolys workspace.

### Is there a VSIX extension to use OpenRouter in Visual Studio?

Yes. iolys is a VSIX extension for Visual Studio 2026, and OpenRouter is one of the provider connections it ships with. Install the iolys VSIX once from the Visual Studio Marketplace, then add OpenRouter from the Manage Providers panel; there is no separate VSIX per provider.

### Does OpenRouter work in Visual Studio 2026?

Yes, with the iolys extension. It connects OpenRouter to Visual Studio 2026 with your own API key and brings the models available to your account into the active C# or .NET solution. Model discovery, conversations, supported image inputs, native web tools, and usage reporting all stay inside the IDE.

### Do I need an OpenRouter API key?

Yes. Add OpenRouter in Manage Models and enter your own API key. The endpoint is preset, and usage stays attached to your OpenRouter account. iolys protects stored credentials with Windows encryption for your Windows user account.

### How do I choose which OpenRouter models appear?

Search by name, model ID, or description; filter by price, context size, and tool support; then pin your preferred models. With no models pinned, all compatible available models appear in the conversation picker. Filtering does not remove existing pins.

### Why can I only see free models?

Paid models require available account credit and an API key whose spending limit allows them. If credit cannot be verified, discovery shows only free models and asks you to retry Test Connection. Free models still have OpenRouter usage limits.

### Can I attach images to an OpenRouter conversation in Visual Studio?

Yes, with a tool-capable model that advertises Vision support. Attach PNG, JPEG, GIF, or WebP images up to 20 MiB per file. The selected model may impose additional restrictions. This is image input for a conversation, not image generation.

### Can I adjust the reasoning effort?

Yes, when the selected model explicitly advertises supported effort levels. Available choices and defaults follow that model's metadata. Generic reasoning support alone does not enable the selector.

### Which native OpenRouter tools can I use in Visual Studio 2026?

Web Search finds current information, Web Fetch reads web URLs, and Datetime retrieves the current UTC date and time. Each can be disabled independently. Availability follows model tool support and the active agent's tool selection. These upstream beta tools may incur additional charges.

### What is the difference between account credit and a key budget?

Account credit is the balance available in your OpenRouter account. A key budget is a separate spending cap for the configured API key. The progress bar shows consumption of that key budget, not account credit. An unlimited key can still belong to an account with no credit.

### How are OpenRouter conversation costs calculated?

iolys accumulates the monetary costs reported by OpenRouter across model calls in a turn, rather than multiplying catalog prices by token counts. The Est. Cost display can include token details and a session total. Missing usage can make the total incomplete, and a missing amount does not prove a request was free. The shared tooltip's public-list-price wording does not describe the OpenRouter calculation.

### Does this integration configure OpenRouter routing or BYOK?

No. The integration provides model discovery, conversations, supported image inputs, native tools, and usage reporting. Routing preferences, fallback chains, and BYOK setup are not configured in this panel. Existing BYOK spending can appear in Usage when OpenRouter reports it.

## Related pages

- [Bring Your Own AI Subscription to Visual Studio 2026 | iolys](https://getiolys.com/)
- [Bring Your Own Model (BYOM) in Visual Studio 2026 | iolys](https://getiolys.com/byom)
- [AI coding agent capabilities for Visual Studio | iolys](https://getiolys.com/capabilities)
- [Visual Studio integrations for C# and .NET | iolys](https://getiolys.com/integrations)
- [GitHub Copilot alternative for Visual Studio and C# | iolys](https://getiolys.com/copilot-alternative-visual-studio)
- [AI providers and BYOS for Visual Studio 2026 | iolys](https://getiolys.com/providers)
- [What is iolys? AI coding agent harness for Visual Studio | iolys](https://getiolys.com/what-is-iolys)
- [The story behind iolys | From iolite to AI in Visual Studio](https://getiolys.com/our-story)
- [Install iolys from the Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=iolys.iolys-visual-studio)
- [iolys blog](https://getiolys.com/blog)
