Step-by-step guide for GPT-4, GPT-4o, and GPT-3.5 Turbo
Visit the OpenAI API platform at:
platform.openai.com/signupYou have three options to sign up:
After signing up, you'll receive a verification email. Click the link to verify your account.
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.
Once logged in, go to the API Keys section:
Your API key will look something like this:
sk-proj-aBcDeFgHiJkLmNoPqRsTuVwXyZ123456789...Click the copy button to copy it to your clipboard.
New OpenAI accounts receive $5 in free credits that expire after 3 months. To check your credits:
A single AI Health Check assessment costs approximately $0.01-0.03 with GPT-4o-mini, so your free credits will cover many assessments.
Now that you have your API key, you can use it with AI Assess Tech:
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 || '';
});| Model | Input (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.
Make sure you copied the entire key including the "sk-" prefix. Check for any extra spaces before or after the key.
New accounts have lower rate limits. Wait a minute and try again, or add billing information to increase your limits.
Your free credits may have expired or been used up. Add a payment method at platform.openai.com/account/billing.
Now that you have your OpenAI API key, you can run your first AI ethical assessment: