ModelsSupportEnterpriseBlog
500+ AI Model API, All In One API.Just In CometAPI
Models API
Developer
Quick StartDocumentationAPI Dashboard
Resources
AI ModelsBlogEnterpriseChangelogAbout
2025 CometAPI. All right reserved.Privacy PolicyTerms of Service
Home/Models/OpenAI/gpt-oss-20b
C

gpt-oss-20b

Input:$0.08/M
Output:$0.32/M
gpt-oss-20b is an artificial intelligence model provided by cloudflare-workers-ai.
New
Commercial Use
Overview
Features
Pricing
API

Technical Specifications of gpt-oss-20b

AttributeDetails
Model IDgpt-oss-20b
Providercloudflare-workers-ai
Model TypeLarge language model
Primary ModalitiesText input, text output
Context WindowVaries by deployment configuration
Streaming SupportSupported via API-compatible integrations
Typical Use CasesChat, instruction following, content generation, summarization, classification, and general-purpose text tasks
API AccessAvailable through CometAPI
Integration StyleOpenAI-compatible API workflows

What is gpt-oss-20b?

gpt-oss-20b is an artificial intelligence model provided by cloudflare-workers-ai. It is designed for general natural language processing tasks such as answering questions, generating text, following instructions, and assisting with application workflows that require reliable language understanding and generation.

As exposed through CometAPI, gpt-oss-20b can be used in a unified API environment that simplifies access across multiple AI providers. This makes it easier for developers to integrate the model into existing products without having to manage provider-specific differences in request format and authentication flow.

Main features of gpt-oss-20b

  • General-purpose language capability: Suitable for a wide range of text-based tasks, including chat, drafting, rewriting, summarization, and structured responses.
  • Instruction following: Can respond to user prompts in a guided way, making it useful for assistants, automation workflows, and application backends.
  • CometAPI unified access: Developers can call gpt-oss-20b through CometAPI using a consistent interface shared across many models.
  • OpenAI-compatible integration pattern: Works well for teams that want to reuse familiar client libraries and API calling patterns.
  • Application-ready deployment: Appropriate for product features such as support bots, internal tools, content pipelines, and text transformation services.
  • Scalable API usage: Can be incorporated into environments that need programmatic, repeatable, and production-friendly model access.

How to access and integrate gpt-oss-20b

Step 1: Sign Up for API Key

To get started, create an account on CometAPI and generate your API key from the dashboard. Once you have the key, store it securely and use it to authenticate every request to the API. This key gives you access to gpt-oss-20b and other models available through the CometAPI platform.

Step 2: Send Requests to gpt-oss-20b API

After getting your API key, send requests to the CometAPI chat completions endpoint using the model field set to gpt-oss-20b.

curl https://api.cometapi.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $COMETAPI_API_KEY" \
  -d '{
    "model": "gpt-oss-20b",
    "messages": [
      {
        "role": "user",
        "content": "Write a short introduction to artificial intelligence."
      }
    ]
  }'
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_COMETAPI_API_KEY",
    base_url="https://api.cometapi.com/v1"
)

response = client.chat.completions.create(
    model="gpt-oss-20b",
    messages=[
        {"role": "user", "content": "Write a short introduction to artificial intelligence."}
    ]
)

print(response.choices[0].message.content)

Step 3: Retrieve and Verify Results

Once the request is processed, the API returns a structured response containing the model’s output. You can parse the returned content, display it to users, or pass it into downstream application logic. In production usage, it is a good practice to validate the response format, handle possible API errors, and verify that the generated output matches your quality and safety requirements before using it in customer-facing workflows.

Features for gpt-oss-20b

Explore the key features of gpt-oss-20b, designed to enhance performance and usability. Discover how these capabilities can benefit your projects and improve user experience.

Pricing for gpt-oss-20b

Explore competitive pricing for gpt-oss-20b, designed to fit various budgets and usage needs. Our flexible plans ensure you only pay for what you use, making it easy to scale as your requirements grow. Discover how gpt-oss-20b can enhance your projects while keeping costs manageable.
Comet Price (USD / M Tokens)Official Price (USD / M Tokens)Discount
Input:$0.08/M
Output:$0.32/M
Input:$0.1/M
Output:$0.4/M
-20%

Sample code and API for gpt-oss-20b

Access comprehensive sample code and API resources for gpt-oss-20b to streamline your integration process. Our detailed documentation provides step-by-step guidance, helping you leverage the full potential of gpt-oss-20b in your projects.

More Models

G

Nano Banana 2

Input:$0.4/M
Output:$2.4/M
Core Capabilities Overview: Resolution: Up to 4K (4096×4096), on par with Pro. Reference Image Consistency: Up to 14 reference images (10 objects + 4 characters), maintaining style/character consistency. Extreme Aspect Ratios: New 1:4, 4:1, 1:8, 8:1 ratios added, suitable for long images, posters, and banners. Text Rendering: Advanced text generation, suitable for infographics and marketing poster layouts. Search Enhancement: Integrated Google Search + Image Search. Grounding: Built-in thinking process; complex prompts are reasoned before generation.
A

Claude Opus 4.6

Input:$4/M
Output:$20/M
Claude Opus 4.6 is Anthropic’s “Opus”-class large language model, released February 2026. It is positioned as a workhorse for knowledge-work and research workflows — improving long-context reasoning, multi-step planning, tool use (including agentic software workflows), and computer-use tasks such as automated slide and spreadsheet generation.
A

Claude Sonnet 4.6

Input:$2.4/M
Output:$12/M
Claude Sonnet 4.6 is our most capable Sonnet model yet. It’s a full upgrade of the model’s skills across coding, computer use, long-context reasoning, agent planning, knowledge work, and design. Sonnet 4.6 also features a 1M token context window in beta.
O

GPT-5.4 nano

Input:$0.16/M
Output:$1/M
GPT-5.4 nano is designed for tasks where speed and cost matter most like classification, data extraction, ranking, and sub-agents.
O

GPT-5.4 mini

Input:$0.6/M
Output:$3.6/M
GPT-5.4 mini brings the strengths of GPT-5.4 to a faster, more efficient model designed for high-volume workloads.
A

Claude Mythos Preview

A

Claude Mythos Preview

Coming soon
Input:$60/M
Output:$240/M
Claude Mythos Preview is our most capable frontier model to date, and shows a striking leap in scores on many evaluation benchmarks compared to our previous frontier model, Claude Opus 4.6.