How to Use Phi-4 in Notion
Phi-4 suits math problems, logic checks, and Python code tasks. Its 14-billion-parameter model has a 16K-token context window; use English prompts and check factual claims against supplied sources.
Prompts to try with Phi-4 in Notion
Copy an example into Notion, or ask in your own words.
Each morning, use Phi-4 to review the supplied daily metrics. Recalculate percentage changes from the provided current and previous values, flag zero denominators, and report only discrepancies with the formula used.
Every Monday, use Phi-4 to check the supplied weekly task plan against its dependencies and working-hour limits. List conflicts with the exact rule each breaks, and propose changes without inventing availability.
Each evening, use Phi-4 to check the supplied inventory arithmetic. Compare opening stock plus receipts minus shipments with closing stock, list mismatches, and mark any missing quantity as unknown.
Each weekday, use Phi-4 to create one English algebra practice problem at the difficulty described in the supplied learning plan. Include a separate answer key with a brief check, and keep the complete response under 300 words.
Each Friday, use Phi-4 to review the supplied numerical summary for inconsistent totals, averages, and units. Explain each suspected error using only the supplied figures and keep the report under 400 words.
How to set up Phi-4 in Notion
Pick the way that suits you. Each takes about two minutes.
Use the Spiral skill
- Send Notion this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- 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
- Allow custom MCP servers
A workspace owner opens Settings › Connections, then the Manage tab, and turns on Enable custom MCP servers. Where members may install only approved connections, also add Spiral under Approved connections › Add approved connection › Custom MCP server with the URL below.
- Add Spiral to a custom agent
Open the custom agent (or create one), then Settings › Tools & Access › Add connection › Custom MCP server. Paste this URL, name it Spiral, keep OAuth and click Connect.
https://api.spiral.ai/mcp
- Sign in to Spiral and approve
Spiral opens: sign in, pick the organization and click Authorize. No API key. Spiral gives the connection its own key; Notion never sees it, and you can remove it under Settings › Connected apps in the console.
- Run Phi-4 in a workflow step
Give the step an instruction like the ones below and run it on your trigger or schedule. Spiral finds Phi-4, prices it and runs it each time the step fires.
Use the Spiral CLI
- 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
- Create an API key
In the console, under API keys.
- Run Phi-4
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": "microsoft/phi-4", "input": { "messages": [ { "role": "system" } ] } }'
Then paste one of the prompts above: Notion finds Phi-4 on Spiral, shows the price and runs it.
Phi-4 providers and prices
Spiral runs Phi-4 through OpenRouter. Open a card for today's price, with every fee included.
Up to $0.000749 per run at the default inputs. $0.091 per 1M input tokens, $0.182 per 1M output tokens.
Settings you can ask for
Ask Notion for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Seed | a whole number | ||
| Min p | 0 to 1 | ||
| Top k | a whole number from 0 | ||
| Top p | 0 to 1 | ||
| Max tokens | 1 to 14745 | The most output tokens to generate. | |
| Temperature | 0 to 2 | ||
| Presence penalty | -2 to 2 | ||
| Frequency penalty | -2 to 2 | ||
| Repetition penalty | 0 to 2 |
Every API field of Microsoft: Phi 4 is on its tool page: open its card above.
What can you do with Phi-4 in Notion?
Use Phi-4 to repeat calculation checks and constraint reviews on supplied daily inputs. Make each run self-contained and check its conclusions before acting on them.
Check business calculations
Ask Phi-4 to review percentage changes, weighted averages, and unit conversions using supplied numbers. Request the formula and a short calculation you can verify.
Draft small Python utilities
Use Phi-4 to draft focused functions for counting records, grouping values, or calculating summary statistics. Specify the input, expected result, and edge cases.
Review Python logic
Give Phi-4 a function and its intended behavior. Ask for a failing example and a proposed correction, then run the example yourself.
Propose Python test cases
Ask Phi-4 for normal, boundary, and invalid-input cases for a small function. Review the expected results before adding the tests.
Explain math mistakes
Provide a problem and an attempted solution. Ask Phi-4 to identify the first incorrect step and explain a correction at the learner's level.
Check plans against constraints
Supply scheduling rules, dependencies, and resource limits. Ask Phi-4 to identify conflicts and propose a plan that satisfies the stated constraints.
Work through science exercises
Provide an exercise, its assumptions, and any required reference material. Ask Phi-4 for a concise explanation with equations, units, and a check of the result.
More on Phi-4 and Notion
Overview
Phi-4 in other agents
Questions about Phi-4 in Notion
Can Notion use Phi-4?
Yes. Add Spiral to Notion as an MCP server, and Notion can find and run Phi-4 like any built-in tool.
How much does Phi-4 cost in Notion?
Up to $0.000749 per run at the default inputs. $0.091 per 1M input tokens, $0.182 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Notion plan is separate.
Do I need an OpenRouter account to use Phi-4 in Notion?
No. Spiral runs Phi-4 on its own OpenRouter account. You sign in to Spiral once and never paste a key.
How long does it take to set up Phi-4 in Notion?
About two minutes: allow custom MCP servers, then add Spiral to a custom agent, then sign in to Spiral and approve.
Does Notion wait while Phi-4 runs?
Phi-4 runs in the background. Notion starts the run, checks on it and gives you the text, json when it's ready.
What is Phi-4 good at?
Mathematical reasoning is a documented strength. Try it for checking calculations, solving constrained problems, and explaining a mathematical solution.
How much text can Phi-4 handle?
Phi-4 has a 16K-token context window. Keep the instructions, relevant conversation, source material, and requested response within that budget.
Which language should I use with Phi-4?
Use English when possible. Microsoft says performance is worse in other languages, so evaluate your actual tasks before relying on multilingual output.
Is Phi-4 useful for coding?
Python is the best-supported starting point in its documented code training. Check generated code against tests, and verify unfamiliar packages or APIs against their documentation.
Can I trust Phi-4's factual answers and formatting?
Phi-4 can invent factual details and miss strict formatting requirements. Supply the evidence you want it to use, check claims against that evidence, and validate outputs before a program consumes them.
Start using Phi-4 in Notion
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Notion:
set up https://spiral.ai/SKILL.md


