cURL
curl https://tommyapi.com/v1/chat/completions \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4-mini",
"messages": [{"role":"user","content":"hello"}]
}'
Python
from openai import OpenAI
client = OpenAI(api_key="your-api-key", base_url="https://tommyapi.com/v1")
resp = client.chat.completions.create(
model="gpt-5.4-mini",
messages=[{"role":"user","content":"hello"}]
)
print(resp.choices[0].message.content)