Docs
Client Libraries
Client Libraries
Install the Elyxir API client libraries to start building with AI models.
Elyxir is compatible with the OpenAI SDK — use your preferred language's OpenAI client with the Elyxir base URL and your API key.
JavaScript / TypeScript
Bun
bun add openainpm / Node.js
npm install openaiUsage
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "your-elyxir-api-key",
baseURL: "https://api.elyxir.ai/v1",
});
const response = await client.chat.completions.create({
model: "gpt-4o-mini",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);Python
pip install openaiUsage
from openai import OpenAI
client = OpenAI(
api_key="your-elyxir-api-key",
base_url="https://api.elyxir.ai/v1",
)
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)Getting Your API Key
- Go to Settings > API Keys
- Click Create Key
- Copy the key and store it securely
Related
- Authentication - API key setup
- Quickstart - First API call
- Supported Models - Available models