---
title: "*[OpenAI Only]* Get the array of messages for a saved Chat Completion. Only Chat Completions that have been stored with the `store` parameter set to true will be returned."
method: GET
path: "/v1/chat/completions/{completion_id}/messages"
tags: ["router"]
---

# \*\[OpenAI Only\]\* Get the array of messages for a saved Chat Completion. Only Chat Completions that have been stored with the \`store\` parameter set to true will be returned.

`GET /v1/chat/completions/{completion_id}/messages`

## Request

- Base URL: `https://docs.sudoapp.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.sudoapp.dev/v1/chat/completions/{completion_id}/messages`
- Auth: HTTP bearer

## Path parameters

- `completion_id` string, required

## Query parameters

- `after` string
- `limit` integer
- `order` string

## Response `200`

Chat completion messages gotten successfully

- ChatMessageList
  - `data` ReturnedChatMessages[], required
    - `content` string, nullable
    - `content_parts` ContentPart[], nullable
      - union
        - object: Text content part.
          - `text` string, required
          - `type` string, required
        - object: Image content part.
          - `image_url` object, required
            - `url` string, required: Either a URL of the image or the base64 encoded image data.
            - `detail` string: Specifies the detail level of the image.
          - `type` string, required
        - object: Audio content part.
          - `input_audio` object, required
            - `data` string, required: Base64 encoded audio data.
            - `format` string, required: The format of the encoded audio data. Currently supports wav and mp3.
          - `type` string, required: The type of the content part. Always input_audio.
        - object: File content part.
          - `file` object, required
            - `file_data` string: The base64 encoded file data, used when passing the file to the model as a string.
            - `file_id` string: The ID of an uploaded file to use as input.
            - `file_name` string: The name of the file, used when passing the file to the model as a string.
          - `type` string, required: The type of the content part. Always file.
    - `id` string, required
    - `name` string, nullable
    - `role` string, required
  - `first_id` string, required
  - `has_more` boolean, required
  - `last_id` string, required
  - `object` string, required

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `500`: Internal server error
- `502`: Bad gateway error

---

[API](https://skmtc.dev/sudoapp/apis/sudo-api.md) - [All operations](https://skmtc.dev/sudoapp/apis/sudo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sudoapp/apis/sudo-api/revisions/7d59684bf816?raw)
