SDK & Frameworks
OpenAI / Anthropic / LangChain / third-party clients — plug and play
ModelSite is compatible with both the OpenAI and Anthropic API formats, so no dedicated SDK is required. Point your existing client's base_url at us and pass your API key.
OpenAI SDK
from openai import OpenAI
client = OpenAI(
base_url="https://api.modelsite.ai/v1",
api_key="ms_live_sk_xxxxxxxx",
)Anthropic SDK
from anthropic import Anthropic
client = Anthropic(
base_url="https://api.modelsite.ai", # SDK appends /v1/messages
auth_token="ms_live_sk_xxxxxxxx", # Bearer (required — do not use api_key)
)LangChain
Use ChatOpenAI with base_url + api_key:
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
base_url="https://api.modelsite.ai/v1",
api_key="ms_live_sk_xxxxxxxx",
model="claude-sonnet-4.6",
)Third-party clients (Chatbox / Cherry Studio / LobeChat, etc.)
In the client's "custom provider" settings, fill in:
| Field | Value |
|---|---|
| API Base URL | https://api.modelsite.ai/v1 |
| API Key | ms_live_sk_xxxxxxxx |
| Model name | see Models |
Environment variables
Avoid hardcoding keys in source; use an environment variable:
export MODELSITE_API_KEY="ms_live_sk_xxxxxxxx"SDKs send their default
User-Agent, Authorization and other headers, which the platform accepts as-is. If you hit a compatibility issue, first check whether base_url includes /v1 (it should).