---
title: "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."
method: GET
path: "/chat/completions/{completion_id}/messages"
tags: ["Chat"]
---

# 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`

## Path parameters

- `completion_id` string, required

## Query parameters

- `after` string
- `limit` integer
- `order` 'asc' | 'desc'

## Response `200`

A list of messages

- ChatCompletionMessageList — An object representing a list of chat completion messages.
  - `object` 'list', required — The type of this object. It is always set to "list".
  - `data` object[], required — An array of chat completion message objects.
    - `content` string, nullable, required — The contents of the message.
    - `refusal` string, nullable, required — The refusal message generated by the model.
    - `tool_calls` union[] — The tool calls generated by the model, such as function calls.
      - union
        - ChatCompletionMessageToolCall — A call to a function tool created by the model.
          - `id` string, required — The ID of the tool call.
          - `type` 'function', required — The type of the tool. Currently, only `function` is supported.
          - `function` object, required — The function that the model called.
            - `name` string, required — The name of the function to call.
            - `arguments` string, required — The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
        - ChatCompletionMessageCustomToolCall — A call to a custom tool created by the model.
          - `id` string, required — The ID of the tool call.
          - `type` 'custom', required — The type of the tool. Always `custom`.
          - `custom` object, required — The custom tool that the model called.
            - `name` string, required — The name of the custom tool to call.
            - `input` string, required — The input for the custom tool call generated by the model.
    - `annotations` object[] — Annotations for the message, when applicable, as when using the [web search tool](/docs/guides/tools-web-search?api-mode=chat).
      - `type` 'url_citation', required — The type of the URL citation. Always `url_citation`.
      - `url_citation` object, required — A URL citation when using web search.
        - `end_index` integer, required — The index of the last character of the URL citation in the message.
        - `start_index` integer, required — The index of the first character of the URL citation in the message.
        - `url` string, uri, required — The URL of the web resource.
        - `title` string, required — The title of the web resource.
    - `role` 'assistant', required — The role of the author of this message.
    - `function_call` object — Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.
      - `arguments` string, required — The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
      - `name` string, required — The name of the function to call.
    - `audio` object, nullable — If the audio output modality is requested, this object contains data about the audio response from the model. [Learn more](/docs/guides/audio).
      - `id` string, required — Unique identifier for this audio response.
      - `expires_at` integer, required — The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations.
      - `data` string, required — Base64 encoded audio bytes generated by the model, in the format specified in the request.
      - `transcript` string, required — Transcript of the audio generated by the model.
    - `id` string, required — The identifier of the chat message.
    - `content_parts` union[], nullable — If a content parts array was provided, this is an array of `text` and `image_url` parts. Otherwise, null.
      - union
        - ChatCompletionRequestMessageContentPartText — Learn about [text inputs](/docs/guides/text-generation).
          - `type` 'text', required — The type of the content part.
          - `text` string, required — The text content.
        - ChatCompletionRequestMessageContentPartImage — Learn about [image inputs](/docs/guides/vision).
          - `type` 'image_url', required — The type of the content part.
          - `image_url` object, required
            - `url` string, uri, required — Either a URL of the image or the base64 encoded image data.
            - `detail` 'auto' | 'low' | 'high' — Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision#low-or-high-fidelity-image-understanding).
  - `first_id` string, required — The identifier of the first chat message in the data array.
  - `last_id` string, required — The identifier of the last chat message in the data array.
  - `has_more` boolean, required — Indicates whether there are more chat messages available.

---

[API](https://skmtc.net/openai/apis/openai-api-3.md) · [All operations](https://skmtc.net/openai/apis/openai-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openai/openai-api-3/versions/74cbcf73838f/schema)
