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.

ItemValue
Base URLhttps://api.essevin.com/v1
Key environment variableESSEVIN_OPENAI_API_KEY
ModelsGPT, Gemini chat, and other OpenAI-compatible models
Model IDUse 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 openai

Send 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.

On this page