[{"data":1,"prerenderedAt":735},["ShallowReactive",2],{"\u002Fdocs\u002Fopenrouter-api-key":3,"docs-nav":693},{"id":4,"title":5,"answer":6,"body":7,"brands":636,"date":645,"description":646,"extension":647,"faq":648,"keywords":664,"meta":669,"navigation":670,"order":671,"path":672,"product":673,"related":676,"seo":683,"stem":684,"steps":685,"updated":645,"__hash__":692},"docs\u002Fdocs\u002Fopenrouter-api-key.md","How to get an OpenRouter API key","Sign in at openrouter.ai, buy credits on the Credits page, then create a key on the API keys page with a credit limit. In WLN, paste it in Settings › Models and API key › OpenRouter key and press Save.",{"type":8,"value":9,"toc":620},"minimark",[10,14,19,30,33,56,69,73,97,101,116,120,137,145,153,157,188,194,204,208,215,286,293,298,320,323,327,337,362,377,381,392,428,431,451,454,461,465,482,488,492,495,616],[11,12,13],"p",{},"One OpenRouter key reaches models from many companies, which makes it the easiest key to start WLN with. All of WLN’s team presets run on it.",[15,16,18],"h2",{"id":17},"what-openrouter-is","What OpenRouter is",[11,20,21,22,29],{},"OpenRouter sits between you and the AI companies. You send a request to OpenRouter with one key, name the model you want, and OpenRouter passes it to a company that runs that model. Its docs say it gives you hundreds of models through a single API and handles fallbacks for you (",[23,24,28],"a",{"href":25,"rel":26},"https:\u002F\u002Fopenrouter.ai\u002Fdocs\u002Fquickstart",[27],"nofollow","OpenRouter quickstart, checked 5 Dec 2026",").",[11,31,32],{},"What that means in practice:",[34,35,36,44,50],"ul",{},[37,38,39,43],"li",{},[40,41,42],"strong",{},"One balance for every model."," You don’t need an account with each AI company.",[37,45,46,49],{},[40,47,48],{},"Prices per model."," Each model has its own price per million tokens, and a few have free versions.",[37,51,52,55],{},[40,53,54],{},"A fee on top-ups."," OpenRouter charges a fee when you buy credits, not on each request (see below).",[11,57,58,59,63,64,68],{},"The trade-off is one more company in the middle. WLN’s consent sheet says so plainly: “OpenRouter passes each request on to the company that runs the model you picked.” If you’d rather deal with one company directly, use an ",[23,60,62],{"href":61},"\u002Fdocs\u002Fanthropic-api-key","Anthropic"," or ",[23,65,67],{"href":66},"\u002Fdocs\u002Fopenai-api-key","OpenAI"," key instead, or as well.",[15,70,72],{"id":71},"before-you-start","Before you start",[34,74,75,86],{},[37,76,77,80,81,29],{},[40,78,79],{},"You pay with credits."," OpenRouter calls credits deposits you use for AI requests. On the standard pay-as-you-go plan, card purchases carry a 5.5% fee with a $0.80 minimum. OpenRouter also says it may expire unused credits one year after purchase (",[23,82,85],{"href":83,"rel":84},"https:\u002F\u002Fopenrouter.ai\u002Fdocs\u002Ffaq",[27],"OpenRouter FAQ, checked 5 Dec 2026",[37,87,88,91,92,29],{},[40,89,90],{},"A balance below zero blocks everything."," OpenRouter says a negative balance can cause errors even on free models, until you add credits (",[23,93,96],{"href":94,"rel":95},"https:\u002F\u002Fopenrouter.ai\u002Fdocs\u002Fapi_reference\u002Flimits",[27],"OpenRouter docs, checked 5 Dec 2026",[15,98,100],{"id":99},"step-1-sign-in-and-buy-credits","Step 1: Sign in and buy credits",[11,102,103,104,109,110,115],{},"Go to ",[23,105,108],{"href":106,"rel":107},"https:\u002F\u002Fopenrouter.ai",[27],"openrouter.ai"," and sign in, or create an account. Then open the ",[23,111,114],{"href":112,"rel":113},"https:\u002F\u002Fopenrouter.ai\u002Fsettings\u002Fcredits",[27],"Credits page"," and add credit.",[15,117,119],{"id":118},"step-2-create-the-key-with-a-credit-limit","Step 2: Create the key with a credit limit",[11,121,122,123,128,129,132,133,136],{},"Open the ",[23,124,127],{"href":125,"rel":126},"https:\u002F\u002Fopenrouter.ai\u002Fkeys",[27],"API keys page",". In WLN, the ",[40,130,131],{},"Get a key"," link under the OpenRouter key field opens the same page. Create a key, give it a name such as “WLN on my MacBook”, and choose a ",[40,134,135],{},"credit limit",".",[11,138,139,140,144],{},"OpenRouter recommends a credit limit on every key. When a key reaches it, OpenRouter turns its requests down until you raise the limit on that key’s page (",[23,141,96],{"href":142,"rel":143},"https:\u002F\u002Fopenrouter.ai\u002Fdocs\u002Fapi-reference\u002Fauthentication",[27],"). We’d set one even if it’s generous. It’s the cheapest insurance you can buy against a leaked key.",[11,146,147,148,152],{},"Copy the key and keep it somewhere safe. It starts with ",[149,150,151],"code",{},"sk-or-",", the hint WLN shows in its OpenRouter field.",[15,154,156],{"id":155},"step-3-put-the-key-in-wln","Step 3: Put the key in WLN",[158,159,160,171,178,185],"ol",{},[37,161,162,163,166,167,170],{},"In WLN, open ",[40,164,165],{},"Settings › Models and API key",". The ",[40,168,169],{},"OpenRouter key"," section is at the top.",[37,172,173,174,177],{},"Paste the key and press ",[40,175,176],{},"Save",". WLN keeps it in Keychain on your Mac and checks it with OpenRouter. You’ll see “Checking your key with OpenRouter…” for a moment.",[37,179,180,181,184],{},"WLN asks “Send your chats to OpenRouter?”. Press ",[40,182,183],{},"Allow",". No chat goes to OpenRouter until you do.",[37,186,187],{},"When the line turns green and says “Saved. Live chat is ready.”, you’re set.",[189,190],"doc-shot",{"alt":191,"caption":192,"name":193},"The OpenRouter key section in WLN with the status Saved. Live chat is ready, a Remove button and a Get a key link. The key is blurred.","A saved OpenRouter key. We blurred the key in this screenshot.","d4-openrouter-key-saved",[11,195,196,197,200,201,203],{},"Unlike the Anthropic, OpenAI and SubQ sections, the OpenRouter section has no ",[40,198,199],{},"Test"," button. WLN checks the key when you press ",[40,202,176],{}," by loading your OpenRouter balance, and tries again when you open these settings if that didn’t work.",[15,205,207],{"id":206},"choose-your-models","Choose your models",[11,209,210,211,214],{},"There’s no model menu in the chat. Every reply comes from WLN’s team, a Planner, a Builder and an optional Reviewer, and their models are set in ",[40,212,213],{},"Settings › Models and API key › Team",". With an OpenRouter key, the presets work:",[216,217,218,237],"table",{},[219,220,221],"thead",{},[222,223,224,228,231,234],"tr",{},[225,226,227],"th",{},"Preset",[225,229,230],{},"Planner",[225,232,233],{},"Builder",[225,235,236],{},"Reviewer",[238,239,240,258,272],"tbody",{},[222,241,242,249,252,255],{},[243,244,245,248],"td",{},[40,246,247],{},"Balanced"," ★",[243,250,251],{},"Claude Sonnet 5.5",[243,253,254],{},"DeepSeek V4.1 Flash",[243,256,257],{},"GLM 5.3",[222,259,260,265,267,270],{},[243,261,262],{},[40,263,264],{},"Cheapest",[243,266,257],{},[243,268,269],{},"GLM 5.3 Flash",[243,271,254],{},[222,273,274,279,282,284],{},[243,275,276],{},[40,277,278],{},"Strongest",[243,280,281],{},"Claude Opus 5.5",[243,283,254],{},[243,285,251],{},[11,287,288,289,292],{},"All of these run through OpenRouter. ",[40,290,291],{},"Custom"," lets you pick any model per role, with each model’s price per million tokens next to it.",[294,295,297],"h3",{"id":296},"add-any-openrouter-model-by-its-id","Add any OpenRouter model by its ID",[11,299,300,301,304,305,308,309,312,313,316,317,319],{},"Below the Team section, ",[40,302,303],{},"Models · OpenRouter"," lists the models most used on OpenRouter this month, with their prices. To use a model that isn’t on the list, type its OpenRouter ID into the ",[40,306,307],{},"Add a model"," field, such as ",[149,310,311],{},"minimax\u002Fminimax-m3",", and press ",[40,314,315],{},"Add",". WLN checks it with OpenRouter first. If it works, you’ll see “Added … after live OpenRouter validation.” and the model shows up in the Team section’s model menus with a ",[40,318,291],{}," badge in the list.",[11,321,322],{},"A model that can’t use tools can’t join the team. WLN greys it out and says why.",[15,324,326],{"id":325},"see-your-balance-in-wln","See your balance in WLN",[11,328,329,330,166,333,336],{},"Open ",[40,331,332],{},"Settings › Usage and billing",[40,334,335],{},"OpenRouter balance"," section shows what OpenRouter shares about your key:",[34,338,339,345,351,356],{},[37,340,341,344],{},[40,342,343],{},"Credits left",", and how much you’ve bought in total",[37,346,347,350],{},[40,348,349],{},"This key, this month"," and today",[37,352,353],{},[40,354,355],{},"This key, all time",[37,357,358,361],{},[40,359,360],{},"Key spending limit",", with how much of it is left",[11,363,364,365,368,369,372,373,136],{},"Press ",[40,366,367],{},"Refresh"," to ask OpenRouter again. Below that, ",[40,370,371],{},"WLN chats"," shows what your chats cost this month and in total, and which chats cost the most. WLN’s own $5 limit per new chat works on top of the key’s credit limit. More in ",[23,374,376],{"href":375},"\u002Fdocs\u002Fget-started","Get started with WLN",[15,378,380],{"id":379},"using-the-key-in-your-own-scripts","Using the key in your own scripts",[11,382,383,384,387,388,391],{},"OpenRouter’s docs use an environment variable called ",[149,385,386],{},"OPENROUTER_API_KEY"," in their examples and strongly recommend keeping keys out of your code (",[23,389,96],{"href":142,"rel":390},[27],"). On a Mac, open your shell settings in Terminal:",[393,394,399],"pre",{"className":395,"code":396,"language":397,"meta":398,"style":398},"language-bash shiki shiki-themes github-light github-dark","touch ~\u002F.zshrc && open -e ~\u002F.zshrc\n","bash","",[149,400,401],{"__ignoreMap":398},[402,403,406,410,414,418,421,425],"span",{"class":404,"line":405},"line",1,[402,407,409],{"class":408},"sScJk","touch",[402,411,413],{"class":412},"sZZnC"," ~\u002F.zshrc",[402,415,417],{"class":416},"sVt8B"," && ",[402,419,420],{"class":408},"open",[402,422,424],{"class":423},"sj4cs"," -e",[402,426,427],{"class":412}," ~\u002F.zshrc\n",[11,429,430],{},"Add this line with your key in place of the placeholder, save, and open a new Terminal window:",[393,432,434],{"className":395,"code":433,"language":397,"meta":398,"style":398},"export OPENROUTER_API_KEY='paste-your-key-here'\n",[149,435,436],{"__ignoreMap":398},[402,437,438,442,445,448],{"class":404,"line":405},[402,439,441],{"class":440},"szBVR","export",[402,443,444],{"class":416}," OPENROUTER_API_KEY",[402,446,447],{"class":440},"=",[402,449,450],{"class":412},"'paste-your-key-here'\n",[11,452,453],{},"Pasting the key into the file, not into a Terminal command, keeps it out of your shell history.",[11,455,456,457,460],{},"That stores the key as plain text in ",[149,458,459],{},"~\u002F.zshrc",". WLN doesn’t read this variable; it uses the copy in Keychain. Give your scripts their own key with their own credit limit.",[15,462,464],{"id":463},"keep-the-key-safe","Keep the key safe",[34,466,467,470,473],{},[37,468,469],{},"Never paste it into a chat, an email or a code repository.",[37,471,472],{},"Use one key per app or per Mac, each with its own credit limit.",[37,474,475,476,481],{},"If a key leaks, delete it on the ",[23,477,480],{"href":478,"rel":479},"https:\u002F\u002Fopenrouter.ai\u002Fsettings\u002Fkeys",[27],"key settings page"," and make a new one.",[11,483,484,485,29],{},"OpenRouter is a GitHub secret scanning partner. If it finds that a key was exposed, it emails you (",[23,486,96],{"href":142,"rel":487},[27],[15,489,491],{"id":490},"when-something-goes-wrong","When something goes wrong",[11,493,494],{},"For OpenRouter, WLN shows a short title on the error card and then OpenRouter’s own words, after “OpenRouter error: OpenRouter HTTP” and the status number.",[216,496,497,510],{},[219,498,499],{},[222,500,501,504,507],{},[225,502,503],{},"WLN shows",[225,505,506],{},"What it means",[225,508,509],{},"What to do",[238,511,512,525,538,555,571,583,594,605],{},[222,513,514,519,522],{},[243,515,516],{},[40,517,518],{},"Check your OpenRouter key",[243,520,521],{},"OpenRouter didn’t accept the key (HTTP 401 or 403).",[243,523,524],{},"Copy the key again, or make a new one and save it in Settings.",[222,526,527,532,535],{},[243,528,529],{},[40,530,531],{},"Not enough OpenRouter credit",[243,533,534],{},"The balance can’t cover the request, or it’s below zero (HTTP 402).",[243,536,537],{},"Add credits on the Credits page. If the key has a credit limit, check that too.",[222,539,540,545,552],{},[243,541,542],{},[40,543,544],{},"Too many requests right now",[243,546,547,548,551],{},"A rate limit (HTTP 429). On ",[149,549,550],{},":free"," models, often the daily limit.",[243,553,554],{},"Wait, or buy at least 10 credits to raise the free-model daily limit.",[222,556,557,562,565],{},[243,558,559],{},[40,560,561],{},"The AI provider had a problem",[243,563,564],{},"Something failed at OpenRouter or at the company running the model (HTTP 5xx).",[243,566,364,567,570],{},[40,568,569],{},"Try again",", or pick another model for that role.",[222,572,573,576,579],{},[243,574,575],{},"The AI provider stopped this reply with an error before it finished. It’s usually a passing problem, so press Try again.",[243,577,578],{},"The model’s company ended the reply early.",[243,580,364,581,136],{},[40,582,569],{},[222,584,585,588,591],{},[243,586,587],{},"This chat is too long for “model name”…",[243,589,590],{},"The chat no longer fits in the model’s context window.",[243,592,593],{},"Start a new chat, shorten a long paste, or pick a model with a bigger window.",[222,595,596,599,602],{},[243,597,598],{},"Could not load your OpenRouter balance: …",[243,600,601],{},"Shown in Settings when the key check fails.",[243,603,604],{},"Read OpenRouter’s words after the colon. Usually the key is wrong or was deleted.",[222,606,607,610,613],{},[243,608,609],{},"Custom model rejected: …",[243,611,612],{},"The model ID was wrong, or the model can’t chat.",[243,614,615],{},"Use the form provider\u002Fmodel, as shown on the model’s OpenRouter page.",[617,618,619],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":398,"searchDepth":621,"depth":621,"links":622},2,[623,624,625,626,627,628,632,633,634,635],{"id":17,"depth":621,"text":18},{"id":71,"depth":621,"text":72},{"id":99,"depth":621,"text":100},{"id":118,"depth":621,"text":119},{"id":155,"depth":621,"text":156},{"id":206,"depth":621,"text":207,"children":629},[630],{"id":296,"depth":631,"text":297},3,{"id":325,"depth":621,"text":326},{"id":379,"depth":621,"text":380},{"id":463,"depth":621,"text":464},{"id":490,"depth":621,"text":491},[637,62,638,67,639,640,641,642,643,644],"OpenRouter","Claude","SubQ","DeepSeek","GLM","MiniMax","GitHub","LiteLLM","2026-12-05","What OpenRouter is, how to buy credits, create a key with a credit limit and use it in WLN for hundreds of models. Checked on openrouter.ai on 5 Dec 2026.","md",[649,652,655,658,661],{"q":650,"a":651},"What is OpenRouter?","\u003Cp>A service that gives you hundreds of AI models from many companies through one API and one key (\u003Ca href=\"https:\u002F\u002Fopenrouter.ai\u002Fdocs\u002Fquickstart\">OpenRouter, checked 5 Dec 2026\u003C\u002Fa>). You buy credits once, and each request is paid from them at that model’s listed price.\u003C\u002Fp>",{"q":653,"a":654},"Does OpenRouter charge a fee?","\u003Cp>Yes, on credit purchases. OpenRouter’s FAQ lists 5.5% (at least $0.80) for card payments on its standard pay-as-you-go plan, so $10 of credit costs $10.80 (\u003Ca href=\"https:\u002F\u002Fopenrouter.ai\u002Fdocs\u002Ffaq\">checked 5 Dec 2026\u003C\u002Fa>).\u003C\u002Fp>",{"q":656,"a":657},"Can I use free models with an OpenRouter key?","\u003Cp>Yes. Models whose ID ends in \u003Ccode>:free\u003C\u002Fcode> cost nothing but have limits: 50 requests a day until you’ve bought at least 10 credits, then 1,000 a day, and 20 a minute either way (\u003Ca href=\"https:\u002F\u002Fopenrouter.ai\u002Fdocs\u002Fapi_reference\u002Flimits\">checked 5 Dec 2026\u003C\u002Fa>).\u003C\u002Fp>",{"q":659,"a":660},"Do I need an OpenRouter key for WLN?","\u003Cp>Not for chat: any one key from OpenRouter, Anthropic, OpenAI or SubQ is enough. But WLN’s Balanced, Cheapest and Strongest presets all use OpenRouter models, so without an OpenRouter key you choose Custom.\u003C\u002Fp>",{"q":662,"a":663},"Where does WLN keep my OpenRouter key?","\u003Cp>In Keychain on your Mac. WLN sends it only to OpenRouter.\u003C\u002Fp>",[665,666,667,668],"openrouter api key","what is openrouter","openrouter key","openrouter credits",{},true,4,"\u002Fdocs\u002Fopenrouter-api-key",{"to":674,"label":675},"\u002Fopenrouter-client-mac","OpenRouter client for Mac",[677,678,680],{"to":375,"label":376},{"to":61,"label":679},"How to get an Anthropic (Claude) API key",{"to":681,"label":682},"\u002Fblog\u002Flitellm-vs-openrouter","LiteLLM vs OpenRouter",{"title":5,"description":646},"docs\u002Fopenrouter-api-key",[686,687,688,689,690,691],"Sign in or create an account at openrouter.ai.","Buy credits on the Credits page.","Open the API keys page, create a key, name it and set a credit limit.","Copy the key and keep it somewhere safe.","In WLN, paste the key in Settings › Models and API key › OpenRouter key and press Save.","Press Allow when WLN asks to send your chats to OpenRouter.","6Rj1wQjbeT8Te652grhKwhB4IHZ1Yj6RNXLUx7yMiQ0",[694,695,697,698,699,703,707,711,715,719,723,727,731],{"title":376,"path":375,"order":405},{"title":696,"path":66,"order":621},"How to get an OpenAI API key",{"title":679,"path":61,"order":631},{"title":5,"path":672,"order":671},{"title":700,"path":701,"order":702},"How to get a SubQ API key","\u002Fdocs\u002Fsubq-api-key",5,{"title":704,"path":705,"order":706},"What a chat costs, and how the $5 spending limit works","\u002Fdocs\u002Fcosts-and-spending-limit",6,{"title":708,"path":709,"order":710},"The coding team: Planner, Builder and Reviewer","\u002Fdocs\u002Fcoding-team",7,{"title":712,"path":713,"order":714},"Connectors (MCP servers) in WLN","\u002Fdocs\u002Fconnectors",8,{"title":716,"path":717,"order":718},"Skills and memories","\u002Fdocs\u002Fskills-and-memory",9,{"title":720,"path":721,"order":722},"Web search and the browser","\u002Fdocs\u002Fweb-search-and-browser",10,{"title":724,"path":725,"order":726},"Live preview: run your project and see artifacts","\u002Fdocs\u002Flive-preview",11,{"title":728,"path":729,"order":730},"Privacy: where WLN keeps your keys and chats","\u002Fdocs\u002Fprivacy",12,{"title":732,"path":733,"order":734},"Requirements, updates and troubleshooting","\u002Fdocs\u002Ftroubleshooting",13,1796476260096]