Home/Integrations/OpenAI
Integration

OpenAI Integration for Prompt Testing

Test your GPT-4, GPT-4o, and GPT-3.5 prompts with PromptLens. Catch regressions before they hit production.

Connect OpenAI

Supported Models

GPT-4o
GPT-4o Mini
GPT-4 Turbo
o1
o1-mini

Integration Features

  • Full API compatibility
  • Function calling support
  • Vision model testing
  • Streaming response validation
  • Token usage tracking

Quick Setup Guide

1

Add your OpenAI API key to PromptLens

2

Create a project and add your prompts

3

Build test datasets with expected outputs

4

Run evaluations and view results

View OpenAI API Documentation

Testing OpenAI Prompts with PromptLens

Create a project, add your OpenAI prompt, and run evaluations against your test dataset to catch regressions before they reach production.

// 1. Define your prompt in PromptLens
System: "You are a helpful customer support agent."
User: "{{user_query}}"

// 2. Create test cases
| user_query                    | expected_behavior        |
|-------------------------------|-------------------------|
| "How do I reset my password?" | Step-by-step instructions|
| "I want a refund"             | Empathetic + policy link |
| "Your product sucks"          | Acknowledge + de-escalate|

// 3. Run evaluation across GPT-4o and GPT-4o Mini
// PromptLens automatically compares outputs
// and flags regressions against your baseline

Start Testing OpenAI Prompts

Connect your OpenAI API and start catching prompt regressions in minutes.

Get Started Free