SDKs & Libraries
OpenAI SDK
Use the official openai package with Prismma — no wrapper needed.
Install
pip install openai
npm install openai
Python: pip install openai — Node.js: npm install openai. Same package as calling OpenAI directly.
Configure
Set base_url to Prismma's v1 endpoint and api_key to your sk-eu-... key. Everything else about the client is unchanged.
from openai import OpenAI
client = OpenAI(
base_url="https://api.prismma.ai/v1", # Prismma relay, not api.openai.com
api_key="sk-eu-YOUR-KEY",
)
response = client.chat.completions.create(
model="claude-opus-4-7",
messages=[{"role": "user", "content": "Hello, Prismma"}],
)
print(response.choices[0].message.content)Examples
Streaming
stream = client.chat.completions.create(
model="claude-opus-4-7",
messages=[{"role": "user", "content": "Write a haiku about mountains"}],
stream=True,
)
for chunk in stream:
delta = chunk.choices[0].delta.content
if delta:
print(delta, end="", flush=True)