Python (OpenAI SDK & Frameworks)
Official SDK
LangChain (example)
LlamaIndex, Haystack, etc.
Any framework that accepts an OpenAI-compatiblebase_url + api_key will work.
Just point them at https://api.openference.com/v1.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Use the official OpenAI Python library or frameworks like LangChain with Openference.
pip install openai
from openai import OpenAI
client = OpenAI(
base_url="https://api.openference.com/v1",
api_key="YOUR_API_KEY"
)
response = client.chat.completions.create(
model="GLM-5.2",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
base_url="https://api.openference.com/v1",
api_key="YOUR_API_KEY",
model="GLM-5.2",
)
print(llm.invoke("Say hi in French").content)
base_url + api_key will work.
Just point them at https://api.openference.com/v1.