Skip to main content
Get AI-generated follow-up question suggestions to help users continue their exploration.
Authorization
string
required
Bearer token obtained from the authenticate endpoint.
chat_id
string
ID of an existing chat to generate follow-ups for. The conversation history will be used as context.
user_messages
array
Alternative to chat_id. Provide an array of user message strings directly.
You must provide either chat_id or user_messages, but not both.
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.

Response

followups
array
required
List of suggested follow-up questions.
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"}'
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"]
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();
{
  "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?"
  ]
}
{
  "followups": []
}
{
  "detail": "Rate limit exceeded",
  "retry_after_seconds": 6
}