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

# Placeholder Messages

Placeholder Messages are a powerful feature that allows you to inject messages into a prompt template. By using the `placeholder` message role, you can define placeholders within your prompt template that can be replaced with full messages at runtime. This complements our standard [template variables](/features/prompt-registry/template-variables) feature, which allows you to insert simple values into your prompts.

This is useful to inject conversation context.

## Creating Placeholder Messages

You can create Placeholder Messages either through the PromptLayer dashboard or programmatically using the `templates.publish` method.

In the dashboard, simply create a new message with the role `placeholder` and provide the desired placeholder content.

<img src="https://mintcdn.com/promptlayer/jUVR1Bx755pIFGwB/images/placeholder.png?fit=max&auto=format&n=jUVR1Bx755pIFGwB&q=85&s=014145c927d930f0f7ea33d79427da36" alt="Placeholder Message" width="1131" height="561" data-path="images/placeholder.png" />

## Running a Template with Placeholders

Programmatically, you can include Placeholder Messages when publishing a prompt template:

```python theme={null}
promptlayer_client.run(
    prompt_name="template-name",
    input_variables={
        "fill_in_message": [
            {
                "role": "user",
                "content": [{"type": "text", "text": "My age is 29"}],
            },
            {
                "role": "assistant",
                "content": [{"type": "text", "text": "What a wonderful age!"}],
            }
        ]
    },
)
```

Passed in messages must conform to our [prompt blueprint](/running-requests/prompt-blueprints) format.
