Writer: Palmyra X5 vs Z.ai: GLM 5.2
A side-by-side comparison of Writer: Palmyra X5 ($2.10 / 1M tokens) and Z.ai: GLM 5.2 ($0.02 / 1M tokens) using current USD prices and capabilities from the api14 catalog. Both run through the same OpenAI-compatible API.
Specifications
| Writer: Palmyra X5 | Z.ai: GLM 5.2 | |
|---|---|---|
| Provider | Writer | Z.ai |
| Input | $2.10 / 1M tokens | $0.02 / 1M tokens |
| Output | $21.00 / 1M tokens | $23.80 / 1M tokens |
| Cache read | - | $0.02 / 1M tokens |
| Context window | 1,040,000 | 1,048,576 |
| Max output | 8,192 | 943,718 |
| Input | text | text |
| Output | text | text |
| Tool calling | ||
| Structured output | ||
| Reasoning control | ||
| Added | Jan 21, 2026 | Jun 16, 2026 |
Key differences
- Z.ai: GLM 5.2 is 99% cheaper on input tokens.
- Writer: Palmyra X5 is 12% cheaper on output tokens.
- Only Z.ai: GLM 5.2 supports tool calling.
- Only Z.ai: GLM 5.2 supports structured JSON output.
- Only Z.ai: GLM 5.2 supports reasoning effort control.
- A request with 1,000 input and 500 output tokens costs $0.01 with Writer: Palmyra X5 and $0.01 with Z.ai: GLM 5.2.
In depth
Writer: Palmyra X5 is made by Writer, and Z.ai: GLM 5.2 is made by Z.ai. Both are text models in the same category, so neither one is a specialist vision or audio model. Palmyra X5 was released by its provider on 2026-01-21, while GLM 5.2 arrived later, on 2026-06-16. If you are choosing between them, the practical differences are in context size, parameter support and price rather than in what kind of input they accept.
On raw context, the two are close enough that it is not a meaningful difference: Palmyra X5 takes 1,040,000 tokens and GLM 5.2 takes 1,048,576 tokens. Both accept text in and return text out, so there is no modality gap to weigh. The real split is in the request parameters each one exposes. Palmyra X5 supports a compact set: max_tokens, stop, temperature, top_k and top_p. GLM 5.2 supports all of those plus frequency_penalty, presence_penalty, repetition_penalty, logit_bias, logprobs, top_logprobs, min_p, seed, response_format, structured_outputs, tools, tool_choice, parallel_tool_calls, include_reasoning, reasoning and reasoning_effort. In short, GLM 5.2 is the only one of the two with tool calling, the only one with structured outputs, and the only one with reasoning controls. GLM 5.2 is also the cheaper of the two on both input and output, though you should check the live price table for the current numbers.
That parameter list should drive most of your decisions. If your workload is straightforward text generation, summarisation, drafting or classification where you send a prompt and read a string back, Palmyra X5 is a perfectly reasonable call and its sampling controls are enough. If you need the model to call functions, return JSON that validates against a schema, or expose a reasoning mode you can dial up or down, GLM 5.2 is the one to use, because Palmyra X5 does not offer those parameters at all. The same applies if you want deterministic-ish sampling via seed, token-level logprobs for debugging or scoring, or penalties to steer repetition. Given that GLM 5.2 is also the cheaper option and its context window is effectively the same size, the default choice for most new work is GLM 5.2 unless you have a specific reason to prefer Writer's model.
Calling either one through api14 is the same motion. Both are served behind an OpenAI-compatible API, so you point your existing OpenAI client at the api14 base URL, use your api14 key, and set the model field. The only thing that changes between the two is that string: use "writer/palmyra-x5" for Palmyra X5 and "z-ai/glm-5.2" for GLM 5.2. Your messages array, your streaming setup and your response parsing stay as they are. If you switch to GLM 5.2 and want tools, structured outputs or reasoning, add those fields to the request body; if you switch back to Palmyra X5, drop them, since it does not accept them.
There is still a case for Palmyra X5. If you are already running Writer in your stack, or you have prompts tuned against its sampling behaviour and do not need tools, structured outputs or reasoning, moving to GLM 5.2 buys you little beyond a lower price. In that situation, keep the model id as "writer/palmyra-x5" and leave your integration alone.
Switch with one string
Both models use the same endpoint and request shape. Change the model value from "writer/palmyra-x5" to "z-ai/glm-5.2" and prompts, streaming and tools keep working.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.chat.completions.create({
"model": "z-ai/glm-5.2",
"messages": [
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
]
});
console.log(result.choices[0].message.content);
More comparisons
- LiquidAI: LFM3-1.7B vs Ricursive: Ripple 65B Preview
- LiquidAI: LFM3-1.7B vs Crouton Alpha
- LiquidAI: LFM3-1.7B vs Tencent: Hy4
- LiquidAI: LFM3-1.7B vs Z.ai: GLM 5.3 FlashX Legal
- Ricursive: Ripple 65B Preview vs Crouton Alpha
- Ricursive: Ripple 65B Preview vs Tencent: Hy4
- Ricursive: Ripple 65B Preview vs Z.ai: GLM 5.3 FlashX Legal
- Crouton Alpha vs Tencent: Hy4