Get a list of threads within your project.
Before using the Threads API, make sure you have set up the REST API integration. Threads are a fundamental component of the Langtail API, designed to manage and maintain the state of conversations with AI assistants. Here’s how the Threads API works:Documentation Index
Fetch the complete documentation index at: https://langtail.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
limit parameter allows you to specify the maximum number of threads to return in a single request. The default and maximum value is 100.
after parameter is used as a cursor for pagination. It should be set to any thread ID from which you want to retrieve the next set of results.
after parameter set to the ID of the last thread in the current response.
has_more parameter, which indicates whether there are more results available.
Your Langtail API Key
"<LANGTAIL_API_KEY>"
The maximum number of threads to return. Default is 100.
A cursor for use in pagination. 'after' is a thread ID that defines your place in the list. For instance, if you make a list request and receive 100 threads, ending with thread 'xyz', your subsequent call can include after='xyz' in order to fetch the next page of the list. Pagination works the same as in the OpenAI API https://platform.openai.com/docs/api-reference/assistants/listAssistants.
Successful response
list Whether there are more threads available after this batch.
The ID of the first thread in the list, or null if the list is empty.
The ID of the last thread in the list, or null if the list is empty.