Spiral gives your agent every tool with one account. Browse the tools →

Cursor · LLM

How to Use OpenRouter in Cursor

Use Qwen in Cursor through Spiral for a coding review, a proposed refactor, or multilingual app text. Start with Qwen3-Coder-Next for code tasks and try Qwen3.5-397B-A17B for localization work.

Prompts to try with OpenRouter in Cursor

Copy an example into Cursor, or ask in your own words.

Use Qwen3-Coder-Next through Spiral to review the failing test and its implementation. Send the failure output, relevant source, and test fixtures. Ask for the likely cause, a minimal proposed patch, and a regression test. Set max_tokens to 6000. Review the proposal against the code before applying it.

OpenRouterCursor
Try asking
  • Use Qwen3-Coder-Next through Spiral to propose a refactor of the duplicated validation logic in this project. Include the callers and existing tests. Request a patch that preserves public interfaces, plus an explanation of any behavior changes. Set max_tokens to 8000.

  • Use Qwen3.5-397B-A17B through Spiral to review this project's locale files against the source strings. Include the product glossary and flag missing keys, changed placeholders, and inconsistent terminology. Request JSON findings with file, key, issue, and suggested correction. Set max_tokens to 4000.

  • Use Qwen3-Coder-Next through Spiral to review the current diff for retry bugs. Include the retry implementation, its callers, and existing tests. Ask for concrete failure scenarios involving duplicate writes, timeouts, and exhausted retries, with file references for each finding.

  • Ask OpenRouter through Spiral to review the diff on this branch and list the three riskiest changes. Save the result in ./assets.

How to set up OpenRouter in Cursor

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. Add the hosted server

    Use Add to Cursor on the console's Agents & MCP page, or add this to .cursor/mcp.json (one project) or ~/.cursor/mcp.json (every project):

    {
      "mcpServers": {
        "spiral": { "url": "https://api.spiral.ai/mcp" }
      }
    }
  2. Sign in

    Open Cursor Settings › MCP, click Connect next to spiral, sign in to Spiral and click Authorize. No API key. Spiral then shows as connected, with its tools listed.

Use the Spiral skill

  1. Send Cursor this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run OpenRouter

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "openrouter",
        "model": "meta-llama/llama-4-maverick",
        "input": {
          "messages": [
            {
              "role": "system"
            }
          ]
        }
      }'

Then paste one of the prompts above: Cursor finds OpenRouter on Spiral, shows the price and runs it.

OpenRouter tools you can run in Cursor

3

Ready to run from Cursor: today's price, with every fee included.

OpenRouterLLM
Meta: Llama 4 Maverick
meta-llama/llama-4-maverick
OpenRouterLLM
MoonshotAI: Kimi K2.6
moonshotai/kimi-k2.6
OpenRouterLLM
DeepSeek: DeepSeek V4 Flash 0731
deepseek/deepseek-v4-flash-0731

What can you do with OpenRouter in Cursor?

Give Cursor a concrete task and ask it to send the relevant code, requirements, and failure logs to the selected model. Request a proposed patch with file references, then review the changes and run the relevant tests.

Diagnose a failing test

Send the failure log alongside the implementation and fixtures. Ask for a patch tied to the observed failure and a test that reproduces it.

Review a refactor across files

Include the shared logic, its callers, and interface constraints. Request a proposed diff and a list of assumptions to check before applying it.

Check app localization

Compare locale files with source strings and a product glossary. Request findings by file and key so each suggested correction is easy to review.

Review retry behavior

Ask for failure scenarios around timeouts, duplicate operations, and exhausted retries. Turn each credible finding into a targeted test.

Compare implementation plans

Send a feature requirement with the relevant interfaces and constraints. Ask for two implementation options, the files each would touch, and the tradeoffs to review.

Explain unfamiliar code

Provide an entry point and its dependencies. Ask for a walkthrough of the execution path, with file references and any assumptions called out.

Questions about OpenRouter in Cursor

Can Cursor use OpenRouter?

Yes. Add Spiral to Cursor as an MCP server, and Cursor can find and run OpenRouter like any built-in tool.

How much does OpenRouter cost in Cursor?

Each tool has its own price, for example Meta: Llama 4 Maverick: Up to $0.005342 per run at the default inputs. $0.455 per 1M input tokens, $1.30 per 1M output tokens; MoonshotAI: Kimi K2.6: Up to $0.018189 per run at the default inputs. $0.845 per 1M input tokens, $4.433 per 1M output tokens; DeepSeek: DeepSeek V4 Flash 0731: Up to $0.001601 per run at the default inputs. $0.05642 per 1M input tokens, $0.39 per 1M output tokens. You pay per run from one Spiral balance, and failed runs are free.

Do I need an OpenRouter account to use OpenRouter in Cursor?

No. Spiral runs OpenRouter on its own OpenRouter account. You sign in to Spiral once and never paste a key.

How long does it take to set up OpenRouter in Cursor?

About two minutes: add the hosted server, then sign in.

Does Cursor wait while OpenRouter runs?

OpenRouter runs in the background. Cursor starts the run, checks on it and gives you the text, json when it's ready.

Which Qwen model should I use for coding in Cursor?

Start with Qwen3-Coder-Next: its model card specifically targets coding agents and local development. Evaluate it on a real task with an existing test or clear acceptance criteria.

Can Qwen help translate app text?

Qwen3.5 supports 201 languages and dialects. For localization work, provide the source strings, glossary, and placeholder rules, then have a fluent reviewer check the suggestions.

What is Qwen3.5's context window?

The Qwen3.5-397B-A17B model card lists 262,144 tokens natively, extensible to 1,010,000. Check the selected tool's limits before planning a large request.

What should I include when asking Qwen to debug code?

Include the exact error, the smallest relevant code path, expected behavior, and a reproduction command. Ask for evidence behind the proposed cause and a regression test.

Should I send my whole repository to Qwen?

Start with the files that define the behavior, their callers, and relevant tests. Add more context when the review identifies a specific missing dependency.

Get started

Start using OpenRouter in Cursor

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into Cursor:

Set up Cursor

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options