---
title: "What is a system prompt? System vs developer messages"
description: "A system prompt is the standing instruction an app sends before user messages. How system and developer roles work, what to put in them, and how they affect cost."
url: https://broadrouter.com/glossary/system-prompt/
lang: en
updated: 2026-11-14
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# System prompt

Updated 2026-11-14

A system prompt is the instruction text an application sends to a language model ahead of the conversation, usually as a message with the system or developer role. It sets the model's role, rules, tone and output format, and the model is meant to follow it over conflicting user messages.

Also called: system message, developer message, system instructions, system role

The system prompt is the part of a request the end user never types. It tells the model who it is working for and how to behave.

## How it works

In the Chat Completions format, `messages` is a list of objects with a `role`. The first one usually carries the standing instructions:

```json
{"messages": [
  {"role": "system", "content": "You are a support agent for an airline. Answer in two sentences. Never quote fares."},
  {"role": "user", "content": "Can I change my flight?"}
]}
```

OpenAI’s API reference describes both `system` and `developer` messages as “developer-provided instructions that the model should follow, regardless of messages sent by the user”, and says developer messages replace system messages on o1 and newer models. Its text guide puts developer messages “ahead of user messages” in priority. Anthropic takes the system prompt as a separate top-level `system` parameter instead of a message, and notes that even one sentence setting a role “focuses Claude’s behavior and tone”.

Typical contents: a role, the task, hard rules, output format, and sometimes examples ([few-shot prompting](https://broadrouter.com/glossary/few-shot-prompting/)).

## Why it matters

-   **Cost.** The system prompt is resent on every call as [input tokens](https://broadrouter.com/glossary/input-and-output-tokens/). A 2,000-token prompt over 10,000 requests is 20 million tokens.
-   **Caching.** Because it is identical and first, the system prompt is the easiest prefix to cache. Put changing data, such as dates or user names, after it. The post on [prompt structure for caching](https://broadrouter.com/blog/prompt-structure-for-caching/) shows the order.
-   **Safety.** It is a policy layer, not a security boundary. [Prompt injection](https://broadrouter.com/glossary/prompt-injection/) in documents or user text can still pull the model off course.

## On BroadNet Inference

BroadNet serves the OpenAI chat-completions shape, so a system message goes in `messages` as above. The docs’ examples use a single user message and do not describe how each model handles the system or developer role; test your prompt on the model you ship.

BroadNet reports `prompt_tokens_details.cached_tokens` in `usage` and bills those tokens at the cached input price. Worked example on DeepSeek V4.1 Flash, using the 20 million tokens above: 20 × $0.175 if none is cached, or 20 × $0.0055 if every read hits the cache. Real hit rates sit between the two; check `cached_tokens` to see yours. The [curl quickstart](https://broadrouter.com/guides/curl-quickstart/) shows a first request.

## Common mistakes

-   Putting a timestamp at the top of the system prompt. It changes every call and breaks the cache.
-   Storing secrets in the system prompt. Users can often get the model to repeat it.

## Questions

### What is the difference between a system message and a developer message?

They do the same job. OpenAI says that with o1 models and newer, developer messages replace system messages. Many OpenAI-compatible servers still expect the system role, so check which one your model accepts.

### Can a user override the system prompt?

The model is trained to prefer it, but not perfectly. Prompt injection and jailbreak attempts try exactly that, so enforce hard rules in code too.

### Is the system prompt billed?

Yes. It is input tokens on every request. If it stays identical and comes first, a provider with prompt caching can bill it at the cached rate.

## See also

-   [Cached input tokens](https://broadrouter.com/glossary/cached-input-tokens/) (term)
-   [Few-shot prompting](https://broadrouter.com/glossary/few-shot-prompting/) (term)
-   [Prompt injection](https://broadrouter.com/glossary/prompt-injection/) (term)
-   [Input and output tokens](https://broadrouter.com/glossary/input-and-output-tokens/) (term)
-   [Guardrails](https://broadrouter.com/glossary/guardrails/) (term)
-   [Prompt engineering](https://broadrouter.com/glossary/prompt-engineering/) (term)
-   [Chat template](https://broadrouter.com/glossary/chat-template/) (term)
-   [Use the OpenAI Python SDK with BroadNet Inference](https://broadrouter.com/guides/openai-python-sdk/) (guide)
-   [First request to BroadNet Inference with curl](https://broadrouter.com/guides/curl-quickstart/) (guide)
-   [How to structure prompts so the prefix caches](https://broadrouter.com/blog/prompt-structure-for-caching/) (article)
-   [Arabic prompt engineering: register, RTL, numerals and mixed text](https://broadrouter.com/blog/arabic-prompt-engineering/) (article)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=glossary-system-prompt&utm_content=page-cta) ·

**Sources**

-   [OpenAI API reference, create chat completion (developer and system messages)](https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create)
-   [OpenAI, text generation guide (message roles and priority)](https://developers.openai.com/api/docs/guides/text)
-   [Anthropic, prompting best practices (roles in the system prompt)](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices)
-   [BroadNet Inference API reference, reasoning and cached tokens](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=glossary-system-prompt&utm_content=sources)
