Back to Models

GPT OSS Safeguard 20B

openaiopenai/gpt-oss-safeguard-20b

OpenAI's safety classification model (20B). Policy reasoning, content filtering, risk analysis, and justification generation.

OpenAI's gpt-oss-safeguard-20b is an open-weight safety reasoning model fine-tuned from gpt-oss-20b, released October 29, 2025 under the Apache 2.0 license. It is designed to classify text content against developer-provided safety policies at inference time β€” a more flexible alternative to training dedicated classifiers per risk category. The model uses chain-of-thought reasoning (configurable effort: low / medium / high) to explain each classification decision, producing auditable outputs in OpenAI's Harmony response format.

With 21B total parameters and 3.6B active parameters (MoE-based), the 20B variant fits into a single 16GB GPU β€” making it practical for on-premise or air-gapped safety pipelines. It is ideal for platforms that need to moderate content against custom policies that evolve quickly, without retraining classifiers. The model accepts two inputs simultaneously β€” a policy (natural language rules) and the content to classify β€” and outputs a reasoned conclusion about where the content falls.

Best for
  • β€’ Classifying user-generated content against custom safety policies that evolve quickly (e.g. gaming forums, review platforms, social feeds)
  • β€’ Policy reasoning for emerging or nuanced harm categories where labeled training data is scarce
  • β€’ Auditable safety pipelines where chain-of-thought reasoning is needed for compliance and debugging
  • β€’ On-premise or air-gapped content moderation using a lightweight model that fits 16GB GPUs
Reach for something else if
  • β€’ Low-latency, high-throughput moderation at scale β€” use lightweight classifiers (e.g. Moderation API) with gpt-oss-safeguard as an async reviewer
  • β€’ Tasks where tens of thousands of high-quality labeled samples exist β€” a trained dedicated classifier will often outperform the policy-reasoning approach
  • β€’ General-purpose chat or content generation β€” the gpt-oss base models or gpt-5 series are better suited for end-user interaction
Context Length
128K
Max Output
16K
Input Priceper 1M tokens
$0.0756/ 1M tokens
Output Priceper 1M tokens
$0.216/ 1M tokens

Modalities

text→text

Pricing Breakdown

TypeRate
Input$0.0756 / 1M tokens
Output$0.216 / 1M tokens

Supported Parameters

temperaturemax_tokenstop_presponse_formatstop

Specifications

Release dateOctober 29, 2025openai.com β†—verified
LicenseApache 2.0huggingface.co β†—verified
Architecture21B total parameters, 3.6B active (MoE)github.com β†—verified
Base modelgpt-oss-20bopenai.com β†—verified
GPU requirementFits single GPU with β‰₯16GB VRAMhuggingface.co β†—verified
Response formatHarmony format (required) β€” structured reasoning + classification channelsgithub.com β†—verified
Model weights size13.8 GB (FP16)huggingface.co β†—verified
Training cutoffNot publicly disclosed (inherits gpt-oss-20b cutoff)unknown

Benchmarks

BenchmarkDistributionScoreSource
Multi-policy accuracy (internal eval)
Evaluated on simultaneous multi-policy classification β€” model must match golden labels for ALL policies to count as correct
Outperforms gpt-5-thinking and gpt-ossopenai.com β†—
2022 Moderation Evaluation Set
Evaluated using internal safety policies adapted for evaluation. Difference vs Safety Reasoner not statistically significant
Slightly outperforms internal Safety Reasoner and gpt-5-thinkingopenai.com β†—
ToxicChat
Evaluated using a short hand-written prompt adapted from internal policies. Smaller model size is expected to favor lightweight classifiers for this task
Marginally behind gpt-5-thinking and Safety Reasoneropenai.com β†—

API Usage Examples

Use the global api.therouter.ai endpoint shown below for new integrations; the legacy China accelerated endpoint is retired.

