Authentication
API Authentication
How Authentication Works
Using an API key
from openai import OpenAI
client = OpenAI(
base_url="https://app.interactive.ai/api/v1",
api_key="<LLMROUTER_API_KEY>",
)
response = client.chat.completions.create(
model="openai/gpt-4o",
messages=[
{"role": "system", "content": "You are a data analysis assistant."},
{"role": "user", "content": "Summarize the key metrics from this dataset."}
],
)
reply = response.choices[0].messagecurl https://app.interactive.ai/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $LLMROUTER_API_KEY" \
-d '{
"model": "openai/gpt-4o",
"messages": [
{"role": "system", "content": "You are a data analysis assistant."},
{"role": "user", "content": "Identify trends in this quarterly report."}
]
}'Compromised Keys
Last updated
Was this helpful?

