glm-free-api  by LLM-Red-Team

API for GLM-4-Plus, enabling agentic capabilities

created 1 year ago
718 stars

Top 48.9% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a reverse-engineered API for Zhipu AI's GLM-4-Plus model, enabling users to access advanced features like streaming output, agent capabilities, video generation, AI art, web search, and long document analysis. It's designed for researchers and developers who need to integrate these capabilities into their applications without direct access to the official API, offering a zero-configuration deployment.

How It Works

The API acts as a proxy, intercepting requests intended for Zhipu AI's platform and translating them into a compatible format. It leverages a user's refresh_token for authentication, extracting it from browser cookies. The project supports various models within the GLM family, including those for "thinking," "deep research," and agent-specific functionalities, by mapping specific model identifiers to the API calls. It aims for OpenAI compatibility for ease of integration.

Quick Start & Requirements

  • Install/Run: Docker is the recommended method:
    docker run -it -d --init --name glm-free-api -p 8000:8000 -e TZ=Asia/Shanghai vinlic/glm-free-api:latest
    
  • Prerequisites: A Zhipu AI account to obtain a refresh_token.
  • Setup: Minimal setup time, primarily involves obtaining the refresh_token.
  • Docs: README

Highlighted Details

  • Supports GLM-4-Plus, GLM-4-Zero, GLM-4-DeepResearch, and agent models.
  • Offers OpenAI-compatible endpoints for chat completions, image generation, and document/image analysis.
  • Includes endpoints for video generation with various style and atmosphere options.
  • Supports multi-account access by concatenating refresh_tokens.

Maintenance & Community

The project is maintained by the LLM-Red-Team. Links to other similar "free-api" projects are provided, suggesting a community effort in reverse-engineering various LLM APIs.

Licensing & Compatibility

The project is explicitly stated as for research and learning purposes only. It prohibits commercial use or providing services to others, warning of risks and potential service pressure on the official platform. The specific license is not stated, but the usage restrictions are clear.

Limitations & Caveats

Reverse-engineered APIs are inherently unstable and subject to change or discontinuation by the official provider. The project disclaims responsibility for any risks, including account bans. It also notes that token usage statistics are not available as inference is handled externally.

Health Check
Last commit

2 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
42 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.