cURL
curl https://api.therouter.ai/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer $THE_ROUTER_API_KEY"   -d '{
    "model": "openai/gpt-oss-safeguard-20b",
    "messages": [
      {"role": "user", "content": "Summarize the key points from this input."}
    ]
  }'

Safety classification via chat

The gpt-oss-safeguard models use OpenAI's Harmony response format. Provide your policy and content in the user message. The model returns structured reasoning and a classification conclusion.

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-oss-safeguard-20b",
    "messages": [
      {
        "role": "system",
        "content": "You are a safety classifier. You must respond in the Harmony format."
      },
      {
        "role": "user",
        "content": "[POLICY]\nClassify the following user message as:\n- hate_speech: content that attacks or demeans a group based on protected attributes\n- harassment: content that targets an individual with threats or degrading language\n- safe: none of the above\n\n[CONTENT]\nI completely disagree with your opinion on this topic."
      }
    ],
    "reasoning_effort": "medium"
  }'

More from openai

Similar models

Cross-provider sibling models

News & changes

2025-10-29

OpenAI releases gpt-oss-safeguard β€” open-weight safety reasoning models

OpenAI released two open-weight safety models (120B and 20B) under Apache 2.0, fine-tuned from gpt-oss. The models reason directly from developer-provided policies at inference time, enabling bring-your-own-policy content classification without retraining. The release includes a technical report, prompting guide, and ROOST Model Community partnership.

re-authored by TheRouteropenai.com β†—

Frequently asked

What is the Harmony response format and why is it required?

Harmony is OpenAI's structured response format designed for safety classification models. It separates the model's reasoning into dedicated channels: one for policy analysis, one for the classification decision, and one for supporting justification. The gpt-oss-safeguard models are trained specifically to output in this format and will not function correctly without it. See the cookbook prompting guide for examples.

How is this different from the OpenAI Moderation API?

The Moderation API uses lightweight trained classifiers with fixed safety policies. It is fast and inexpensive but cannot adapt to custom policies without retraining. gpt-oss-safeguard reasons directly from any policy you provide at inference time β€” no retraining needed β€” but is more compute-intensive and higher-latency. In practice, many platforms use lightweight classifiers for first-pass filtering, then route flagged content to gpt-oss-safeguard for deep policy reasoning.

Can I use gpt-oss-safeguard-20b via TheRouter API?

Yes. TheRouter supports gpt-oss-safeguard-20b through its standard OpenAI-compatible /v1/chat/completions endpoint. The model requires the Harmony response format and does not support tools/tool_choice. See the curl snippet above for a working example.

What reasoning effort should I use?

Use 'low' for high-throughput pre-filtering where speed matters and policies are straightforward. Use 'medium' as the default for most production pipelines. Use 'high' for complex, nuanced policies β€” e.g. when distinguishing hate speech from legitimate political debate β€” or when you need detailed chain-of-thought for audit trails.

Fact ledger β€” every claim on this page traces here
sourceURLretrieved
Release dateopenai.com β†—2026-05-29verified
Licensehuggingface.co β†—2026-05-29verified
Architecturegithub.com β†—2026-05-29verified
Base modelopenai.com β†—2026-05-29verified
GPU requirementhuggingface.co β†—2026-05-29verified
Response formatgithub.com β†—2026-05-29verified
Model weights sizehuggingface.co β†—2026-05-29verified
Training cutoffβ€”β€”unknown
Multi-policy accuracy (internal eval)openai.com β†—2026-05-29verified
2022 Moderation Evaluation Setopenai.com β†—2026-05-29verified
ToxicChatopenai.com β†—2026-05-29verified
OpenAI releases gpt-oss-safeguard β€” open-weight safety reasoning modelsopenai.com β†—2026-05-29verified
What is the Harmony response format and why is it required?cookbook.openai.com β†—2026-05-29to verify
How is this different from the OpenAI Moderation API?openai.com β†—2026-05-29to verify
What reasoning effort should I use?github.com β†—2026-05-29to verify
Help & contact