70% off Wan3.0 Standard and 50% off Wan3.0 Prime. Try Wan3.0

gpt-oss-safeguard-20b API

Open-weight safety classifier that judges content against the policy you write in the prompt

Get an API key
Input per 1M
$0.07
Cached input per 1M
$0.035
Output per 1M
$0.28
Context window
8K

Call gpt-oss-safeguard-20b in one request

Runware's endpoint takes the OpenAI Chat Completions format, so the OpenAI SDK works as it is. Change the base URL, key, and model ID.

Model ID:openai:gpt-oss-safeguard@20b
gpt-oss-safeguard-20b API docs
Request
import os

from openai import OpenAI

client = OpenAI(
    api_key=os.environ["RUNWARE_API_KEY"],
    base_url="https://api.runware.ai/v1",
)

stream = client.chat.completions.create(
    model="openai:gpt-oss-safeguard@20b",
    messages=[
        {"role": "user", "content": "What is the capital of France?"},
    ],
    stream=True,
    stream_options={"include_usage": True},
)

for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
    if chunk.usage:
        print("\n", chunk.usage)

Usage and cost come back with the response. The stream ends with the request's token counts and its cost, so there is no second call to make.

About gpt-oss-safeguard-20b

gpt-oss-safeguard-20b is OpenAI’s open-weight safety classifier. Instead of a fixed taxonomy, it takes the policy in the prompt and labels each item against it, so the same model can serve teams whose rules differ. It reasons before answering, which leaves a trace of why an item was labelled the way it was, and its 8K context window holds a policy alongside the content under review. It fits moderation pipelines and review queues where the rules change per product or per customer.

Developer
OpenAI
Released
29 Oct, 2025
Input
Text
Context window
8K tokens
Max output
8K tokens
API
OpenAI Chat Completions
Hosting
Runware hardware
Data retention
Zero retention

Already on another provider?

Code that uses the OpenAI SDK moves over with three changes: the base URL, the API key and the model ID. Moving production traffic? We'll help you plan the switch.

Read the docs

Start on demand. Scale on dedicated.

Call your first model in minutes, or tell us about your workload and we will size dedicated capacity for it.

Get an API key