Palmyra X5 API: toman pricing and code
writer/palmyra-x5
You are billed for the usage the request actually reported. Prices follow the market.Pricing and top-ups
Palmyra X5 example: rewriting tone
The example is picked from this model's own capabilities. Drop in your key and it runs as is.
from openai import OpenAI
client = OpenAI(base_url="https://api.uttapen.ir/v1", api_key="sk-up-…")
stream = client.chat.completions.create(
model="writer/palmyra-x5",
messages=[{"role": "user", "content": "Rewrite this support reply politely: \"That's your problem, just try again.\""}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="", flush=True)import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uttapen.ir/v1", apiKey: "sk-up-…" });
const stream = await client.chat.completions.create({
model: "writer/palmyra-x5",
messages: [{ role: "user", content: "Rewrite this support reply politely: \"That's your problem, just try again.\"" }],
stream: true,
});
for await (const chunk of stream) process.stdout.write(chunk.choices[0]?.delta?.content ?? "");curl https://api.uttapen.ir/v1/chat/completions \
-H "Authorization: Bearer sk-up-…" \
-H "Content-Type: application/json" \
-d '{
"model": "writer/palmyra-x5",
"messages": [{"role": "user", "content": "Rewrite this support reply politely: \"That's your problem, just try again.\""}],
"stream": true
}'What is Palmyra X5 good for?
Palmyra X5 is one of Writer's models. Put "writer/
This one handles text only. If you need function calling or image understanding, pick another model from the same catalogue — swapping is a one-line change.
Pricing is 207,732 toman per 1M input tokens and 2,077,316 per 1M output tokens. A 1,000-word round trip on Palmyra X5 lands near 2,971 toman. You are always charged for the usage the request actually reported, never for the estimate, and a failed request costs nothing.
The closest alternative with the same capabilities from a different provider is Magnum v4 72B: Palmyra X5 works out about 9% cheaper, and its context window is larger. Both run on the same key and the same code, so trying the other one is a single string change.
To make the figure concrete: 100,000 toman of credit buys roughly 34 thousand-word requests on Palmyra X5, and every 1,000 toman is about 337 words of round trip. A job with one million input tokens and one million output tokens comes to 2,285,048 toman in total. Filling this model's 1,040,000-token window costs 216,041 toman on the input side alone, which is the real reason to keep conversation history short.
Among the less common parameters it accepts top_k — all through the standard request body. It does not support include_reasoning, reasoning, response_format, tool_choice, which most models here do, so test before switching if your code relies on them. By context size the nearest option from another provider is GPT-4.1 at 1,047,576 tokens.
Good fits: product chatbots and internal assistants, where cost and quality have to balance, analysing a long document or codebase in one request.
Palmyra X5 is Writer's most advanced model, purpose-built for building and scaling AI agents across the enterprise. It delivers industry-leading speed and efficiency on context windows up to 1 million...
Three real jobs, priced on this model
Each figure is derived from the prices above and moves when they do.
| Job | Tokens | Cost |
|---|---|---|
| One chat turn with a medium history | 1,500 in + 400 out | 1,143 toman |
| Summarising a ten-page document | 4,000 in + 600 out | 2,077 toman |
| Classifying a thousand short rows | 120,000 in + 20,000 out | 66,474 toman |
Frequently asked
- How do I call Palmyra X5 from Iran?
- Sign up with your mobile number, top the wallet up in toman, create an API key, then in the official OpenAI SDK point base_url at https:/
/ api.uttapen.ir/ v1 and set model to "writer/ palmyra-x5". Nothing else in your code changes. - What does Palmyra X5 cost in toman?
- 207,732 toman per 1M input tokens and 2,077,316 toman per 1M output tokens; a 1,000-word request is around 2,971 toman. You pay for the usage that request actually reported, and a failed request costs nothing.
- How much input does Palmyra X5 take?
- Up to 1,040,000 tokens per request, roughly 780k words. A single answer can reach 8,192 tokens.
- Can I stream Palmyra X5's output?
- Yes — with stream=true you get SSE events as the tokens are produced. This model has no tool calling and no image input, so pick a different one if you need either.