PromptLayer takes less than 5 minutes to setup.

  • Sign up for an account at www.promptlayer.com
  • Grab an API key from PromptLayer. Find it in settings (click the cog on the top right).

It’s super easy to add PromptLayer to an existing project. Usually only takes one line.

# Make sure to `pip install promptlayer`
from promptlayer import PromptLayer
promptlayer_client = PromptLayer()

# Swap out your 'from openai import OpenAI'
OpenAI = promptlayer_client.openai.OpenAI

# Leave this
client = OpenAI()