Inference
SDK Guides
Use InferX with the standard OpenAI Python client.
OpenAI Python client
No proprietary InferX SDK is required for the confirmed endpoint workflow. Use the standard OpenAI client and change the base URL.
inference.py
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["INFERX_API_KEY"],
base_url="https://model.inferx.net/v1",
)
stream = client.chat.completions.create(
model="YOUR_MODEL_ID",
messages=[{"role": "user", "content": "Hello, InferX."}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")Compatible tools
The existing InferX guides cover OpenCode, OpenClaw, Hermes, Claude Code, OpenWebUI, Dify, and Continue. Compatibility means these tools accept an OpenAI-compatible base URL and key; it does not imply partnership or endorsement.
