Tutorials
Step-by-step tutorials for working with GPTfake AI censorship monitoring data. Each one builds on our methodology and the live data behind it — for example, the ChatGPT refusal data these examples query.
Getting started
Your first API call
What you’ll learn
- Setting up API authentication
- Making basic requests
- Understanding the response format
- Handling common errors
Duration: 15 minutes
from gptfake import GPTfakeClient
client = GPTfakeClient(api_key="your-api-key")
# Get current metrics for ChatGPT
metrics = client.monitoring.get_metrics("chatgpt")
print(f"Censorship Rate: {metrics.censorship_rate}%")Understanding the data
What you’ll learn
- Censorship rate metrics
- Bias score interpretation
- Transparency scoring
- Historical trends
Duration: 20 minutes
New to the metrics? Read What is AI censorship and the bias detection pillar first.
Data analysis
Comparing AI models
What you’ll build
- Cross-model comparison
- Bias pattern visualization
- Trend analysis charts
Technologies: Python with pandas, Matplotlib, the GPTfake Python SDK.
import pandas as pd
from gptfake import GPTfakeClient
client = GPTfakeClient(api_key="your-api-key")
# Get comparison data
models = ["chatgpt", "claude", "gemini", "mistral", "qwen"]
comparison = client.monitoring.compare_models(models)
# Convert to DataFrame
df = pd.DataFrame(comparison)
print(df[["model", "censorship_rate", "bias_score"]])For the human-readable version of these head-to-heads, see the Compare pages.
Historical trend analysis
What you’ll build
- Time-series analysis
- Policy-change detection
- Trend visualization
Duration: 45 minutes
# Get 30-day history
history = client.monitoring.get_history("chatgpt", days=30)
# Plot censorship rate over time
import matplotlib.pyplot as plt
dates = [h.date for h in history]
rates = [h.censorship_rate for h in history]
plt.plot(dates, rates)
plt.title("ChatGPT Censorship Rate (30 days)")
plt.xlabel("Date")
plt.ylabel("Censorship Rate (%)")
plt.show()Regional variation analysis
What you’ll build
- Geographic analysis
- Regional comparison charts
- Variation detection
Duration: 30 minutes
Research
Building a research dataset
What you’ll build
- Custom dataset export
- Data filtering and cleaning
- Statistical analysis
- Academic citation format
Duration: 60 minutes
See the open datasets for ready-made exports and licensing.
Bias detection methodology
What you’ll learn
- How bias scores are calculated
- Validating bias detection
- Cross-referencing findings
- Reporting methodology
Duration: 45 minutes
Pair this with the step-by-step How to detect AI bias guide.
Integration
Web dashboard integration
What you’ll build
- Real-time dashboard
- Interactive charts
- Auto-updating metrics
- Comparison views
Technologies: React.js, Chart.js, the GPTfake JavaScript SDK.
Duration: 90 minutes
Webhook alerts setup
What you’ll build
- Policy-change alerts
- Custom notification rules
- Integration with Slack/Discord
- Email notifications
Duration: 30 minutes
# Set up a webhook for policy changes
client.alerts.create_webhook(
url="https://your-server.com/webhook",
events=["policy_change", "censorship_spike"],
models=["chatgpt", "claude"]
)CLI tool usage
What you’ll learn
- Installing the CLI
- Basic commands
- Export functionality
- Scripting automation
# Install the CLI
pip install gptfake-cli
# Get current metrics
gptfake metrics chatgpt
# Compare models
gptfake compare chatgpt claude gemini
# Export data
gptfake export --format csv --days 30 --output data.csvAdvanced
Custom analysis pipeline
What you’ll build
- Automated data collection
- Custom analysis scripts
- Reporting automation
- Scheduled exports
Duration: 120 minutes
Machine learning on censorship data
What you’ll build
- Feature engineering
- Pattern classification
- Prediction models
- Model evaluation
Duration: 150 minutes
Prerequisites
Basic tutorials: basic programming knowledge, understanding of APIs, familiarity with JSON.
Intermediate tutorials: Python or JavaScript experience, data-analysis basics, understanding of statistics.
Advanced tutorials: advanced programming skills, machine-learning basics, research-methodology knowledge.
Getting help
- SDKs — Python & JavaScript libraries
- API reference — API documentation
- GitHub — github.com/gptfake
- Email — [email protected]
Ready to start? Choose a tutorial and begin analyzing AI censorship data.