ModelSite
Getting Started

Your first request

Send your first chat request to ModelSite with the OpenAI SDK

Swap your existing OpenAI client's base_url to ModelSite and you can call Claude, GPT, DeepSeek, GLM, Qwen, MiniMax and every other model.

Basics

FieldValue
Base URLhttps://api.modelsite.ai/v1
AuthAuthorization: Bearer $MODELSITE_API_KEY
FormatsOpenAI-compatible (/chat/completions), Anthropic-compatible (/messages)

Make the request

POST/v1/chat/completions
from openai import OpenAI

client = OpenAI(
    api_key="ms_live_sk_xxxxxxxx",  # or env var MODELSITE_API_KEY
    base_url="https://api.modelsite.ai/v1",
)

resp = client.chat.completions.create(
    model="claude-sonnet-4.6",
    messages=[{"role": "user", "content": "Hello, tell me about yourself"}],
)
print(resp.choices[0].message.content)

The model name claude-sonnet-4.6 is illustrative. For the full, up-to-date model ID list, query GET /v1/models — see Models.

Response example

{
  "id": "chatcmpl-xxxxx",
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "Hi! I'm a large language model running on ModelSite…" },
      "finish_reason": "stop"
    }
  ],
  "usage": { "prompt_tokens": 12, "completion_tokens": 28, "total_tokens": 40 }
}

Next steps

On this page