Skip to main content

GPTfake API

Professional REST API for accessing AI censorship monitoring data, bias metrics, and research insights.

Overview

Our API provides programmatic access to:

  • Real-time censorship metrics across AI models
  • Historical trend data and policy changes
  • Bias detection scores and analysis
  • Research publications and datasets

Quick Start

Authentication

All API requests require an API key:

curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.gptfake.com/v1/monitoring/chatgpt/metrics

Base URL

https://api.gptfake.com/v1

Core Endpoints

Monitoring Data

Get current censorship metrics for any monitored model:

GET /monitoring/{model}/metrics

Models: chatgpt, claude, gemini, mistral, qwen

Example:

curl https://api.gptfake.com/v1/monitoring/chatgpt/metrics \
-H "Authorization: Bearer YOUR_API_KEY"

Response:

{
"model": "chatgpt",
"version": "gpt-4o",
"metrics": {
"overall_refusal_rate": 18.7,
"political_refusal_rate": 34.2,
"safety_refusal_rate": 67.8,
"bias_score": -12
},
"trend": "rising",
"last_updated": "2024-11-25T00:00:00Z"
}

Historical Data

Get historical censorship trends:

GET /monitoring/{model}/history?period=30d

Parameters:

  • period: 7d, 30d, 90d, 1y
  • category: political, safety, social, all

Model Comparison

Compare metrics across models:

GET /monitoring/compare?models=chatgpt,claude,gemini

Bias Analysis

Get detailed bias analysis:

GET /bias/{model}?topics=political,social,economic

Research Endpoints

Publications

Get published research:

GET /research/publications?year=2024

Datasets

Access research datasets:

GET /research/datasets
GET /research/datasets/{dataset_id}/download

Webhooks

Get notified of significant changes:

POST /webhooks
{
"url": "https://your-app.com/webhook",
"events": ["policy_change", "censorship_spike"],
"models": ["chatgpt", "claude"]
}

Rate Limits

TierRequests/Hour
Free100
Researcher1,000
Pro10,000
EnterpriseCustom

Error Handling

{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded",
"retry_after": 3600
}
}

Error Codes

  • 400 - Bad Request
  • 401 - Unauthorized
  • 403 - Forbidden
  • 404 - Model/Resource Not Found
  • 429 - Rate Limit Exceeded

SDKs

Python

pip install gptfake-sdk
from gptfake import GPTfakeClient

client = GPTfakeClient('YOUR_API_KEY')

# Get metrics
metrics = client.get_metrics('chatgpt')
print(f"Refusal rate: {metrics.overall_refusal_rate}%")

# Get history
history = client.get_history('chatgpt', period='30d')

JavaScript

npm install @gptfake/sdk
import { GPTfakeClient } from '@gptfake/sdk';

const client = new GPTfakeClient('YOUR_API_KEY');

// Get metrics
const metrics = await client.getMetrics('chatgpt');
console.log(`Refusal rate: ${metrics.overallRefusalRate}%`);

Support

Next Steps