OpenAI Chat Messages Builder

Build and validate OpenAI chat completion messages arrays visually.

Ad placeholder (leaderboard)

OpenAI chat messages builder

The OpenAI chat completions endpoint takes a messages array where the system prompt is itself a message with the system role, usually first, followed by user and assistant turns. Typing that JSON by hand and getting the roles right is fiddly. This visual builder assembles the array, validates the common pitfalls, and exports a clean request body.

How it works

You add turns, pick a role for each from system, user, or assistant, and type the content. As you edit, the builder validates live: it confirms there is at least one user message and warns when a system message appears anywhere other than first, since that is rarely intended. When the structure looks right, it serialises a request body with a model field and the messages array, ready to copy. Nothing is sent — you call the API yourself with your own key.

Tips and notes

  • Lead with system. Put your instructions in a single system message at the top; the builder flags system messages placed later.
  • Edit the model name. The exported body uses a placeholder model; change it to whatever your key can access before sending.
  • Alternate for clarity. OpenAI tolerates non-alternating turns, but a clean user/assistant rhythm is easier to reason about and debug.
  • Pair with the Anthropic builder. If you support both providers, build each format side by side to keep your prompts in sync.
Ad placeholder (rectangle)