Skip to content
Last updated

Update the display name of a thread with validation and authorization checks.

POSThttps://api.aitronos.com/v1/threads/{thread_id}/generateName

Update the display name of a thread with validation and authorization checks. Provides a dedicated endpoint for thread renaming operations.

Path Parameters

thread_id string required

The unique identifier of the thread to rename.

Request Body

messages array optional

Array of message objects to use for name generation. If provided, these messages are used instead of fetching from the database. Each message has a role (string) and content (string).

stream boolean optional

Whether to stream the generated name response.

Returns

Returns a JSON response indicating success or failure.

Bash
curl -X POST "https://api.aitronos.com/v1/threads/thrd_abc123/generateName" \
  -H "X-API-Key: $FREDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {"role": "user", "content": "Hello, I need help with billing"}
    ]
  }'

Response:

{
  "id": "thrd_abc123",
  "title": "My Renamed Thread",
  "updated_at": "2025-11-17T11:00:00Z"
}