Skip to main content
POST
/
api
/
conversations
/
{conversation_id}
/
generate_title
Generate Conversation Title
curl --request POST \
  --url https://api.example.com/api/conversations/{conversation_id}/generate_title \
  --header 'Content-Type: application/json' \
  --data '
{
  "max_length": 50,
  "llm": {
    "model": "claude-sonnet-4-20250514",
    "api_key": "<string>",
    "base_url": "<string>",
    "api_version": "<string>",
    "aws_access_key_id": "<string>",
    "aws_secret_access_key": "<string>",
    "aws_region_name": "<string>",
    "openrouter_site_url": "https://docs.all-hands.dev/",
    "openrouter_app_name": "OpenHands",
    "num_retries": 5,
    "retry_multiplier": 8,
    "retry_min_wait": 8,
    "retry_max_wait": 64,
    "timeout": 1,
    "max_message_chars": 30000,
    "temperature": 1,
    "top_p": 1,
    "top_k": 1,
    "custom_llm_provider": "<string>",
    "max_input_tokens": 2,
    "max_output_tokens": 2,
    "model_canonical_name": "<string>",
    "extra_headers": {},
    "input_cost_per_token": 1,
    "output_cost_per_token": 1,
    "ollama_base_url": "<string>",
    "stream": false,
    "drop_params": true,
    "modify_params": true,
    "disable_vision": true,
    "disable_stop_word": false,
    "caching_prompt": true,
    "log_completions": false,
    "log_completions_folder": "logs/completions",
    "custom_tokenizer": "<string>",
    "native_tool_calling": true,
    "force_string_serializer": true,
    "reasoning_effort": "high",
    "reasoning_summary": "auto",
    "enable_encrypted_reasoning": true,
    "prompt_cache_retention": "24h",
    "extended_thinking_budget": 200000,
    "seed": 123,
    "safety_settings": [
      {}
    ],
    "usage_id": "default",
    "litellm_extra_body": {},
    "OVERRIDE_ON_SERIALIZE": [
      "api_key",
      "aws_access_key_id",
      "aws_secret_access_key",
      "litellm_extra_body"
    ]
  }
}
'
{
  "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
LLM · object

Optional LLM to use for title generation

Response

Successful Response

Response containing the generated conversation title.

title
string
required

The generated title for the conversation