TeepinDocs

OpenAI compatibility

Point OpenAI's own SDKs, or any OpenAI-compatible tool, at Teepin by changing the base URL.

Teepin's chat API follows OpenAI's, so OpenAI's SDKs and tools built on them work by changing two settings:

SettingValue
Base URLhttps://api.teepin.com/v1
API keyYour Teepin API key (tpk_...)
from openai import OpenAI

openai = OpenAI(base_url="https://api.teepin.com/v1", api_key="tpk_...")
reply = openai.chat.completions.create(
    model="teepin/glm-5.3",
    messages=[{"role": "user", "content": "Hello"}],
    extra_body={"chat_template_kwargs": {"enable_thinking": False}},
)
print(reply.choices[0].message.content)

What is supported

  • GET /v1/models and POST /v1/chat/completions, answered whole or streamed.
  • The request fields listed on Chat completions. Others are ignored.

Embeddings, images, audio endpoints, files, fine-tuning jobs and assistants are not part of the API today.

Why use Teepin's SDKs

OpenAI's SDKs work, and Teepin's add a few things on top:

  • the attestation result for confidential models on every answer;
  • retries that never bill twice: a chat request is retried only when it certainly was not billed;
  • typed errors, such as no credit, rate limited and model not found.

On this page