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

n8n · LLMReleased 2025-09-26

How to Use Relace Apply 3 in n8n

Relace Apply 3 merges proposed edits into existing code. Give it the original code and an abbreviated edit snippet to get the merged code back.

Prompts to try with Relace Apply 3 in n8n

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

Each morning, use Relace Apply 3 to merge supplied Python code with its approved validation snippet. Compare the result with the original and report unexpected changes.

Relace Apply 3n8n
Try asking
  • On each scheduled run, use Relace Apply 3 to merge supplied TypeScript code with approved rename snippets. Check that the diff matches each requested rename.

  • Each week, use Relace Apply 3 to merge supplied Markdown text with approved section replacements. Flag changes outside the named sections.

  • For each scheduled batch, use Relace Apply 3 to merge supplied HTML with approved form-label edits. Compare the original and revised markup.

  • Each evening, use Relace Apply 3 to merge supplied Ruby code with approved deletion snippets. Require surrounding context and report the resulting diffs.

How to set up Relace Apply 3 in n8n

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

Use the Spiral skill

  1. Send n8n 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 Spiral's MCP server

  1. Create a key

    Create a key under API keys in the console.

  2. Add an MCP Client node

    In a workflow, add an MCP Client node (or, under an AI Agent node, an MCP Client Tool) and set:

    https://api.spiral.ai/mcp
  3. Pick a tool

    The node lists Spiral's tools. In an MCP Client node pick one, such as run, and give it its arguments:

    {
      "provider": "fal",
      "model": "fal-ai/flux/schnell",
      "input": { "prompt": "a lighthouse at dawn" },
      "wait": true
    }
  4. Run Relace Apply 3 in a workflow step

    Give the step an instruction like the ones below and run it on your trigger or schedule. Spiral finds Relace Apply 3, prices it and runs it each time the step fires.

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 Relace Apply 3

    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": "relace/relace-apply-3",
        "input": {
          "messages": [
            {
              "role": "system"
            }
          ]
        }
      }'

Then paste one of the prompts above: n8n finds Relace Apply 3 on Spiral, shows the price and runs it.

Relace Apply 3 providers and prices

Spiral runs Relace Apply 3 through OpenRouter. Open a card for today's price, with every fee included.

OpenRouterLLM
Relace: Relace Apply 3
relace/relace-apply-3

Settings you can ask for

Ask n8n for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Seeda whole number
Max tokens1 to 128000

The most output tokens to generate.

Every API field of Relace: Relace Apply 3 is on its tool page: open its card above.

What can you do with Relace Apply 3 in n8n?

Produce merged revisions from supplied code and approved edits during scheduled maintenance with Relace Apply 3. Have the scheduled agent compare each result with its original and flag unexpected changes.

Apply a TypeScript refactor

Merge a proposed function rename and updated call sites into existing TypeScript code, then inspect the resulting diff.

Merge a JavaScript bug fix

Apply a prepared correction to a calculation or event handler while retaining the surrounding implementation.

Update Python validation

Merge a proposed validation branch into a Python function using the original code and a focused edit snippet.

Revise Ruby application logic

Apply an approved method change to existing Ruby code and review the diff for unintended edits.

Apply HTML changes

Merge a prepared markup change, such as revised form labels, into the original HTML.

Maintain Markdown documentation

Merge a proposed section replacement into an existing Markdown document while retaining unrelated sections.

Questions about Relace Apply 3 in n8n

Can n8n use Relace Apply 3?

Yes. Add Spiral to n8n as an MCP server, and n8n can find and run Relace Apply 3 like any built-in tool.

How much does Relace Apply 3 cost in n8n?

Up to $0.006695 per run at the default inputs. $1.105 per 1M input tokens, $1.625 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your n8n plan is separate.

Do I need an OpenRouter account to use Relace Apply 3 in n8n?

You need no OpenRouter account. n8n uses one Spiral API key for every tool, and Spiral runs Relace Apply 3 on its own OpenRouter account.

How long does it take to set up Relace Apply 3 in n8n?

About two minutes: create a key, then add an MCP Client node, then pick a tool.

Does n8n wait while Relace Apply 3 runs?

Relace Apply 3 runs in the background. n8n starts the run, checks on it and gives you the text, json when it's ready.

What is Relace Apply 3 best used for?

Use it to merge an already proposed change into existing code. A useful workflow separates deciding what to change from applying that change.

How should I format a Relace Apply 3 prompt?

Put the original code inside <code> tags and the proposed edit inside <update> tags. Add a brief instruction describing the intended change when the snippet could be ambiguous.

Which programming languages does Relace Apply 3 cover?

Relace reports training across dozens of languages, emphasizing TypeScript, JavaScript, Python, Ruby, HTML, and Markdown. That training coverage does not establish equal accuracy across languages.

Should I send very large source code blocks?

Relace recommends refactoring files above 32,000 tokens to improve output quality. Treat that recommendation as a quality guideline when choosing how much code to send.

How do I make deletions clear?

Include surrounding code that identifies the section to remove. Preserve the indentation and structure you want in the final result.

Get started

Start using Relace Apply 3 in n8n

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

Paste this into n8n:

Set up n8n

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