Get the messages in a stored chat completion. Only Chat Completions that have been created with the `store` parameter set to `true` will be returned.
GET
/chat/completions/{completion_id}/messages
curl \
--request GET 'https://api.openai.com/v1/chat/completions/{completion_id}/messages' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"object": "list",
"data": [
{
"content": "string",
"refusal": "string",
"tool_calls": [
{
"id": "string",
"type": "function",
"function": {
"name": "string",
"arguments": "string"
}
}
],
"annotations": [
{
"type": "url_citation",
"url_citation": {
"end_index": 42,
"start_index": 42,
"url": "string",
"title": "string"
}
}
],
"role": "assistant",
"function_call": {
"arguments": "string",
"name": "string"
},
"audio": {
"id": "string",
"expires_at": 42,
"data": "string",
"transcript": "string"
},
"id": "string"
}
],
"first_id": "string",
"last_id": "string",
"has_more": true
}