GLM-3-Turbo · Lightweight Text Conversation and Information Extraction
Suitable for short text. You can ask the model to classify tickets, extract specified fields from a passage, or rewrite a long sentence as a short reply.
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
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.
Model and Input/Output
- Request model
- glm-3-turbo
- Input
- Text messages
- Output
- Text
- Typical tasks
- Question answering, classification, and extraction
How to Organize Input
Include the text to classify, the allowed categories, and the output format in the same message. If the input is a conversation history, arrange the messages chronologically.
Make a Request
Send model and messages to POST /glm/chat/completions. The text of a non-streaming response is in choices[0].message.content.
Read the Response Incrementally
After setting stream: true, concatenate choices[0].delta.content from the SSE events in order, and save the complete response after 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 may fulfill the request using a compatible model in the same tier.
Frequently Asked Questions
What should I enter for model?
Enter glm-3-turbo.
How do I classify text?
List mutually exclusive candidate categories and specify what to return if none matches.
How do I handle multi-turn conversations?
Include previous user messages, assistant responses, and the new question in the messages array of the next request.
How do I limit the length of a response?
Use max_tokens to specify the output limit, and state the desired format in the question.
How do I check usage for a call?
Read usage in the response and check the usage record for that request in the console.
Use it in your favorite tools
Choose a development approach or application suited to this model and follow its setup guide.
Connect glm-3-turbo to OpenAI SDK
OpenAI Chat Completions API
SDK installation, authentication and examplesConnect glm-3-turbo to LangChain
LangChain Integration Guide
SDK installation, authentication and examplesConnect glm-3-turbo to Cherry Studio
Using Ace Data Cloud with Cherry Studio
Chat client setup · Base URL, API key and modelConnect glm-3-turbo to ChatBox
Using Ace Data Cloud with ChatBox
Chat client setup · Base URL, API key and model
