Back to API Keys Guide
🟢Recommended

How to Get an OpenAI API Key

Step-by-step guide for GPT-4, GPT-4o, and GPT-3.5 Turbo

2-3 minutes
$5 free credits
No credit card required initially
Before You Start
  • A valid email address
  • Phone number for verification (optional but recommended)
  • Credit card (only needed after free credits are used)

Step-by-Step Instructions

1

Go to OpenAI Platform

Visit the OpenAI API platform at:

platform.openai.com/signup
Note: The API platform (platform.openai.com) is different from ChatGPT (chat.openai.com). You need an API account, not just a ChatGPT account.
2

Create Your Account

You have three options to sign up:

  • Email: Enter your email and create a password
  • Google: Sign up with your Google account
  • Microsoft: Sign up with your Microsoft account

After signing up, you'll receive a verification email. Click the link to verify your account.

3

Verify Your Phone (Optional)

OpenAI may ask you to verify your phone number. This is a security measure and is optional for basic access, but required for higher usage limits.

Enter your phone number and the verification code you receive via SMS.

4

Navigate to API Keys

Once logged in, go to the API Keys section:

  1. Click on your profile icon in the top-right corner
  2. Select "View API Keys" from the dropdown
  3. Or go directly to: platform.openai.com/api-keys
5

Create a New API Key

  1. Click the "+ Create new secret key" button
  2. Give your key a name (e.g., "AI Assess Tech Testing")
  3. Click "Create secret key"
Important! Your API key will only be shown once. Copy it immediately and store it somewhere safe (like a password manager). You cannot view the full key again after closing this dialog.
6

Copy Your API Key

Your API key will look something like this:

sk-proj-aBcDeFgHiJkLmNoPqRsTuVwXyZ123456789...

Click the copy button to copy it to your clipboard.

Check Your Free Credits

New OpenAI accounts receive $5 in free credits that expire after 3 months. To check your credits:

  1. Go to platform.openai.com/usage
  2. View your current balance and usage

A single AI Health Check assessment costs approximately $0.01-0.03 with GPT-4o-mini, so your free credits will cover many assessments.

Using Your API Key with AI Assess Tech

Now that you have your API key, you can use it with AI Assess Tech:

Option 1: Demo Tool (aiassessmenttool.com)

  1. Go to aiassessmenttool.com
  2. Select "OpenAI" as your provider
  3. Paste your API key in the API Key field
  4. Choose your model (GPT-4o-mini recommended for cost)
  5. Click "Start Assessment"

Option 2: SDK Integration

import OpenAI from 'openai';
import { AIAssessClient } from '@aiassesstech/sdk';

const openai = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY
});

const client = new AIAssessClient({
  healthCheckKey: process.env.AIASSESS_KEY
});

const result = await client.assess(async (question) => {
  const response = await openai.chat.completions.create({
    model: 'gpt-4o-mini',
    messages: [{ role: 'user', content: question }]
  });
  return response.choices[0].message.content || '';
});
OpenAI Pricing (as of 2026)
ModelInput (per 1M tokens)Output (per 1M tokens)Est. Cost per Assessment
GPT-4o-mini Recommended$0.15$0.60~$0.01
GPT-4o$2.50$10.00~$0.15
GPT-4 Turbo$10.00$30.00~$0.50
GPT-3.5 Turbo$0.50$1.50~$0.02

Prices are approximate and may change. Check openai.com/pricing for current rates.

Troubleshooting

"Invalid API Key" error

Make sure you copied the entire key including the "sk-" prefix. Check for any extra spaces before or after the key.

"Rate limit exceeded" error

New accounts have lower rate limits. Wait a minute and try again, or add billing information to increase your limits.

"Insufficient funds" error

Your free credits may have expired or been used up. Add a payment method at platform.openai.com/account/billing.

Ready to Test Your AI?

Now that you have your OpenAI API key, you can run your first AI ethical assessment: