返回模型列表

GPT OSS Safeguard 120B

openaiopenai/gpt-oss-safeguard-120b

API 使用指南

Chat 调用

通过 TheRouter 使用标准 OpenAI 兼容的 chat completion。模型接受系统或开发者消息中的策略,并对输入内容进行分类。

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-120b",
    "messages": [
      {"role": "system", "content": "You are a safety classifier. Apply the policy faithfully."},
      {"role": "developer", "content": "Policy: Classify messages as SAFE or UNSAFE. UNSAFE includes hate speech, harassment, and spam. SAFE includes all other content."},
      {"role": "user", "content": "I love this product! It works great."}
    ]
  }'

策略推理

模型使用思维链推理来解释其在所提供策略下的分类决策。审查推理过程以确保可审计性。

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-120b",
    "messages": [
      {"role": "developer", "content": "Policy: Classify user reviews as GENUINE or SUSPICIOUS. SUSPICIOUS means the review contains fake or incentivized language. Output REASONING: then CLASSIFICATION."},
      {"role": "user", "content": "This is the best phone ever!!! I got it for free and everyone should buy one!!!"}
    ]
  }'

工具/函数调用

完全支持 OpenAI 兼容的工具和函数调用,从基础 gpt-oss-120b 继承而来。适用于将 Safeguard 集成到自动化审核管道。

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-120b",
    "messages": [{"role": "user", "content": "Classify this review under our policy."}],
    "tools": [{
      "type": "function",
      "function": {
        "name": "log_moderation_result",
        "description": "Log the classification result",
        "parameters": {
          "type": "object",
          "properties": {
            "classification": {"type": "string"},
            "confidence": {"type": "number"}
          },
          "required": ["classification"]
        }
      }
    }],
    "tool_choice": "auto"
  }'
事实档案 — 本页每条断言可在此回溯来源
来源URL采集于
发布日期openai.com ↗2026-05-29已核实
基础模型arxiv.org ↗2026-05-29已核实
许可openai.com ↗2026-05-29已核实
架构arxiv.org ↗2026-05-29已核实
上下文窗口openai.com ↗2026-05-29已核实
分词器arxiv.org ↗2026-05-29已核实
量化arxiv.org ↗2026-05-29已核实
模型用途openai.com ↗2026-05-29已核实
局限性openai.com ↗2026-05-29已核实
Multi-policy accuracy (internal)openai.com ↗2026-05-29已核实
2022 Moderation eval (internal policy)openai.com ↗2026-05-29待核实
ToxicChatopenai.com ↗2026-05-29待核实
OpenAI 发布 gpt-oss-safeguard——开源权重安全推理模型openai.com ↗2026-05-29已核实
gpt-oss-safeguard-120b 与 OpenAI 的 Moderation API 有何不同?openai.com ↗2026-05-29待核实
TheRouter 是否托管 gpt-oss-safeguard-120b,这样我就不需要自行部署了?openai.com ↗2026-05-29待核实
帮助与联系