---
title: "Get messages formatted for LLMs"
method: GET
path: "/api/messages/getForLLM"
tags: ["messages"]
---

# Get messages formatted for LLMs

`GET /api/messages/getForLLM`

Get messages formatted for LLMs

## Query parameters

- `chatId` string, required — Chat ID (phone number or formatted ID)
- `last` number, required

## Response `200`

Successful response

- unknown

## Other responses

- `400` — Validation error
- `500` — Internal server error

---

[API](https://skmtc.net/open-wa/apis/open-wa-api.md) · [All operations](https://skmtc.net/open-wa/apis/open-wa-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/open-wa/open-wa-api/versions/2f344d03d2a9/schema)
