The call · without
Direct to OpenAI. Provider key in the agent. Spend has no tab, so it runs past $5.
import os
from openai import OpenAI
client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
chat = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Summarize the batch."}],
max_tokens=128,
)