China Mobile Cloud Coding Plan Tutorial: Jiutian Large Model API Integration Practice (2026 Latest)
China Mobile Cloud Coding Plan Tutorial: Jiutian Large Model API Integration Practice (2026 Latest)

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 hands-on tutorial for China Mobile Cloud Coding Plan, walking you through integrating China Mobile's Jiutian large model API.

1. Prerequisites

What You Need

  1. A China Mobile Cloud account
  2. Real-name verification (required for domestic services)
  3. Python environment (3.8+)

2. Getting an API Key

Step 1: Visit the Official Website

👉 Click to View China Mobile Cloud Coding Plan Details

Find the China Mobile entry and go to the Jiutian large model page.

Step 2: Activate Service

  1. Log into China Mobile Cloud console
  2. Search for "九天大模型"
  3. Activate the service
  4. Get your API Key

Step 3: Install SDK (Optional)

1
pip install cmcc-ai-sdk

3. Code Calling Practice

Basic Call

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import requests

# China Mobile API configuration
api_key = "your-API-Key"
url = "https://api.cmcc.cn/jiutian/v1/chat"

headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}

payload = {
"model": "jiutian-qianyuan",
"messages": [
{"role": "user", "content": "Help me write a Python quicksort"}
]
}

response = requests.post(url, headers=headers, json=payload)
result = response.json()
print(result["choices"][0]["message"]["content"])

Code Completion Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
def code_completion(prompt):
response = requests.post(
url,
headers=headers,
json={
"model": "jiutian-qianyuan",
"messages": [
{"role": "system", "content": "You are a Python coding assistant"},
{"role": "user", "content": f"Complete the following code:\n{prompt}"}
]
}
)
return response.json()["choices"][0]["message"]["content"]

result = code_completion("def quick_sort(arr):")
print(result)

4. China Mobile Cloud-Specific Features

1. Voice + AI Fusion

China Mobile Cloud supports voice + AI fusion services:

1
2
3
4
5
6
7
8
# Voice input
audio = "your-audio-file-path"
response = requests.post(
"https://api.cmcc.cn/jiutian/v1/audio",
headers=headers,
files={"audio": open(audio, "rb")}
)
print(response.json()["text"])

2. Carrier Network Optimization

China Mobile's APIs are usually very fast domestically with low latency.

5. FAQs

Q1: What versions of Jiutian are there?

VersionDescription
jiutian-qianyuanFlagship version, best results
jiutian-kunyuGeneral version, great value
jiutian-xunfeiVoice fusion version

Q2: Is there a free tier?

New users get a free trial quota — check the official site for specifics.

Q3: How fast is the response?

With carrier network support, response time is typically within 1–2 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!

🎓 AI 编程实战课程

程序员晚枫专注AI编程培训,通过 《30讲 · AI编程训练营》,让小白也能用AI做出实际项目。帮你从零上手!