All models

glm-3-turbo

ZhipuChat
Get your API key
STANDARD APIs · QUICK SETUP

Keep your SDK. Connect in minutes.

Point the Base URL to api.acedata.cloud, configure your platform API key and the model ID below, and use your compatible SDK or client.

API host
api.acedata.cloud
model
glm-3-turbo
Get your API key
OpenAI Python SDK
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["ACEDATACLOUD_API_KEY"],
    base_url="https://api.acedata.cloud/v1",
)
response = client.chat.completions.create(
    model="glm-3-turbo",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

Choose an available protocol for this model. OpenAI SDK uses a Base URL ending in /v1; Anthropic SDK uses the root URL. See each guide for protocol-specific parameters, tools and response formats.

GLM-3-Turbo · Lightweight Text Conversation and Information Extraction

Suitable for processing short text. You can ask the model to classify support tickets, extract specified fields from a passage, or rewrite long sentences into concise replies.

Model and Input/Output

Request Model
glm-3-turbo
Input
Text messages
Output
Text
Typical Tasks
Question answering, classification, and extraction

How to Structure Input

Include the text to be classified, the allowed categories, and the output format in the same message. If the input is a conversation history, arrange the messages in chronological order.

Send a Request

Send model and messages to POST /glm/chat/completions. In non-streaming responses, the text is located in choices[0].message.content.

GLM Chat Completions Integration Guide · View API

Read Responses Incrementally

After setting stream: true, concatenate choices[0].delta.content from SSE events in order, and save the complete response when the stream ends.

Usage and Pricing

Each million input tokens costs 2.453 Credits, and each million output tokens costs 0.788 Credits. Charges are calculated based on the public model specified in the request. When compatible routing is enabled, the platform can fulfill requests using compatible models in the same tier.

View Model Pricing

Frequently Asked Questions

What should I enter for model?

Enter glm-3-turbo.

How do I perform text classification?

List mutually exclusive candidate categories and specify what should be returned when none of the categories match.

How do I handle multi-turn conversations?

Add previous user messages, assistant replies, and the new question to the messages array in the next request.

How do I limit the response length?

You can use max_tokens to specify the output limit and describe the required format in your prompt.

How do I verify the usage of a request?

Read usage in the response and check the usage records for that request in the console.