OpenAI SDK Compatibility
Selixes implements the complete OpenAI chat completion and streaming specifications. Because the gateway exposes standard OpenAI endpoints at its edge, any library, tool, or SDK built for OpenAI can be retargeted to Selixes simply by changing the baseURL and providing a valid API key.
Node.js SDK Configuration
Configure the official openai package to proxy request transit through your local or remote Selixes gateway container.
import OpenAI from 'openai';
const openai = new OpenAI({
apiKey: process.env.SELIXES_API_KEY, // selixes_live_...
baseURL: 'http://localhost:4000/v1', // Route to Selixes local gateway
});
const completion = await openai.chat.completions.create({
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Process transaction logs...' }],
});Python SDK Configuration
For Python applications, update the client constructor parameters:
from openai import OpenAI
client = OpenAI(
api_key="selixes_live_your_key_here",
base_url="http://localhost:4000/v1"
)
completion = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Analyze pipeline concurrency"}]
)Supported Capabilities
- Chat Completions: Complete support for both
/v1/chat/completionsnon-streaming and streaming endpoints. - Streaming: Server-Sent Events (SSE) streaming with exact chunk-by-chunk event translation across fallback providers (e.g. Anthropic to OpenAI stream mappings).
- Function Calling: Structured tool definitions and tool calls are preserved when routed, with fallback translators parsing outputs dynamically.