[Integrations](https://spiral.ai/integrations) › [n8n](https://spiral.ai/integrations/n8n) › [GPT-4o mini](https://spiral.ai/integrations/n8n/gpt-4o-mini)

# How to Use GPT-4o mini in n8n

GPT-4o mini suits extraction, short replies, and small coding tasks. Its undated name selects the default snapshot, currently GPT-4o mini (2024-07-18).

|  |  |
| --- | --- |
| Model | GPT-4o mini |
| Available through | OpenAI |
| Category | LLM |
| Price | Up to $0.003202 per run at the default inputs. $0.195 per 1M input tokens, $0.0975 per 1M cached input tokens, $0.78 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, with a Spiral API key |

## Prompts to try with GPT-4o mini in n8n

- Each morning, use GPT-4o mini to label newly received support messages as billing, technical issue, cancellation, or other. Report the label and a supporting phrase for each message, and keep uncertain cases separate.
- Every weekday afternoon, use GPT-4o mini to draft replies to unresolved customer conversations supplied for this run. Keep each draft under 120 words and flag questions the conversation does not answer.
- Each Friday, use GPT-4o mini to classify the week's customer feedback as bug, feature request, praise, or other. Return the message reference, label, and supporting phrase in the same table layout each week.
- Every Monday at 9am: ask GPT-4o mini through Spiral to review the diff on this branch and list the three riskiest changes.
- Get a second opinion from GPT-4o mini on this function, then tell me what the call cost.

## How to set up GPT-4o mini 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:

```text
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:

```json
{
  "provider": "fal",
  "model": "fal-ai/flux/schnell",
  "input": { "prompt": "a lighthouse at dawn" },
  "wait": true
}
```

4. **Run GPT-4o mini in a workflow step**: Give the step an instruction like the ones below and run it on your trigger or schedule. Spiral finds GPT-4o mini, 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.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run GPT-4o mini**: One request; the result comes back by polling or a webhook.

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

Then paste one of the prompts above: n8n finds GPT-4o mini on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/n8n

## GPT-4o mini tools and prices

- [GPT-4o-mini](https://spiral.ai/tools/openai/openai/gpt-4o-mini) (OpenAI): Up to $0.003202 per run at the default inputs. $0.195 per 1M input tokens, $0.0975 per 1M cached input tokens, $0.78 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| seed |  | — |  |
| stop |  | — |  |
| tools |  | — |  |
| top_p | 0 to 1 | — |  |
| logprobs |  | — |  |
| max_tokens | 16 to … | — | The most output tokens to generate. |

## What can you do with GPT-4o mini in n8n?

Turn incoming messages and meeting updates into recurring triage reports with GPT-4o mini. Reuse defined labels and a fixed report layout so results are easier to compare across runs.

### Extract receipt details from text

Give GPT-4o mini receipt text and request merchant, date, total, and currency in a defined record. Require missing values to remain empty.

### Label support requests

Ask GPT-4o mini to assign a defined intent label to each message. Supply examples for ambiguous requests and require a supporting phrase.

### Draft email replies

Provide the conversation history and ask GPT-4o mini for a concise reply that addresses open questions without inventing commitments.

### Extract meeting follow-ups

Turn meeting notes into tasks, owners, and stated due dates with GPT-4o mini. Keep tentative suggestions separate from confirmed assignments.

### Draft tests for a function

Give GPT-4o mini a function and its expected behavior. Request tests for ordinary inputs, boundary conditions, and invalid inputs, then run them.

### Explain a small code change

Ask GPT-4o mini to explain a focused diff, identify changed behavior, and point to the relevant lines for review.

### Translate customer messages

Ask GPT-4o mini to translate a message into the requested language while preserving product names, identifiers, and stated dates.

### Prepare records for validation

Have GPT-4o mini extract named attributes from incoming text into a supplied schema. Validate the structure and compare important values with the source.

## Overview

- [OpenAI](https://spiral.ai/providers/openai)
- [All n8n guides](https://spiral.ai/integrations/n8n)

## GPT-4o mini in other agents

- [Amp](https://spiral.ai/integrations/amp/gpt-4o-mini)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/gpt-4o-mini)
- [Claude](https://spiral.ai/integrations/claude-desktop/gpt-4o-mini)
- [Claude Code](https://spiral.ai/integrations/claude-code/gpt-4o-mini)
- [Cline](https://spiral.ai/integrations/cline/gpt-4o-mini)
- [Codex](https://spiral.ai/integrations/codex/gpt-4o-mini)
- [Cursor](https://spiral.ai/integrations/cursor/gpt-4o-mini)
- [Devin](https://spiral.ai/integrations/devin/gpt-4o-mini)
- [dots](https://spiral.ai/integrations/dots/gpt-4o-mini)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/gpt-4o-mini)
- [Gemini](https://spiral.ai/integrations/gemini/gpt-4o-mini)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/gpt-4o-mini)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/gpt-4o-mini)
- [goose](https://spiral.ai/integrations/goose/gpt-4o-mini)
- [Grok](https://spiral.ai/integrations/grok/gpt-4o-mini)
- [Grok Build](https://spiral.ai/integrations/grok-build/gpt-4o-mini)
- [Hermes](https://spiral.ai/integrations/hermes/gpt-4o-mini)
- [Instinct](https://spiral.ai/integrations/instinct/gpt-4o-mini)
- [Manus](https://spiral.ai/integrations/manus/gpt-4o-mini)
- [Muse](https://spiral.ai/integrations/muse/gpt-4o-mini)
- [Muse Code](https://spiral.ai/integrations/muse-code/gpt-4o-mini)
- [Notion](https://spiral.ai/integrations/notion/gpt-4o-mini)
- [OpenClaw](https://spiral.ai/integrations/openclaw/gpt-4o-mini)
- [opencode](https://spiral.ai/integrations/opencode/gpt-4o-mini)
- [Perplexity](https://spiral.ai/integrations/perplexity/gpt-4o-mini)
- [Raycast](https://spiral.ai/integrations/raycast/gpt-4o-mini)
- [VS Code](https://spiral.ai/integrations/vscode/gpt-4o-mini)
- [Windsurf](https://spiral.ai/integrations/windsurf/gpt-4o-mini)
- [Zapier](https://spiral.ai/integrations/zapier/gpt-4o-mini)

## More n8n guides

- [GPT-4o 2024-11-20](https://spiral.ai/integrations/n8n/gpt-4o-2024-11-20)
- [GPT-4o mini (2024-07-18)](https://spiral.ai/integrations/n8n/gpt-4o-mini-2024-07-18)
- [GPT-4o 2024-08-06](https://spiral.ai/integrations/n8n/gpt-4o-2024-08-06)
- [GPT-5](https://spiral.ai/integrations/n8n/gpt-5)
- [GPT-4o](https://spiral.ai/integrations/n8n/gpt-4o)
- [GPT-5 Mini](https://spiral.ai/integrations/n8n/gpt-5-mini)

## Questions about GPT-4o mini in n8n

**Can n8n use GPT-4o mini?**

Yes. Add Spiral to n8n as an MCP server, and n8n can find and run GPT-4o mini like any built-in tool.

**How much does GPT-4o mini cost in n8n?**

Up to $0.003202 per run at the default inputs. $0.195 per 1M input tokens, $0.0975 per 1M cached input tokens, $0.78 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 OpenAI account to use GPT-4o mini in n8n?**

You need no OpenAI account. n8n uses one Spiral API key for every tool, and Spiral runs GPT-4o mini on its own OpenAI account.

**How long does it take to set up GPT-4o mini in n8n?**

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

**Does n8n wait while GPT-4o mini runs?**

GPT-4o mini runs in the background. n8n starts the run, checks on it and gives you the text, json when it's ready.

**What is GPT-4o mini useful for?**

Start with extraction, short email replies grounded in conversation history, and small coding tasks. Give each request a clear scope and a checkable result.

**How much text can GPT-4o mini handle?**

The context window is 128,000 tokens, and a response can contain up to 16,384 tokens. Tokens are the units behind these limits, so avoid treating them as word counts.

**How does GPT-4o mini differ from GPT-4o mini (2024-07-18)?**

GPT-4o mini currently selects the July 18, 2024 snapshot. The dated name explicitly selects that version; it does not add capabilities.

**Does valid JSON mean GPT-4o mini extracted the right information?**

No. Structured Outputs can enforce a supported schema, but the values can still be wrong. Check names, dates, amounts, and supporting text against the original.

**Can GPT-4o mini work in languages besides English?**

Yes. OpenAI says it supports the same range of languages as GPT-4o. State the target language and identify any names or terms that should stay unchanged.

