← Back to Help Center
OpenRouter

Setting Up OpenRouter

Connect cloud AI models to StashCanvas

What is OpenRouter?

OpenRouter is a service that provides access to a wide variety of cloud-based AI models from providers like OpenAI, Anthropic, Google, and many others. Unlike local solutions like Ollama, your data will be sent to OpenRouter's servers for processing.

Note: When using OpenRouter, your prompts and data will be sent to OpenRouter and the selected AI model provider for processing. Do not use OpenRouter for sensitive data you do not want to share with third parties.

Getting Your API Key

To use OpenRouter with StashCanvas, you need an API key. Here's how to get one:

  1. Visit openrouter.ai and sign up for an account
  2. After signing in, go to Settings (click your profile icon)
  3. Click on API Keys in the sidebar
  4. Click Create Secret Key
  5. Give your key a name (e.g., "StashCanvas") and copy the key

Important: Copy your API key immediately. You won't be able to see it again after leaving the page!

Choosing a Model

OpenRouter offers many models. You can browse and select models on their models page. For best results with coding tasks, we recommend:

  • Claude 4.6 Sonnet - Great for general coding and reasoning
  • GPT-5.4 - OpenAI's flagship model
  • Gemini 3.0 Flash - Fast and capable
  • Qwen3.5 Free - Capable model for free use

Copying the Model Name

When you find a model you want to use, you need to copy its full identifier. Here's how:

How to copy model name from OpenRouter
  1. Go to the models page
  2. Find and click on the model you want to use
  3. Look for the model identifier (usually shown in the URL or on the model detail page)
  4. Copy the full model name (e.g., anthropic/claude-4.6-sonnet)

Configuring in StashCanvas

Once you have your API key and model name, add an AI Chat node to your canvas and enter:

  • API Key: Paste your OpenRouter API key
  • Model: Paste the model identifier you copied (e.g., anthropic/claude-3.5-sonnet)

Costs

OpenRouter operates on a pay-per-use basis. You'll be charged based on the number of tokens (words) you send and receive. You can add funds to your account from the OpenRouter dashboard. Some models also offer free tiers or credits for new users.

Troubleshooting

Invalid API Key

Make sure you copied the full API key correctly. API keys start with "sk-or-" followed by a long string of characters.

Invalid Model Name

Check that you copied the full model identifier (e.g., anthropic/claude-4.6-sonnet). Make sure there are no extra spaces.

Insufficient Credits

If you get a credit error, go to your OpenRouter dashboard to add funds to your account.