A chat request usually contains a model ID and an ordered list of messages. Each message has a role and content. Common roles represent application instructions, user requests, assistant replies, and tool results.
The system or developer instruction defines stable behavior such as scope, tone, and tool policy. User messages contain the current request and data. Previous assistant and user turns may be included when conversation history matters. Most APIs are stateless, so the application resends needed context on each call.
The request can also include output limits, tools, a response schema, and sampling settings. The response contains generated content plus metadata such as finish reason and token usage. Always inspect both, not just the text.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
The diagram below the answer is the concept . Jump to it ↓