AI & LLM
OpenAI Chat Completion Response JSON Example
A complete JSON example of an OpenAI Chat Completions API response — includes choices, message content, finish_reason, and token usage. Copy-ready for building LLM apps and parsing model output.
Field Reference
idrequiredstringUnique identifier for the completion, prefixed with chatcmpl-objectrequiredstringObject type — always 'chat.completion' for non-streamed responsescreatedrequiredintegerUnix timestamp (seconds) of when the completion was createdmodelrequiredstringThe exact model snapshot that produced the responsechoicesrequiredarray<object>List of completion choices; usually one unless n > 1 was requestedchoices[].message.contentrequiredstringThe assistant's generated text. May be null when a tool call is returned insteadchoices[].finish_reasonrequiredstringWhy generation stopped: stop, length, tool_calls, or content_filterusagerequiredobjectToken accounting for the request and response — used for billingVariants
Request bodyThe chat request you POST to /v1/chat/completions.
Streaming chunk (SSE delta)A single chunk emitted when stream: true. Each chunk carries a partial delta.
Common Use Cases
- →Parsing assistant replies when integrating the OpenAI API into an app
- →Logging token usage per request for cost tracking and rate limiting
- →Mocking LLM responses in tests without calling the live API
openaillmchatgptchat completiongpt-4ai api
Validate or format this JSON
One click loads this exact example into the tool — no copy-paste needed. Format it, validate it, explore the tree, or generate TypeScript types instantly.
Frequently Asked Questions
Related JSON Examples
AI & LLMAnthropic Claude Messages ResponseClaude Messages API response with content blocks, stop_reason, and token usage.AI & LLMLLM Tool / Function CallFunction-calling JSON: a tool definition plus the model's tool_call with arguments.AI & LLMChat Conversation HistoryOrdered messages array with system, user, and assistant roles for LLM chats.