Article Author: 程序员晚枫 | AI Programming Advocate | Specializing in AI Tool Reviews & Teaching

400,000+ followers across platforms, 6 years Python development experience, creator of python-office open-source project

💡 Want a systematic overview of all vendors' Coding Plans? 👉 Click to View Coding Plan Comparison Summary

Hey everyone, this is 程序员晚枫 (Programmer Wanfeng).

Today I'm bringing you a developer getting-started tutorial for Zhipu AI Coding Plan, walking you through from API Key application to writing your first call code.

1. Prerequisites

What You Need

  1. A Zhipu account (register at bigmodel.cn)
  2. Real-name verification (required for domestic services)
  3. Python environment (3.8+, 3.10+ recommended)

2. Getting an API Key

Step 1: Visit the Official Website

👉 Click to View Zhipu AI Coding Plan Details

Find the Zhipu AI entry and go to the open platform.

Step 2: Register and Verify

  1. Register with phone number
  2. Complete real-name verification (supports personal ID)
  3. Log into the console

Step 3: Create an API Key

  1. Go to "API Key Management" page
  2. Click "Create API Key"
  3. Save the key carefully (only shown once!)

3. Code Calling Practice

Environment Setup

1
pip install zhipuai

Basic Call

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from zhipuai import ZhipuAI

# Initialize client
client = ZhipuAI(api_key="your-API-Key")

# Call GLM
response = client.chat.completions.create(
model="glm-4",
messages=[
{"role": "user", "content": "Help me write a Python quicksort"}
]
)

# Print result
print(response.choices[0].message.content)

Code Completion Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Give some code and have GLM complete it
code = """
def quick_sort(arr):
# Complete this function
"""

response = client.chat.completions.create(
model="glm-4",
messages=[
{"role": "system", "content": "You are a Python coding assistant"},
{"role": "user", "content": f"Complete the following Python code:\n{code}"}
]
)
print(response.choices[0].message.content)

4. IDE Plugin Integration

Zhipu also offers IDE plugins:

  1. Search "智谱" in VS Code extension marketplace
  2. Install the plugin
  3. Enter your API Key
  4. Start using

5. FAQs

Q1: Is there a free tier for API calls?

Yes, new users get a free trial quota. The specific amount is subject to the official site.

Q2: What are the rate limits?

Different plans have different limits. Basic tier is usually 60 calls per minute, higher tiers are more.

Q3: How fast is the response?

With domestic access, response time is typically within 1–3 seconds.



📢 More Coding Plan Comparisons: 👉 View All Vendors' Coding Plans


Author: 程序员晚枫 (Programmer Wanfeng), across all platforms, specializing in AI tool reviews and Python automation office teaching.


🎓 AI Programming Course

Want to learn AI programming systematically? Check out CoderWanFeng's AI Programming Course!


🤖 Developer Productivity Tools

👉 Want to try MiniMax Token Plan? Click here for 10% off

💡 Pay-per-use pricing — super cost-effective! Think of it like a farmers market: buy a ticket, and all the veggies are free. Pay based on actual usage, no limits, no monthly fees. Perfect for developers!