ModelSiteAPI

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 DeepSeek, GLM, Qwen, MiniMax and the other chat models on the platform (image and video models use their own endpoints; see their pages).

Basics

FieldValue
Base URLhttps://api.modelsite.ai/v1
AuthAuthorization: Bearer $MODELSITE_API_KEY (keys start with sk-ms-; the x-api-key header is not accepted)
FormatsOpenAI-compatible (/chat/completions, /responses), Anthropic-compatible (/messages)

Make the request

POST/v1/chat/completions
from openai import OpenAI

client = OpenAI(
    api_key="sk-ms-xxxxxxxx",  # or set only OPENAI_API_KEY (the SDK reads that name)
    base_url="https://api.modelsite.ai/v1",
)

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

The model name glm-5.3-flash 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",
  "created": 1760000000,
  "model": "glm-5.3-flash",
  "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