> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trellis.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Follow-ups

> Generate follow-up question suggestions based on a conversation

Get AI-generated follow-up question suggestions to help users continue their exploration.

<ParamField header="Authorization" type="string" required>
  Bearer token obtained from the authenticate endpoint.
</ParamField>

<ParamField body="chat_id" type="string">
  ID of an existing chat to generate follow-ups for. The conversation history will be used as context.
</ParamField>

<ParamField body="user_messages" type="array">
  Alternative to `chat_id`. Provide an array of user message strings directly.
</ParamField>

<Note>
  You must provide either `chat_id` or `user_messages`, but not both.
</Note>

<Note>
  This endpoint is rate-limited to **10 requests per minute** with a **5-request burst over 10 seconds**, both per JWT. Excess requests return `429` with a `Retry-After` header.
</Note>

## Response

<ResponseField name="followups" type="array" required>
  List of suggested follow-up questions.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X POST https://api.trellis.sh/v1/chats/followups \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"chat_id": "chat_abc123"}'
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import requests

  response = requests.post(
      "https://api.trellis.sh/v1/chats/followups",
      headers={
          "Authorization": "Bearer YOUR_TOKEN",
          "Content-Type": "application/json"
      },
      json={"chat_id": "chat_abc123"}
  )
  followups = response.json()["followups"]
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const response = await fetch("https://api.trellis.sh/v1/chats/followups", {
    method: "POST",
    headers: {
      Authorization: "Bearer YOUR_TOKEN",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ chat_id: "chat_abc123" }),
  });
  const { followups } = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "followups": [
      "How does this compare to the same period last year?",
      "Which product category had the highest growth?",
      "Can you break this down by region?"
    ]
  }
  ```

  ```json Empty theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "followups": []
  }
  ```

  ```json 429 Rate limited theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "detail": "Rate limit exceeded",
    "retry_after_seconds": 6
  }
  ```
</ResponseExample>
