Skip to main content
A Python client for interacting with the Thesis.io API, enabling conversations, research, and space management.

Installation

Quick Start

Initialize the Thesis client with your API key:

Basic Usage

Conversations

Create and manage Thesis.io DeFi research conversations with different research modes.

Create a New Conversation

Research Modes

  • ResearchMode.CHAT - Interactive chat mode
  • ResearchMode.DEEP_RESEARCH - Comprehensive research with citations
  • ResearchMode.FOLLOW_UP - Follow-up research on existing topics

Get Conversation Details

Join Existing Conversation (Streaming)

Spaces

Manage Thesis.io DeFi research spaces and their sections.

List Spaces

Get Space Details

Get Space Sections

Advanced Usage

Working with Events

Process Thesis.io DeFi research conversation events and extract structured data:

Environment Variables

Set your API key using environment variables:

Examples

Complete examples are available in the examples/ directory:
  • hello_world.py - Basic conversation creation
  • get_conversation.py - Retrieve and process conversation events
  • get_spaces.py - List and explore spaces
  • join_conversation.py - Join conversations with streaming

Error Handling

Data Models

The SDK uses Pydantic models for type safety and validation. Key models include:
  • ConversationCreateResponse - Response from conversation creation
  • ConversationDetailResponse - Detailed conversation information
  • SpaceListResponse - List of spaces with pagination
  • SpaceDetailResponse - Detailed space information
  • CreateNewConversationIntegrationRequest - Request to create conversations
  • JoinConversationIntegrationRequest - Request to join conversations

Requirements

  • Python 3.8+
  • httpx for async HTTP requests
  • requests for synchronous HTTP requests
  • pydantic for data validation and serialization