APIs and setup

System prompt

A system prompt is the set of instructions an app gives a model for a whole conversation, kept apart from the user's messages: the model's role, its rules, its tone and the context it needs.

Also called System message, Developer message, Instructions

Checked November 29, 2026

At a glance

Purpose
Standing instructions for the whole conversation
Chat Completions
A system or developer message
Responses API
instructions, or a developer message
Messages API
The top-level system field
Billed as
Input tokens, on every request; cacheable when it doesn't change

OpenAI describes developer messages as instructions from the app's developer, prioritized ahead of user messages, and the instructions parameter as high-level guidance on how the model should behave, including tone, goals and examples (OpenAI). Where they go depends on the API:

  • OpenAI Chat Completions

    Where the instructions go
    A system or developer message at the start of messages
  • OpenAI Responses

    Where the instructions go
    instructions for one response; the first developer message in input for every turn
  • Anthropic Messages

    Where the instructions go
    The top-level system field

Keep it the same

A system prompt goes with every request, so it is the usual part to cache. A cache matches only text that is the same word for word, so keep dates, ids and other details that change out of its start. See prompt caching.

System prompts on /model

Each format takes its own: system and developer messages on /v1/chat/completions, instructions and developer messages on /v1/responses, the system field on /v1/messages. On /v1/messages, a cache_control on the last block of the part that repeats caches everything before it, tools and system included (Prompt caching).

Where it applies on /model

Questions

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

They do the same job: the app's instructions, ranked ahead of the user's messages. OpenAI's text-generation guide uses the developer role, while plenty of code, OpenAI's own examples among it, still sends system.

Does the system prompt count toward my tokens?

Yes. It is input, sent and billed with every request, which is why a long one is worth caching.

Sources

The makers' own pages, each opened on November 29, 2026.

One key for every model here.

Top up from $10, change one URL, and pay only for the tokens you use.