Growth Toolkit
POST /api_growth_toolkit.php
A multi-tool endpoint that routes generation requests for Viral Hooks, Profile Bios, Smart Replies, and Email Subjects based on the provided `toolType`.
Request Body
toolType
string
Required
Must be one of:
hook, bio, reply, or email.
topic / name / message / content
string
Required
The primary input depends on the toolType selected. Pass the main subject matter here.
platform / tone / niche
string
Secondary context modifiers depending on the tool selected.
JavaScript Request (Hooks Example)
fetch('https://quantumstudioai.co.uk/api_growth_toolkit.php', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
toolType: "hook",
topic: "3 reasons diets fail.",
platform: "TikTok",
tone: "Controversial"
})
});
JSON Response
{
"status": "success",
"result": "<strong>Hook 1:</strong> Stop eating salads..."
}
Conversion X-Ray
POST /api_conversion_xray.php
Analyzes a given URL and known pain points to generate a comprehensive 4-part Conversion Rate Optimization (CRO) audit.
Request Body
url
string
Required
The target website URL you want the AI to analyze.
goal
string
The primary conversion goal (e.g., "SaaS Signups", "E-commerce Sales").
problem
string
Known pain points or friction areas the user is experiencing.
PHP (cURL) Request
$payload = json_encode([
'url' => 'https://example.com',
'goal' => 'More newsletter subs'
]);
$ch = curl_init('https://.../api_conversion_xray.php');
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
JSON Response
{
"status": "success",
"score": 62,
"result": "<h2>1. The 5-Second Test</h2>..."
}
Fetch History
GET /api_history.php
Retrieves the logged-in user's database records of past generations. Automatically limits returns to the 10 most recent items per tool.
Query Parameters
tool
string
If provided, filters the history array to only return records matching the exact tool name (e.g.,
?tool=Growth Toolkit). If omitted, returns the latest 50 global records.
GET Request
GET https://quantumstudioai.co.uk/api_history.php?tool=Growth%20Toolkit
JSON Response
{
"status": "success",
"history": [
{
"id": 14,
"prompt_used": "Viral Hooks - Diets...",
"output_text": "<strong>Hook 1:</strong>...",
"created_at": "2024-10-15 14:32:00"
}
]
}