Prepare a minimal integration check
Obtain confirmed settings before validating a minimal request and its safety boundaries.
Collect confirmed configuration
Website under maintenance. Use this guide to prepare your application settings, keep credentials on the server, and confirm service details with support before scheduling production traffic. Obtain the confirmed base URL, model identifier, and authentication method from support. Separate test and production credentials, and record the source and confirmation of each setting.
Start with non-sensitive input
Choose a short message without personal data and make a minimal request from a controlled server environment. Configure the client according to its version documentation only after the relevant compatible protocol has been confirmed. Validate a basic response before adding optional features such as streaming or tools.
Define acceptance and next steps
Record the outcome, required response fields, and error handling without logging credentials or complete content. Next, test timeouts, invalid parameters, and denied access, checking that retries cannot duplicate consequential actions. No example on this page is presented as verified against a live UBTL API.
Server-side integration example
Install the official SDK locally (Python: pip install openai; Node.js: npm install openai). Set OPENAI_API_KEY, OPENAI_BASE_URL and OPENAI_MODEL to values confirmed by the service contact. Never paste real keys into this website or frontend code. This illustrates a common Chat Completions pattern, not a verified live endpoint.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["OPENAI_API_KEY"],
base_url=os.environ["OPENAI_BASE_URL"],
)
result = client.chat.completions.create(
model=os.environ["OPENAI_MODEL"],
messages=[{"role": "user", "content": "Hello, AI."}],
)
print(result.choices[0].message.content)# Set these to values confirmed by your service contact.
curl "${OPENAI_BASE_URL}/chat/completions" \
-H "Authorization: Bearer ${OPENAI_API_KEY}" \
-H "Content-Type: application/json" \
-d "{\"model\":\"${OPENAI_MODEL}\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello, AI.\"}]}"import OpenAI from "openai";
// Run on your server. Never expose a key in browser code.
const client = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
baseURL: process.env.OPENAI_BASE_URL,
});
const result = await client.chat.completions.create({
model: process.env.OPENAI_MODEL,
messages: [{ role: "user", content: "Hello, AI." }],
});
console.log(result.choices[0].message.content);