This is in development. Details may change before it is available.
ALTRUM_VIRTUAL_KEY environment variable.
- OpenAI
- Anthropic
- Google
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Point the OpenAI, Anthropic and Google SDKs at the AI Gateway by changing the base URL and the key.
ALTRUM_VIRTUAL_KEY environment variable.
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.altrum.ai/openai/v1", api_key=os.environ["ALTRUM_VIRTUAL_KEY"])
reply = client.chat.completions.create(
model="openai/gpt-4o-mini",
messages=[{"role": "user", "content": "Summarise this ticket in one line."}],
)
print(reply.choices[0].message.content)
import OpenAI from 'openai'
const client = new OpenAI({ baseURL: 'https://api.altrum.ai/openai/v1', apiKey: process.env.ALTRUM_VIRTUAL_KEY })
const reply = await client.chat.completions.create({
model: 'openai/gpt-4o-mini',
messages: [{ role: 'user', content: 'Summarise this ticket in one line.' }],
})
console.log(reply.choices[0].message.content)
import os
from anthropic import Anthropic
client = Anthropic(base_url="https://api.altrum.ai/anthropic", api_key=os.environ["ALTRUM_VIRTUAL_KEY"])
reply = client.messages.create(
model="anthropic/claude-sonnet-4-5",
max_tokens=256,
messages=[{"role": "user", "content": "Summarise this ticket in one line."}],
)
print(reply.content[0].text)
import os
from google import genai
from google.genai import types
client = genai.Client(
api_key=os.environ["ALTRUM_VIRTUAL_KEY"],
http_options=types.HttpOptions(base_url="https://api.altrum.ai/genai"),
)
reply = client.models.generate_content(
model="gemini/gemini-2.5-flash",
contents="Summarise this ticket in one line.",
)
print(reply.text)