Back to Models
GPT OSS Safeguard 20B
openaiopenai/gpt-oss-safeguard-20b
API guide
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"
}'Configurable reasoning effort
The gpt-oss-safeguard models support low, medium, and high reasoning effort. Use 'low' for high-throughput filtering, 'high' for complex policy decisions requiring detailed chain-of-thought.
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. Use the Harmony format."
},
{
"role": "user",
"content": "[POLICY]\n[your policy here]\n\n[CONTENT]\n[content to classify]"
}
],
"reasoning_effort": "high"
}'Fact ledger β every claim on this page traces here
| source | URL | retrieved | |
|---|---|---|---|
| Release date | openai.com β | 2026-05-29 | verified |
| License | huggingface.co β | 2026-05-29 | verified |
| Architecture | github.com β | 2026-05-29 | verified |
| Base model | openai.com β | 2026-05-29 | verified |
| GPU requirement | huggingface.co β | 2026-05-29 | verified |
| Response format | github.com β | 2026-05-29 | verified |
| Model weights size | huggingface.co β | 2026-05-29 | verified |
| Training cutoff | β | β | unknown |
| Multi-policy accuracy (internal eval) | openai.com β | 2026-05-29 | verified |
| 2022 Moderation Evaluation Set | openai.com β | 2026-05-29 | verified |
| ToxicChat | openai.com β | 2026-05-29 | verified |
| OpenAI releases gpt-oss-safeguard β open-weight safety reasoning models | openai.com β | 2026-05-29 | verified |
| What is the Harmony response format and why is it required? | cookbook.openai.com β | 2026-05-29 | to verify |
| How is this different from the OpenAI Moderation API? | openai.com β | 2026-05-29 | to verify |
| What reasoning effort should I use? | github.com β | 2026-05-29 | to verify |