OpenRouter API Key Setup — AI STRIX :
Create a key, choose a model, and connect OpenRouter to your MetaTrader 5 expert advisor.
1Create or sign in to your account
Visit OpenRouter and sign in. If you do not have an account, complete the sign-up process first.
Open OpenRouter2Open API key settings
Open the API Keys page in your account settings.
Go to API Keys3Create and copy your key
- Click Create API Key (the button may be labeled Create Key).
- Give it a recognizable name, such as AI STRIX MT5.
- If a spending limit is offered, choose a limit suitable for your usage.
- Create the key, then copy it and keep it in a secure place.
Keep the key private. Do not share it in screenshots, public files, or messages. This guide does not require you to enter your key here.
4Choose a model and check credits
Find the model you want to use and copy its exact model ID. Enter that ID in OpenRouterModel in the expert advisor.
Paid models require sufficient account credits. Free models may have usage limits and availability restrictions.
Browse models5Enter the key in MetaTrader 5
- Open the expert advisor's Properties on its chart and select Inputs.
- Set AIProvider to OpenRouter.
- Paste your key into OpenRouterAPIKey .
- Set OpenRouterModel to your chosen model's exact ID.
- Click OK to apply the settings.
6Allow the OpenRouter connection
- In MT5, open Tools → Options → Expert Advisors.
- Enable Allow WebRequest for listed URL.
- Add https://openrouter.ai to the allowed URL list.
- Click OK.
Other services used by the expert advisor may require their own allowed URLs.
If the connection does not work
- Missing key: check that you pasted the key into OpenRouterAPIKey .
- Authentication error: verify that the key is valid and has not been revoked.
- Credit error: check your OpenRouter balance and key spending limit.
- Model error: verify the exact model ID and its availability.
- Connection blocked: check the MT5 WebRequest allowlist and your internet connection.
- Rate limit: wait before retrying or review the model's limits.
With the updated AI STRIX version, an empty OpenRouter key keeps the EA attached to the chart and shows a setup guide while new AI analysis waits.
Official references: OpenRouter Quickstart · API Keys

