OpenAI
Use OpenAI's GPT models as the AI provider for BDD and test case generation.
Get an API key
- Go to platform.openai.com → API keys → Create new secret key.
- Copy the key — it starts with
sk-.
Billing required
OpenAI requires a paid plan with a positive credit balance. New accounts receive a small free credit for experimentation.
Configure in QA Hub
- Go to Settings → AI Model.
- Select OpenAI as the provider.
- Paste your API key.
- Select a model.
- Click Test connection, then Save.
Available models
| Model | Speed | Context | Best for |
|---|---|---|---|
gpt-4o | Fast | 128K tokens | Best quality, recommended default |
gpt-4o-mini | Very fast | 128K tokens | Cost-conscious, high-volume generation |
o1-mini | Slow | 128K tokens | Complex reasoning, long acceptance criteria |
Pricing
OpenAI charges per million tokens. Approximate costs per 100 test cases generated:
| Model | Estimated cost |
|---|---|
gpt-4o-mini | ~$0.02 |
gpt-4o | ~$0.20 |
o1-mini | ~$0.30 |
Estimates vary depending on acceptance criteria length.
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
401 Unauthorized | Invalid or expired API key | Regenerate the key |
429 insufficient_quota | Billing quota exhausted | Top up credits; QA Hub sets the quotaExhausted flag |
429 rate_limit_exceeded | Per-minute limit hit | Retry — QA Hub treats this as transient, no flag set |