OpenAI SDK
Call Essevin with the OpenAI Python or Node.js SDK.
Existing OpenAI SDK applications only need a different Base URL, plan key, and model ID. Keep the application's current framework and error handling.
| Item | Value |
|---|---|
| Base URL | https://api.essevin.com/v1 |
| Key environment variable | ESSEVIN_OPENAI_API_KEY |
| Models | GPT, Gemini chat, and other OpenAI-compatible models |
| Model ID | Use an ID returned by GET /v1/models for the selected key |
Keep keys out of source code
Inject ESSEVIN_OPENAI_API_KEY through your deployment platform, a local .env file, or the system environment. Never commit .env or a real key to Git.
Install and send a minimal request
Install the SDK:
python -m pip install openaiSend a request:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.essevin.com/v1",
api_key=os.environ["ESSEVIN_OPENAI_API_KEY"],
)
resp = client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)Start with the prompt “Reply only with ok.” Add stream: true only when the application actually uses streaming, then verify that SSE events arrive incrementally.