Skip to main content

Cyberstrike is now open source! AI-powered penetration testing for security professionals. Star on GitHub

OpenAI (GPT)

OpenAI provides the GPT-5 family, GPT-4.1, and the o-series reasoning models for security analysis. This guide covers setup and configuration.

Model picker filtered to OpenAI models

Available Models

Cyberstrike pulls its model catalog live from models.dev, so the exact list tracks what OpenAI currently offers. Common picks:

ModelContextBest for
openai/gpt-5400KGeneral security testing (flagship)
openai/gpt-5-mini400KQuick tasks, high volume
openai/gpt-5-nano400KCheapest, simple tasks
openai/gpt-4.11MVery large context
openai/o3200KDeep step-by-step reasoning

Tip

The newer GPT-5.x releases (5.1–5.5, plus the Codex and Pro variants) appear automatically as models.dev updates. Run /models in the TUI — or cyberstrike models — for the full current list.

Authentication

API Key Setup

  1. Get your API key from platform.openai.com
  2. Run authentication:
Terminal window
cyberstrike auth login
# Select: OpenAI
# Enter your API key

Environment Variable

Terminal window
export OPENAI_API_KEY="sk-proj-..."

Configuration File

~/.config/cyberstrike/cyberstrike.json
{
"provider": {
"openai": {
"options": {
"apiKey": "{env:OPENAI_API_KEY}"
}
}
}
}

Model Configuration

Set Default Model

~/.config/cyberstrike/cyberstrike.json
{
"model": "openai/gpt-5"
}

Command Line Override

Terminal window
cyberstrike --model openai/gpt-5-pro

Using Reasoning Models

The o-series (o3, o4-mini) and the GPT-5 Pro variants excel at complex security analysis:

Terminal window
cyberstrike --model openai/o3

Best for:

  • Complex vulnerability chains
  • Attack path analysis
  • Cryptographic analysis
  • Reverse engineering

ChatGPT Plus/Pro

Use your ChatGPT subscription:

Terminal window
cyberstrike auth login
# Select: OpenAI
# Choose: ChatGPT Plus/Pro
# Complete browser authentication

Info

ChatGPT authentication requires browser-based OAuth flow.

Organization ID

For organization accounts:

~/.config/cyberstrike/cyberstrike.json
{
"provider": {
"openai": {
"options": {
"apiKey": "{env:OPENAI_API_KEY}",
"organization": "org-..."
}
}
}
}

Custom Base URL

For OpenAI-compatible endpoints:

{
"provider": {
"openai": {
"options": {
"baseURL": "https://your-endpoint.com/v1"
}
}
}
}

Function Calling

GPT models support function calling for tool use:

{
"provider": {
"openai": {
"options": {
"parallelToolCalls": true
}
}
}
}

Rate Limits

OpenAI rate limits by tier:

TierRPMTPM
Free340,000
Tier 1500200,000
Tier 25,0002,000,000
Tier 3+Higher limits

Handling Limits

{
"provider": {
"openai": {
"options": {
"maxRetries": 3,
"timeout": 60000
}
}
}
}

Best Practices

Model Selection

TaskRecommended Model
Quick scansgpt-5-nano
General testinggpt-5
Complex analysiso3
Cost-sensitivegpt-5-mini

Cost Optimization

  1. Use mini models for simple tasks
  2. Set reasonable max tokens
  3. Use /compact for long sessions
  4. Monitor usage on OpenAI dashboard

Security

  1. Store keys in environment variables
  2. Use project-specific API keys
  3. Enable usage limits in OpenAI dashboard
  4. Rotate keys periodically

Troubleshooting

Invalid API Key

Error: Incorrect API key provided

Verify:

  • Key starts with sk-proj- or sk-
  • No extra whitespace
  • Key is active

Insufficient Quota

Error: You exceeded your current quota

Solutions:

  • Add billing information
  • Check usage limits
  • Upgrade your plan

Model Access

Error: The model does not exist or you do not have access

Some models require:

  • A higher usage tier for the newest flagships
  • Waitlist approval
  • Enterprise agreement

Caution

Reasoning models (the o-series and GPT-5 Pro variants) have higher latency due to reasoning steps. Plan for longer response times.