API Documentation

Integrate the Viral Loop Sequencer into your own tools, CRM, or automation workflows (like Zapier & Make.com) using our REST API.

Authentication

All API requests require an active API key. You can generate one from your Dashboard. Pass this key in the Authorization header as a Bearer token.

Authorization: Bearer vl_live_YOUR_API_KEY

Generate Content Endpoint

POSThttps://viral.nengi.online/api/v1/generate

Request Body (JSON)

ParameterTypeRequiredDescription
textstringYesThe source content you want to make viral. (Min: 20 chars, Max: 50,000 chars)

Integration Examples

PowerShell (Windows)
$headers = @{
    "Authorization" = "Bearer YOUR_API_KEY"
    "Content-Type" = "application/json"
}
$body = '{"text": "A new Stanford study reveals that hybrid work models increased employee retention by 35% compared to full office mandates."}'

Invoke-RestMethod -Uri "https://viral.nengi.online/api/v1/generate" `
    -Method Post -Headers $headers -Body $body
cURL (Mac/Linux)
curl -X POST https://viral.nengi.online/api/v1/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "A new Stanford study reveals that hybrid work models increased employee retention by 35% compared to full office mandates."}'
Node.js (Fetch)
const response = await fetch("https://viral.nengi.online/api/v1/generate", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    text: "A new Stanford study reveals that hybrid work models increased employee retention by 35% compared to full office mandates."
  })
});

const data = await response.json();
console.log(data);
Python (requests)
import requests

url = "https://viral.nengi.online/api/v1/generate"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}
data = {
    "text": "A new Stanford study reveals that hybrid work models increased employee retention by 35% compared to full office mandates."
}

response = requests.post(url, headers=headers, json=data)
print(response.json())

Response Format

The API responds with a JSON object containing a success boolean and an array of hooks.

{
  "success": true,
  "hooks": [
    {
      "id": 1,
      "summary": "Mandatory Office Return Is Backfiring",
      "angle": "Controversy / Counter-Intuitive",
      "snippets": [
        {
          "platform": "x",
          "content": "1/4 Companies forcing full return-to-office are losing their best talent..."
        },
        {
          "platform": "linkedin",
          "content": "Stanford surveyed 12,000 knowledge workers. The retention data is clear..."
        },
        {
          "platform": "tiktok",
          "content": "[HOOK] Your company's return-to-office mandate is costing them millions..."
        }
      ]
    },
    // ... 2 more hooks (Data-Driven & Story-Driven)
  ]
}