gpt-oss-safeguard-20b API

gpt-oss-safeguard-20b on AIMLAPI.

Modalities
Image, TextText
In / Out price
$0.0794/$0.3174per 1M
Context window
128K tokens
Released
Oct 29, 2025

gpt-oss-safeguard-20b overview

The pelican test: one prompt, every text model, unedited SVG output from Nov 3, 2026.

SVG of a pelican riding a bicycle, written by gpt-oss-safeguard-20b through AI/ML API

gpt-oss-safeguard-20b specs

Model ID
openai/gpt-oss-safeguard-20b
Developer
OpenAI
Context window
131,072 tokens
Max output
65,536 tokens
Input
Image, Text
Output
Text
API
OpenAI-compatible, base URL https://api.aimlapi.com/v1

What is gpt-oss-safeguard-20b API?

Where to Use gpt-oss-safeguard-20b

Coding and code review
Generate, debug, and review code across languages, reading whole files or repos in a single prompt.

Agentic and multi-step workflows
Reliable tool-calling and instruction-following suit agent loops that plan, call tools, and iterate.

Use cases

Used for policy-based safety classification, where it reasons over a developer-provided policy to classify user messages, completions, and full chats.

Suited to lightweight content moderation and guardrail tasks in lower-latency or constrained environments.

Used for online content labeling, including classifying posts, messages, or media metadata for policy violations.

Used for offline batch labeling or review workflows, including moderation queues and trust-and-safety pipelines.

Capabilities

  • Function calling
  • Reasoning
  • Streaming
  • Structured outputs
  • Web search

gpt-oss-safeguard-20b API pricing

gpt-oss-safeguard-20b pricing in US dollars
UsagePriceUnit
Input$0.07941M tokens
Output$0.31741M tokens
Cached input$0.03971M tokens

Prices from the AI/ML API price list, checked on Nov 4, 2026.

gpt-oss-safeguard-20b vs other models: token prices

AI/ML API input and output rates for 5 models, per million tokens.

AI/ML API model prices in USD per million tokens
ModelInputOutput
gpt-oss-safeguard-20b$0.0794$0.3174
GPT-6 Luna$0.1$0.5
GPT-6.1 Terra$1$5
GPT-6.1 Sol$2$10
GPT-6.1 Terra Pro$2.12$10.58

How to use the gpt-oss-safeguard-20b API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "openai/gpt-oss-safeguard-20b",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'

Related articles

All posts

gpt-oss-safeguard-20b FAQ

What is the context window of gpt-oss-safeguard-20b?

gpt-oss-safeguard-20b has a 131,072 tokens context window and can return up to 65,536 tokens.

What inputs and outputs does gpt-oss-safeguard-20b support?

gpt-oss-safeguard-20b takes image, text as input and returns text.

What is the model ID for gpt-oss-safeguard-20b?

Use openai/gpt-oss-safeguard-20b as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.

How much does gpt-oss-safeguard-20b cost?

gpt-oss-safeguard-20b costs $0.0794 input and $0.3174 output per 1M tokens on AI/ML API, billed as you go with no subscription.

Does gpt-oss-safeguard-20b support streaming?

Yes, gpt-oss-safeguard-20b can stream responses as they are generated.

Can gpt-oss-safeguard-20b read images?

Yes, gpt-oss-safeguard-20b accepts image input alongside text.

Who created gpt-oss-safeguard-20b?

gpt-oss-safeguard-20b was built by OpenAI.

Is gpt-oss-safeguard-20b a general-purpose chat model?

Yes, it is classified as a Chat model.

Start building with gpt-oss-safeguard-20b

gpt-oss-safeguard-20b API

openai/gpt-oss-safeguard-20b

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "openai/gpt-oss-safeguard-20b",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'