SDKs and clients
Epithre is OpenAI-wire-compatible. Use any OpenAI SDK and override base_url.
Official SDKs
| Language | Package | Notes |
|---|---|---|
| Python | pip install openai (v1.0+) |
Tested with 1.40+ |
| Node.js / TypeScript | npm install openai |
v4+ |
| Go | github.com/sashabaranov/go-openai |
|
| Java / Kotlin | com.openai:openai-java or Spring AI |
|
| Ruby | gem install ruby-openai |
|
| PHP | openai-php/client (Composer) |
|
| Rust | async-openai crate |
|
| .NET / C# | Azure.AI.OpenAI |
Setup pattern (Python)
from openai import OpenAI
client = OpenAI(
api_key=os.environ["EPITHRE_KEY"],
base_url="https://api.epithre.com/v1",
)
Setup pattern is identical across all OpenAI SDKs: set api_key to your Epithre key, set base_url to https://api.epithre.com/v1.
Framework integrations
LangChain (Python)
from langchain_openai import ChatOpenAI, OpenAIEmbeddings
llm = ChatOpenAI(
model="epithre-omni",
api_key=os.environ["EPITHRE_KEY"],
base_url="https://api.epithre.com/v1",
)
llm.invoke("Halo!")
embeddings = OpenAIEmbeddings(
model="epithre-embed",
api_key=os.environ["EPITHRE_KEY"],
base_url="https://api.epithre.com/v1",
)
LlamaIndex
from llama_index.llms.openai_like import OpenAILike
from llama_index.embeddings.openai_like import OpenAILikeEmbedding
Settings.llm = OpenAILike(
model="epithre-omni",
api_base="https://api.epithre.com/v1",
api_key=os.environ["EPITHRE_KEY"],
is_chat_model=True,
)
Settings.embed_model = OpenAILikeEmbedding(
model_name="epithre-embed",
api_base="https://api.epithre.com/v1",
api_key=os.environ["EPITHRE_KEY"],
embed_batch_size=64,
)
Set is_chat_model=True for chat models. Set is_function_calling_model=True if you want LlamaIndex to use tool calling.
Vercel AI SDK (Node)
import { createOpenAI } from "@ai-sdk/openai";
const epithre = createOpenAI({
apiKey: process.env.EPITHRE_KEY!,
baseURL: "https://api.epithre.com/v1",
});
const { text } = await generateText({
model: epithre("epithre-omni"),
prompt: "Halo!",
});
LiteLLM
import litellm
response = litellm.completion(
model="epithre/epithre-omni",
messages=[{"role": "user", "content": "Halo!"}],
api_key=os.environ["EPITHRE_KEY"],
api_base="https://api.epithre.com/v1",
)
Raw HTTP
If you don't want a SDK dependency:
import httpx
r = httpx.post(
"https://api.epithre.com/v1/chat/completions",
headers={
"Authorization": f"Bearer {os.environ['EPITHRE_KEY']}",
"Content-Type": "application/json",
},
json={
"model": "epithre-omni",
"messages": [{"role": "user", "content": "Halo!"}],
},
timeout=60,
).json()
print(r["choices"][0]["message"]["content"])
Epithre-specific features not in standard SDKs
A few capabilities aren't covered by the default chat-completions/embeddings/images interfaces:
cache_controlmarkers for prompt caching. Pass viaextra_bodyor directly as a content block field; the SDK passes through unknown fields.instructionon embeddings. Pass viaextra_body={"instruction": "..."}./v1/rerankendpoint. Not exposed by chat/embed SDKs. Use raw HTTP; see the rerank reference.epithre-iriscustom params (lora,lora_strength,num_steps). Pass viaextra_bodyonimages.generate().
See also
- Authentication
- Quickstart
- Migration guides: OpenAI, Anthropic, Cohere