> ## Documentation Index
> Fetch the complete documentation index at: https://dev.writer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Choose a model

> Compare Writer's Palmyra models with external provider models to select the best fit for your AI agents

<Warning>
  **Deprecation notice**: Palmyra X4 (`palmyra-x4`) will be deprecated on **November 18, 2026**.

  **Migration path**: Use [Palmyra X5](/home/models#palmyra-x5) (`palmyra-x5`) or [Palmyra X6](/home/models#palmyra-x6) (`palmyra-x6`) instead. Palmyra X5 and X6 have a 1M token context window (Palmyra X4 is 128k). On Amazon Bedrock, use `us.writer.palmyra-x5-v1:0`. See [pricing](/home/pricing) for cost details and the [deprecation policy](/home/models#deprecation-policy) for more information.
</Warning>

This guide helps you choose between Writer's Palmyra models and external provider models when building agents in AI Studio. Both options are available through the [Models page](https://app.writer.com/aistudio) in AI Studio.

## Palmyra models

Writer's [Palmyra models](/home/models) are pre-configured and immediately available in AI Studio. The Palmyra family includes:

| Model                                 | Best for                                                                                            | Available in                                    |
| ------------------------------------- | --------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| [Palmyra X6](/home/models#palmyra-x6) | Long-horizon agentic workflows, WRITER Agent, sub-agents, grounding, and MCP tool use               | [WRITER Agent](/home/pricing#writer-agent), API |
| [Palmyra X5](/home/models#palmyra-x5) | General-purpose tasks with advanced reasoning, including financial, medical, and creative use cases | Agent Builder, no-code, API                     |
| [Palmyra X4](/home/models#palmyra-x4) | Complex tasks requiring extended context                                                            | Agent Builder, no-code, API                     |

For detailed capabilities, context windows, and use cases, see [Palmyra models](/home/models). For pricing, see [Palmyra pricing](/home/pricing).

Palmyra X6 is the default model for [WRITER Agent](/home/pricing#writer-agent). Palmyra X6, X5, and X4 are available via API. Palmyra X5 and X4 are also available in Agent Builder and no-code apps.

## External models

You can also add models from external providers like AWS Bedrock or Microsoft Azure (Azure OpenAI) to use alongside Palmyra models. External models require credential configuration but provide access to models like Claude, Llama, Mistral, and Azure-hosted OpenAI models.

| Provider        | Status      | Setup guide                                             |
| --------------- | ----------- | ------------------------------------------------------- |
| AWS Bedrock     | Available   | [Configure AWS Bedrock](/providers/aws-bedrock)         |
| Microsoft Azure | Available   | [Configure Microsoft Azure](/providers/microsoft-azure) |
| Baseten         | Coming soon | —                                                       |

For information about adding and managing external models, see [Add external models](/home/external-models).

## Compare Palmyra and external models

Consider the following factors when selecting models for your agents:

| Consideration           | Palmyra models                                                                | External models                                                                                          |
| ----------------------- | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| **Setup**               | Pre-configured, immediately available                                         | Requires credential configuration                                                                        |
| **Optimization**        | Optimized for Writer platform                                                 | Varies by provider                                                                                       |
| **Specialized domains** | Palmyra X5 covers general-purpose, financial, medical, and creative use cases | General-purpose models                                                                                   |
| **Compliance**          | Writer-managed compliance                                                     | You manage provider compliance                                                                           |
| **Billing**             | Unified billing through Writer                                                | Provider rate card plus a 10% WRITER pass-through fee. See [Add external models](/home/external-models). |
| **Cost visibility**     | Included in Writer dashboard                                                  | Tracked in Writer + provider billing                                                                     |

### When to use Palmyra models

Palmyra models are the best choice when you need:

* **Domain-specific capabilities**: Palmyra X5 covers general-purpose, financial, medical, and creative use cases
* **Simplified billing**: All usage appears on your Writer invoice
* **Writer platform features**: Optimized integration with Knowledge Graphs and other Writer capabilities
* **Compliance simplicity**: Writer manages model compliance and security

### When to use external models

External models are the best choice when you need:

* **Existing provider agreements**: You have AWS credits or enterprise agreements with cloud providers
* **Specific model access**: You need a particular model not available through Writer (for example, Claude, Llama, or Mistral on Bedrock)
* **Provider-specific compliance**: Your organization mandates specific cloud providers for AI workloads
* **Model comparison**: You want to evaluate performance across different model providers

For information about adding and managing external models, see [Add external models](/home/external-models).

## Use models in your applications

Palmyra models are available on different Writer surfaces depending on the model:

### WRITER Agent

[WRITER Agent](https://support.writer.com/article/235-ask-writer) uses [Palmyra X6](/home/models#palmyra-x6) (`palmyra-x6`) by default.

### Agent Builder and no-code agents

In [Agent Builder](/agent-builder/overview) and [no-code chat apps](/no-code/introduction), select a model from the **Model** dropdown. Palmyra X5 and X4 appear in the list, along with any external models your team has access to. Palmyra X6 is not available in Agent Builder or no-code apps.

### API usage

Palmyra X5 and X4 are available via the API. Use the [List models](/api-reference/completion-api/list-models) endpoint to see all models available to your organization. You can then pass the model ID in any request that supports the `model` parameter.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.writer.com/v1/models \
    -H "Authorization: Bearer $WRITER_API_KEY"
  ```

  ```python Python theme={null}
  from writerai import Writer

  client = Writer()

  models = client.models.list()
  for model in models.models:
      print(model.id)
  ```

  ```javascript JavaScript theme={null}
  import Writer from "writer-sdk";

  const client = new Writer();

  const models = await client.models.list();
  models.models.forEach((model) => console.log(model.id));
  ```
</CodeGroup>

To use a model, pass its ID to any completion endpoint. External models use the same API as Palmyra models—just swap the model ID:

<CodeGroup>
  ```bash cURL theme={null}
  curl --location 'https://api.writer.com/v1/chat' \
    -H "Authorization: Bearer $WRITER_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "anthropic.claude-3-sonnet-20240229-v1:0",
      "messages": [{"role": "user", "content": "Hello!"}]
    }'
  ```

  ```python Python theme={null}
  from writerai import Writer

  client = Writer()

  response = client.chat.chat(
      model="anthropic.claude-3-sonnet-20240229-v1:0",
      messages=[{"role": "user", "content": "Hello!"}]
  )
  print(response.choices[0].message.content)
  ```

  ```javascript JavaScript theme={null}
  import Writer from "writer-sdk";

  const client = new Writer();

  const response = await client.chat.chat({
    model: "anthropic.claude-3-sonnet-20240229-v1:0",
    messages: [{ role: "user", content: "Hello!" }],
  });
  console.log(response.choices[0].message.content);
  ```
</CodeGroup>

## Next steps

* [Add external models](/home/external-models): Configure external models from providers like AWS Bedrock
* [Palmyra models](/home/models): Explore Writer's Palmyra model capabilities
