Getting Started
Getting started is easy, just follow a few simples steps.
Step 1: Update configuration object
from openai import OpenAI;
client = OpenAI(
api_key=os.environ.get("OPENAI_API_KEY"),
# ADD THIS URL AS BASE URL
baseUrl = "https://proxy.getprops.ai/",
# ADD YOUR PROPS API KEY HEADER
defaultHeaders = {
"x-props-key": "<PROPS_API_KEY>"
}
)
Step 2: Add unique identifier to each request
completion = client.chat.completions.create(
messages = [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "What is the meaning of life?" }
],
model = "gpt-4",
# ADD YOUR UNIQUE IDENTIFIER HERE
user = "<USER_ID or STRIPE_SUBSCRIPTION_ID or INTERNAL_PROCESS_ID>"
)
We are here to help if there are any implementation issues you face. Schedule a demo (opens in a new tab).
Note: The header
x-api-key
has been changed tox-props-key
.x-api-key
is still supported for backward compatibility, but please update tox-props-key
going forward.