Skip to main content
POST
/
api
/
conversations
/
{conversation_id}
/
generate_title
{
  "title": "<string>"
}

Path Parameters

conversation_id
string<uuid>
required

Body

application/json

Payload to generate a title for a conversation.

max_length
integer
default:50

Maximum length of the generated title

Required range: 1 <= x <= 200
llm
object | null

Optional LLM to use for title generation Language model interface for OpenHands agents.

The LLM class provides a unified interface for interacting with various language models through the litellm library. It handles model configuration, API authentication, retry logic, and tool calling capabilities.

Example: >>> from openhands.sdk import LLM >>> from pydantic import SecretStr >>> llm = LLM( ... model="claude-sonnet-4-20250514", ... api_key=SecretStr("your-api-key"), ... usage_id="my-agent" ... ) >>> # Use with agent or conversation

Response

Successful Response

Response containing the generated conversation title.

title
string
required

The generated title for the conversation