## Model comparison

The following table compares the capabilities, context windows, and pricing of the Palmyra X5 and X4 models.

| Feature | Palmyra X5 | Palmyra X4 |
| --- | --- | --- |
| **Description** | General-purpose model with a 1M token context window and adaptive reasoning | Language model for complex tasks that require extended context |
| **API model ID** | `palmyra-x5` | `palmyra-x4` |
| **Bedrock model ID** | `writer.palmyra-x5-v1:0` | `writer.palmyra-x4-v1:0` |
| **Pricing (Input)** | $0.60 / 1M tokens | $2.50 / 1M tokens |
| **Pricing (Output)** | $6.00 / 1M tokens | $10.00 / 1M tokens |
| **Context window** | 1M tokens | 128k tokens |
| **Max output** | 8,192 tokens | 4,096 tokens |

All Palmyra models are available in No-code, Agent Builder, and API. To analyze images, use [vision capabilities with Palmyra X5](https://dev.writer.com/home/chat-with-images).

## Model details

### Palmyra X5

Palmyra X5 is Writer’s newest and most advanced model for building and scaling AI agents, featuring a 1 million token context window, adaptive reasoning, and industry-leading speed and cost efficiency.

**Pricing**:

- Input: $0.60 per 1M tokens
- Output: $6.00 per 1M tokens

**Content window**: 1M

Palmyra X5’s 1M token context window further streamlines enterprise workflows and unlocks complex, multi-step use cases that weren’t possible before.

### Multi-step agentic workflows

- **Support documentation**: Classify requests, assess urgency, assign a human review, stage updates in a CMS, and publish after approval.
- **Fund reporting**: Streamline the analysis and preparation of detailed reports on the performance and status of investment funds, using reporting and research data pulled in from third-party systems.
- **Content lifecycle management**: Flag content that could be outdated, generate suggested revisions, and share them for human review.

### Large data requirements

- **Customer feedback analysis**: Analyze large volumes of customer feedback to identify common themes, summarize sentiments, and generate actionable insights.
- **Research and development**: Process and summarize multiple technical reports, research papers, and experimental data, accelerating innovation and product development.
- **Financial reporting**: Process and summarize annual reports, SEC filings, and market analysis reports together at once to extract financial data, identify trends, and generate executive summaries.
- **Legal document analysis**: Analyze lengthy legal documents, including contracts, patents, and compliance reports, to identify key clauses, flag potential risks, and ensure regulatory compliance.
- **Medical records analysis**: Analyze and summarize large files of medical records containing structured and unstructured data, including patient records, clinical trial reports, audit reports, and more.

Palmyra X5 demonstrates robust performance across a suite of industry-standard benchmarks, showcasing its capabilities in reasoning, retrieval, and domain-specific tasks.

### Benchmarking

- **BBH (Big-Bench Hard)**: Palmyra X5 achieves a competitive score of 70.99%.
- **GPQA (Graduate-Level Google-Proof Q&A)**: X5’s score of 47.20% indicates strong performance in scientific reasoning tasks.
- **MMLU_PRO**: Palmyra X5 scores 65.02%, demonstrating its suitability for enterprise applications in regulated sectors.
- **MATH_HARD**: X5’s score of 71.57% showcases its proficiency in handling complex analytical tasks.

### Palmyra X4

`palmyra-x4` is an advanced language model that excels in processing and understanding complex tasks. It is ideal for workflow automation, coding tasks, and data analysis.

**Pricing**:

- Input: $2.50 per 1M tokens
- Output: $10.00 per 1M tokens

**Content window**: 128k

- **Agents & actions**: Palmyra X4 acts as an advanced AI agent, capable of executing tasks beyond simple text generation by interacting with external systems.
- **Retrieval-augmented generation (RAG)**: Equipped with RAG, Palmyra X4 can retrieve and incorporate relevant information from vast data sources.
- **Code generation**: The model supports advanced code generation, enabling it to automate scripting.
- **Tool calling**: Palmyra X4 is built to handle precise API interactions.

Palmyra X4 consistently ranks at the top in structured output, API tool calling, and accuracy for complex multi-step workflows.

### Benchmarking

- **Top accuracy (ACC)**: Palmyra X4 achieves 78.76% accuracy in tool call identification and execution.
- **Structured call planning (AST)**: Palmyra X4 scores 87.93%.
- **Execution performance (Exec)**: With an 88.27% score in executing tool calls.
- **Global benchmarks**: Palmyra X4 ranks in the world’s top 10 on HELM Lite (86.1%) and HELM MMLU (81.3%).

## Using models with the Writer API

To select the Palmyra model you want to use for a chat completion, specify the model ID in the [`model` parameter](https://dev.writer.com/api-reference/completion-api/chat-completion#body-model) of the request.

### Example in cURL

```bash
curl --location 'https://api.writer.com/v1/chat' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $WRITER_API_KEY" \
--data '{
  "model": "palmyra-x5",
  "messages": [\
    {\
      "role": "user",\
      "content": "Summarize GDPR compliance requirements for a cloud-based data storage provider"\
    }\
  ]
}'
```

### Example in Python

```python
from writerai import Writer

client = Writer()

chat_completion = client.chat.completions.create(
  model="palmyra-x5",
  messages=[\
    {\
      "role": "user",\
      "content": "Summarize GDPR compliance requirements for a cloud-based data storage provider"\
    }\
  ]
)

print(chat_completion.choices[0].message.content)
```

### Example in JavaScript

```javascript
import { Writer } from 'writer-sdk';

const client = new Writer();

const chat_completion = await client.chat.completions.create({
  model: 'palmyra-x5',
  messages: [\
    {\
      "role": "user",\
      "content": "Summarize GDPR compliance requirements for a cloud-based data storage provider"\
    }\
  ]
});

console.log(chat_completion.choices[0].message.content);
```

To select the Palmyra model you want to use for text generation, specify the model ID in the [`model` parameter](https://dev.writer.com/api-reference/completion-api/text-generation#body-model) of the request.

### Example in cURL

```bash
curl --location 'https://api.writer.com/v1/completions' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $WRITER_API_KEY" \
--data '{
  "model": "palmyra-x5",
  "prompt": "Summarize GDPR compliance requirements for a cloud-based data storage provider"
}'
```

### Example in Python

```python
from writerai import Writer

client = Writer()

text_generation = client.completions.create(
  model="palmyra-x5",
  prompt="Summarize GDPR compliance requirements for a cloud-based data storage provider"
)

print(text_generation.choices[0].text)
```

### Example in JavaScript

```javascript
import { Writer } from 'writer-sdk';

const client = new Writer();

const text_generation = await client.completions.create({
  model: 'palmyra-x5',
  prompt: 'Summarize GDPR compliance requirements for a cloud-based data storage provider'
});

console.log(text_generation.choices[0].text);
```

## Deprecation policy

### Timeline for deprecation

- We’ll announce the deprecation of a model at least three months in advance.
- We’ll continue to support deprecated models for a period of time after they’re deprecated.
- We’ll eventually stop supporting deprecated models.

### Deprecated models

| Model name | Deprecation Date |
| --- | --- |
| Palmyra X 003 Instruct | 2026-07-13 |
| Palmyra Vision | 2026-07-13 |
| Palmyra Med | 2026-07-13 |
| Palmyra Fin | 2026-07-13 |
| Palmyra Creative | 2026-07-13 |
| Palmyra Fin 32k | 2025-03-03 |
| Palmyra X 002 32k | 2024-09-06 |
| Palmyra X 32k Instruct | 2024-09-06 |
| Palmyra X 002 Instruct | 2024-09-06 |

### Migration path

- We’ll provide customers with a migration path to the new model, including detailed documentation and support to help them migrate their applications.
- We’ll also offer training and consulting services to help customers transition.
