SDKs and integrations
Every chat-completions client works out of the box.
HiWay implements the standard chat-completions API. There is no HiWay-specific SDK — you keep using the SDK you already have and just override the base URL. Below are the most common ones.
OpenAI Python
from openai import OpenAI
client = OpenAI(
base_url="https://www.hiway2llm.com/v1",
api_key="hwy_YOUR_KEY",
)Anthropic Python
Anthropic's SDK exposes a base URL parameter — same trick. The model name can be one of HiWay's aliases (claude-haiku, claude-sonnet, claude-opus) or a full namespaced ID.
from anthropic import Anthropic
client = Anthropic(
base_url="https://www.hiway2llm.com",
api_key="hwy_YOUR_KEY",
)LangChain
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
base_url="https://www.hiway2llm.com/v1",
api_key="hwy_YOUR_KEY",
model="claude-haiku",
)Vercel AI SDK
import { createOpenAI } from "@ai-sdk/openai";
const hiway = createOpenAI({
baseURL: "https://www.hiway2llm.com/v1",
apiKey: process.env.HIWAY_API_KEY,
});
const result = await hiway.chat("claude-haiku").doGenerate({...});n8n
Use the HTTP Request node. Method: POST, URL: https://www.hiway2llm.com/v1/chat/completions, Authentication: HTTP Header with Authorization: Bearer hwy_YOUR_KEY, Body: JSON with the standard chat completions schema.
Streaming works too
Pass "stream": true in the request body. HiWay forwards SSE chunks unchanged and accounts for token usage at the end of the stream.