---
title: "OpenAI"
id: "27996"
type: "epkb_post_type_1"
slug: "openai"
published_at: "2024-11-22T19:04:55+00:00"
modified_at: "2026-04-28T03:21:13+00:00"
url: "https://docs.rc.fas.harvard.edu/kb/openai/"
markdown_url: "https://docs.rc.fas.harvard.edu/kb/openai.md"
excerpt: "Description See OpenAI website and documentation. Security Please, carefully read Harvard’s AI guidelines and Generative AI tool comparision. See our FASRC Guidelines for OpenAI Key and Harvard Agreement. You can only use openAI and other genAI on your own is..."
taxonomy_epkb_post_type_1_category:
  - "AI"
---

# OpenAI

## Description

See OpenAI website and documentation.

## Security

Please, **carefully** read Harvard’s [AI guidelines](https://huit.harvard.edu/ai/guidelines)
 and [Generative AI tool comparision](https://huit.harvard.edu/ai/tools)
. See our [FASRC Guidelines for OpenAI Key and Harvard Agreement.](https://docs.rc.fas.harvard.edu/kb/openai-guidelines/)

You can only use openAI and other genAI on your own is if it is not Harvard work related and/or public, non-sensitive data (data security level 1).

For data security **levels 2 and 3**, you need to work with your school to discuss your needs. It is your responsibility to make sure you get setup with the appropriate contractual coverage and environment — esp. to avoid having the model learn from your input and leak sensitive information.

## Installation

You can install OpenAI in a conda/mamba environment:

`[jharvard@boslogin01 ~]$ salloc --partition test --time 01:00:00 --mem-per-cpu 4G -c 2`  
 `[jharvard@holy8a24301 ~]$ module load python/3.10.12-fasrc01`  
 `[jharvard@holy8a24301 ~]$ export PYTHONNOUSERSITE=yes`  
 `[jharvard@holy8a24301 ~]$ mamba create -n openai_env openai`

## Run OpenAI Model

You will need to provide an OpenAI key. You can generate one from  
 https://platform.openai.com/api-keys.

```
# Request an interactive job
[jharvard@boslogin01 ~]$ salloc --partition test --time 01:00:00 --mem-per-cpu 4G -c 2
# Source conda environment
[jharvard@holy8a24301 ~]$ source activate openai_env
# replace my_key with the key that you generated on OpenAI's website
[jharvard@holy8a24301 ~]$ export OPENAI_API_KEY='my_key'
# set SSL_CERT_FILE with system's certificate
(openai_env) [jharvard@holy8a24301 ~]$ export SSL_CERT_FILE='/etc/pki/tls/certs/ca-bundle.crt'
# run OpenAI example
(openai_env) [jharvard@holy8a24301 ~]$ python openai-test.py
```

**Note:** OpenAI uses the python package `httpx`. You must set the variable `SSL_CERT_FILE` to use the system’s certificate. If you do not set `SSL_CERT_FILE` OpenAI will give this error:

```
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)
```

## Examples

See [User Codes on OpenAI](https://github.com/fasrc/User_Codes/blob/master/AI/OpenAI/)
 including [an example on OpenAI Whisper](https://github.com/fasrc/User_Codes/blob/master/AI/OpenAI/Whisper/README.md)
.

## Resources

- [OpenAI ChatGPT Edu](https://huit.harvard.edu/openai-chatgpt-edu) is an advanced version of the ChatGPT tool with enhanced security and privacy protections.
- [OpenAI ChatGPT Edu for FAS:](https://it.fas.harvard.edu/openai-chatgpt-edu/) ChatGPT Edu to members of the FAS for use in your Harvard work.

Bookmarkable Links

- [1. Description](#Description)
- [2. Security](#Security)
- [3. Installation](#Installation)
- [4. Run OpenAI Model](#Run_OpenAI_Model)
- [5. Examples](#Examples)
- [6. Resources](#Resources)

Last UpdatedApril 28, 2026
