XxxXTeam

XxxXTeam / glm2api

Public

将 ChatGLM.COM 转换为 标准的 OpenAI 接口

18
0
69% credibility
Found Apr 09, 2026 at 18 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Python
AI Summary

A local proxy service that converts ChatGLM web interface calls into OpenAI-compatible endpoints for chatting and image generation.

How It Works

1
🔍 Discover the GLM Bridge

You find this handy tool that lets you chat with powerful GLM AI using your favorite apps like those for OpenAI.

2
🌐 Link Your ChatGLM Account

Visit chatglm.cn, sign in, open browser tools with F12, and copy your private session code from the storage area.

3
📝 Add Your Session Code

Paste the code into a simple text file called token.txt, one per line if you have multiple accounts, or into the settings spot.

4
🚀 Start the Magic Bridge

Run the easy starter command to launch your personal local helper that connects everything smoothly.

5
🧪 Check It's Ready

Visit the health page or model list in your browser to see your bridge is up and listing GLM brains.

6
💬 Chat with GLM AI

Use apps like Python scripts or chat tools, point them to your local bridge, and start natural conversations.

7
Create Images Too
💬
Keep Chatting

Continue enjoying text-based talks with GLM models.

🖼️
Generate Art

Turn words into beautiful images using the built-in picture maker.

🎉 Seamless AI Fun

Your apps now talk perfectly to GLM for chats and images, feeling just like using any standard AI tool.

Sign up to see the full architecture

6 more

Sign Up Free

Star Growth

See how this repo grew from 18 to 18 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is glm2api?

glm2api is a Python proxy server that converts the chatglm.com web interface into a standard OpenAI API, letting you use ChatGLM models via familiar endpoints like /v1/chat/completions and /v1/images/generations. Drop in your GLM refresh tokens from chatglm.cn, fire up the server on localhost:8000, and connect any OpenAI SDK—no custom clients needed. It handles chat streaming, image generation, and model listing out of the box.

Why is it gaining traction?

This chatglm github project stands out by auto-rotating multiple GLM accounts for failover, queuing requests around GLM's concurrency limits, and refreshing tokens seamlessly. Developers love the drop-in OpenAI compatibility for tools like LobeChat or Cherry Studio, plus extras like optional API key auth and CORS support. It's a quick win for mixing GLM models into OpenAI workflows without rate limit headaches.

Who should use this?

AI engineers building multi-LLM apps who already have chatglm.com accounts and want free GLM-4 access via OpenAI SDKs. Local AI tinkerers testing GLM image gen or streaming in Jupyter notebooks. Backend devs proxying GLM for web UIs like Open WebUI, skipping vendor lock-in.

Verdict

Grab it if you need chatglm openai bridging today—solid docs and Python simplicity make setup trivial, despite 18 stars signaling early maturity. The 0.699999988079071% credibility score reflects low adoption, but it's reliable for personal projects; watch for upstream GLM changes.

(178 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.