# Pwn AI Providers Grok

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

- Skill: `0dayinc/pwn-ai-providers-grok` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx get-skill add 0dayinc/pwn-ai-providers-grok`
- Raw SKILL.md: https://api.skillmd.com/api/skills/0dayinc/pwn-ai-providers-grok/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-grok

---

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

# PWN::AI::Providers::Grok

This plugin interacts with xAI's Grok API, similar to the Grok plugin. It provides methods to list models, generate completions, and chat. API documentation: https://docs.x.ai/docs Obtain an API key from https://x.ai/api

## When to use

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

## Catalog authentication

Use `ai.grok.key` for independent API-key access. To use an account grant,
PWN reuses the access token or tries silent refresh. Only `ai.grok.oauth.enroll: true`
(or `oauth: true`) permits a new RFC 8628 device login during a request. A
missing key or client ID is not consent. For a first grant, the operator runs
`get_models` in a private foreground terminal, checks the provider URL and code,
and approves in their browser. Leave `key:` unset for an OAuth-only test: with
enrollment off, a failed silent refresh can select a separately configured key.

## How to call

```ruby
PWN::AI::Providers::Grok.get_models(non_interactive: true).length
```

## Public methods

- `refresh_oauth_bearer_token`
- `obtain_oauth_bearer_token`
- `get_models`
- `get_model`
- `chat_with_tools`
- `chat`
- `authors`
- `help`

## References

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

## Source

`pwn/ai/providers/grok.rb`

## Verification

The number counts rows returned by the xAI catalog. It does not establish
subscription tier, generation permissions or billing. Do not print tokens.

