# Pwn AI Providers Openai

> Drive PWN::AI::Providers::OpenAI from pwn_eval.

- Skill: `0dayinc/pwn-ai-providers-openai` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx get-skill add 0dayinc/pwn-ai-providers-openai`
- Raw SKILL.md: https://api.skillmd.com/api/skills/0dayinc/pwn-ai-providers-openai/raw
- Safety review: pending
- Works with: any agent that reads SKILL.md (Claude Code, Claude.ai, Cursor, Codex, Windsurf, 60+ more)
- Category: Coding & Dev Tools
- Author: 0dayInc (https://skillmd.com/u/0dayinc)
- Updated: 2026-12-02
- Page: https://skillmd.com/skills/0dayinc/pwn-ai-providers-openai

---

---
name: pwn-ai-providers-openai
description: Drive PWN::AI::Providers::OpenAI from pwn_eval.
license: MIT
allowed-tools: [pwn, pwn_eval]
metadata:
  bundled: true
  generated: false
  preserve: true
  module: PWN::AI::Providers::OpenAI
  source: pwn/ai/providers/open_ai.rb
---

# PWN::AI::Providers::OpenAI

This plugin is used for interacting w/ OpenAI's REST API using the 'rest' browser type of PWN::HTTP::TransparentBrowser. This is based on the following OpenAI API Specification: https://api.openai.com/v1

## When to use

Call `PWN::AI::Providers::OpenAI` from `pwn_eval` when the task needs this module.
Do not reimplement it in shell.

## Catalog authentication

Use `ai.openai.key` for the Platform catalog, or a saved OpenAI account grant
for the subscription catalog. PWN reuses a valid access token; otherwise it tries
silent refresh. Only `ai.openai.oauth.enroll: true` (or `oauth: true`) permits
new device consent during a request. A blank key or client ID does not. For a
first grant, the operator runs `get_models` in a private foreground terminal
and approves the displayed code at the provider. Leave the separate key unset
when testing account access alone; a failed silent refresh can otherwise use
it when enrollment is off.

## How to call

```ruby
PWN::AI::Providers::OpenAI.get_models(non_interactive: true).fetch(:data).length
```

## Public methods

- `refresh_oauth_bearer_token`
- `obtain_oauth_bearer_token`
- `get_models`
- `get_model`
- `chat_with_tools`
- `api_endpoint`
- `chat`
- `img_gen`
- `vision`
- `create_fine_tune`
- `list_fine_tunes`
- `get_fine_tune_status`
- `cancel_fine_tune`
- `get_fine_tune_events`
- `delete_fine_tune_model`
- `list_files`
- `upload_file`
- `delete_file`
- `get_file`
- `authors`
- `help`

## References

- `references/urls.md` — URLs from source

## Source

`pwn/ai/providers/open_ai.rb`

## Verification

The number is the entry count returned by the selected catalog. It is not proof
of generation permissions or billing. Do not print the result of a token helper.

