Skip to content

GLM-5.3-FlashX-Legal

zai/glm-5.3-flashx-legal is the GLM-5.3-FlashX model that Z.AI trained further for legal workflows. Use it to extract key facts from contracts, company records and litigation files, check consistency across documents, flag clause-level risks and prepare first drafts. On LLMTR it is called through the OpenAI-compatible /v1/chat/completions endpoint with your existing LLMTR API key.

Model Context Output ceiling Inputs
zai/glm-5.3-flashx-legal 1,000,000 131,072 Text, image

Audio, video and document file (PDF, Word) input is not advertised. Convert the document to text and send it in the message. For scanned pages you can send the page as an image.

Prices are per 1 million tokens.

Price Input Cache read Output
LLMTR price $0.333 $0.0675 $1.125
Z.AI undiscounted API list price $0.370 $0.075 $1.250

The LLMTR price is 10 percent below the Z.AI list price.

Terminal window
curl "$LLMTR_BASE_URL/v1/chat/completions" \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "zai/glm-5.3-flashx-legal",
"messages": [
{ "role": "system", "content": "Review the contract on behalf of the buyer. List each risk with its clause number." },
{ "role": "user", "content": "Contract text:\n\n1. Parties ...\n7. Termination ...\n12. Governing law ..." }
],
"max_tokens": 2048
}'

You can send a long contract in a single message; the 1,000,000-token context is enough to compare several contracts and their schedules together. If you ask repeated questions about the same document set, send the documents in the same order at the start of the messages on every request; input tokens that hit the cache are billed at the cache read price.

If the result goes into your own system, pass a JSON Schema with response_format. The model returns a response that matches the schema:

from openai import OpenAI
client = OpenAI(base_url="https://llmtr.com/v1", api_key="llmtr-your_key")
schema = {
"type": "object",
"properties": {
"parties": {"type": "array", "items": {"type": "string"}},
"governing_law": {"type": "string"},
"risks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"clause": {"type": "string"},
"level": {"type": "string", "enum": ["low", "medium", "high"]},
"reason": {"type": "string"},
},
"required": ["clause", "level", "reason"],
"additionalProperties": False,
},
},
},
"required": ["parties", "governing_law", "risks"],
"additionalProperties": False,
}
response = client.chat.completions.create(
model="zai/glm-5.3-flashx-legal",
messages=[{"role": "user", "content": "Extract the parties, governing law and risks from this contract:\n\n..."}],
response_format={
"type": "json_schema",
"json_schema": {"name": "contract_review", "strict": True, "schema": schema},
},
max_tokens=2048,
)
print(response.choices[0].message.content)

If you do not need a schema, response_format: { "type": "json_object" } returns a valid JSON object.

The model does not search legislation, case law or company registries itself; you supply that information through your own tools. Define a function in tools; the model states which source it needs with a tool call, and you send the result back with the tool role:

{
"model": "zai/glm-5.3-flashx-legal",
"messages": [{ "role": "user", "content": "Which provisions apply to early termination of a lease?" }],
"tools": [{
"type": "function",
"function": {
"name": "search_legislation",
"description": "Searches a legislation database for provisions",
"parameters": {
"type": "object",
"properties": { "query": { "type": "string" } },
"required": ["query"]
}
}
}],
"max_tokens": 1024
}

See Tool Calling for tool schemas and result messages.

Reasoning is always on for this model and cannot be turned off. Plain zai/glm-5.3-flashx-legal calls run at low. For multi-document analysis, pick high or max with a model suffix or the reasoning_effort field; only low, high and max are accepted:

{
"model": "zai/glm-5.3-flashx-legal:high",
"messages": [{ "role": "user", "content": "Compare the termination clause across three versions of the contract." }],
"max_tokens": 4096
}

:fast, reasoning: false and thinking: { "type": "disabled" } are refused with a 400. Reasoning tokens are billed as output tokens. See Z.AI Thinking Control for the shared behavior.

Send a scanned contract page as image_url in an OpenAI-compatible content array:

{
"model": "zai/glm-5.3-flashx-legal",
"messages": [{
"role": "user",
"content": [
{ "type": "text", "text": "List the parties and the signature date on this page." },
{ "type": "image_url", "image_url": { "url": "https://example.com/contract-page-1.png" } }
]
}],
"max_tokens": 512
}
  • The model's output is a draft. A lawyer should review any text that goes to a client or a court.
  • Verify every cited provision and decision against its source. Supplying current legislation through a tool call is more reliable than relying on the model's training data.
  • Before sending documents that contain personal data, assess your own notice and transfer obligations.

Sources for the model and its pricing: Z.AI GLM-Legal announcement and Z.AI pricing.