Skip to content
Letta Platform Letta Platform Letta Docs
Sign up

Cancel Conversation

conversations.cancel(strconversation_id) -> ConversationCancelResponse
post/v1/conversations/{conversation_id}/cancel

Cancel runs associated with a conversation.

Note: To cancel active runs, Redis is required.

ParametersExpand Collapse
conversation_id: str

The conversation identifier. Either the special value 'default' or an ID in the format 'conv-'

minLength1
maxLength41
ReturnsExpand Collapse
Dict[str, object]
Cancel Conversation
import os
from letta_client import Letta

client = Letta(
    api_key=os.environ.get("LETTA_API_KEY"),  # This is the default and can be omitted
)
response = client.conversations.cancel(
    "default",
)
print(response)
{
  "foo": "bar"
}
Returns Examples
{
  "foo": "bar"
}