How to Use GPT-oss Safeguard 20B in Codex
GPT-oss Safeguard 20B classifies text against safety rules you supply and can explain each decision. Compared with GPT-oss Safeguard 120B, it targets lower latency and specialized moderation tasks.
Prompts to try with GPT-oss Safeguard 20B in Codex
Copy an example into Codex, or ask in your own words.
Use GPT-oss Safeguard 20B to classify the moderation fixtures in this project under its existing community policy. Report each expected label, predicted label, and mismatch.
Use GPT-oss Safeguard 20B to review the saved assistant responses in our test fixtures against the project's safety policy. Report the response ID and applicable rule for each violation.
Use GPT-oss Safeguard 20B to label our incoming-message fixtures under the current abuse policy. Preserve fixture IDs and compare the results with the existing human labels.
Use GPT-oss Safeguard 20B to classify the same moderation fixtures at low, medium, and high reasoning effort. Compare errors against the human labels and report measured response times.
Use GPT-oss Safeguard 20B to review our conversation fixtures under the written harassment policy. Judge each complete conversation and list any decisions that differ from the single-message labels.
How to set up GPT-oss Safeguard 20B in Codex
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the hosted server
codex mcp add spiral --url https://api.spiral.ai/mcp
- Sign in
Codex opens the browser: sign in to Spiral and click Authorize. No API key. codex mcp list then shows Spiral.
codex mcp login spiral
Use the Spiral skill
- Send Codex 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 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 GPT-oss Safeguard 20B
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": "openai/gpt-oss-safeguard-20b", "input": { "messages": [ { "role": "system" } ] } }'
Then paste one of the prompts above: Codex finds GPT-oss Safeguard 20B on Spiral, shows the price and runs it.
GPT-oss Safeguard 20B providers and prices
Spiral runs GPT-oss Safeguard 20B through OpenRouter. Open a card for today's price, with every fee included.
Up to $0.001602 per run at the default inputs. $0.0975 per 1M input tokens, $0.39 per 1M output tokens.
Settings you can ask for
Ask Codex for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Seed | a whole number | ||
| Top p | 0 to 1 | ||
| Max tokens | 1 to 65536 | The most output tokens to generate. | |
| Temperature | 0 to 2 |
Every API field of OpenAI: gpt-oss-safeguard-20b is on its tool page: open its card above.
What can you do with GPT-oss Safeguard 20B in Codex?
Check your application's text safety decisions against its written rules. Use project policies and labeled fixtures to compare results before changing moderation behavior.
Community post review
Classify forum posts against written rules for threats, harassment, or prohibited promotion.
Assistant response checks
Review generated responses against your safety policy before deciding whether to show them.
Incoming message screening
Label user requests under your product's safety rules before passing them to another assistant.
Conversation review
Evaluate complete text conversations when a single message does not provide enough context for a policy decision.
Review authenticity screening
Flag product reviews that match your written criteria for suspected fabrication or undisclosed incentives.
Stored content labeling
Apply a defined safety taxonomy to archived text for a Trust and Safety review project.
More on GPT-oss Safeguard 20B and Codex
Overview
GPT-oss Safeguard 20B in other agents
Questions about GPT-oss Safeguard 20B in Codex
Can Codex use GPT-oss Safeguard 20B?
Yes. Add Spiral to Codex as an MCP server, and Codex can find and run GPT-oss Safeguard 20B like any built-in tool.
How much does GPT-oss Safeguard 20B cost in Codex?
Up to $0.001602 per run at the default inputs. $0.0975 per 1M input tokens, $0.39 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Codex plan is separate.
Do I need an OpenRouter account to use GPT-oss Safeguard 20B in Codex?
No. Spiral runs GPT-oss Safeguard 20B on its own OpenRouter account. You sign in to Spiral once and never paste a key.
How long does it take to set up GPT-oss Safeguard 20B in Codex?
About two minutes: add the hosted server, then sign in.
Does Codex wait while GPT-oss Safeguard 20B runs?
GPT-oss Safeguard 20B runs in the background. Codex starts the run, checks on it and gives you the text, json when it's ready.
What is GPT-oss Safeguard good at?
It labels text according to safety policies you provide. Use it to review community posts, check assistant responses, or classify conversations under your own rules.
Can GPT-oss Safeguard replace a general chat or coding model?
OpenAI recommends it for safety classification. For general conversation or software development, OpenAI recommends GPT-oss instead.
How should I write a moderation policy?
Separate instructions, definitions, decision criteria, and examples. Define what is allowed as carefully as what violates the rules.
Which reasoning setting should I test?
Test low, medium, and high effort on the same labeled examples. Choose based on classification results and the response time your task allows.
What are its main limitations?
It handles text, so image or audio moderation requires a separate model. A dedicated classifier trained on a large labeled dataset can also outperform it on complex risks.
Start using GPT-oss Safeguard 20B in Codex
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Codex:
set up https://spiral.ai/SKILL.md


