Appearance
Python SDK
Welcome to the Synthetic Users Python SDK documentation.
Overview
The Python SDK provides a convenient way to interact with the Synthetic Users API from your Python applications.
Features
- Simple and intuitive API
- Type hints for better IDE support
- Async/await support
- Comprehensive error handling
- Automatic retries and rate limiting
Quick Links
Common Tasks
Quick access to the most frequently used SDK methods.
🚀 Getting Started
Essential methods to begin your research:
- create_study_v1 - Create a new research study
- create_audience_v1 - Define a target audience segment
- generate_audience_v1 - Auto-generate synthetic users with AI
🔬 Running Research
Conduct interviews and gather insights:
- interview_v1 - Run interviews with synthetic users
- study_follow_up_v1 - Ask follow-up questions on studies
- interview_follow_up_v1 - Follow up on specific interviews
📊 Generating Insights
Analyze data and extract patterns:
- generate_summary_v1 - Generate AI-powered insights summary
- generate_knowledge_graph_v1 - Create visual relationship graphs
- export_summary_v1 - Export summaries to files
📄 Reports & Export
Create professional documents:
- create_report_v1 - Create standalone research reports
- generate_full_report_v1 - Generate complete report content
- get_study_pdf_v1 - Download study as PDF
📁 File Management
Upload context and monitor progress:
- create_file_v1 - Upload context documents
- upload_file_proxy_v1 - Upload file content
- stream_events_v1 - Real-time progress via SSE
Requirements
- Python 3.8 or higher
- pip package manager
Authentication
The Synthetic Users API uses Bearer token authentication (HTTPBearer). You need to provide a valid access token when making API requests.
python
import syntheticusers
configuration = syntheticusers.Configuration(
host="https://api.syntheticusers.com/api/v1",
access_token="your-access-token"
)
with syntheticusers.ApiClient(configuration) as api_client:
# Use API client
passFor more details, see the Authentication Guide.