API Documentation
Complete reference for integrating Supaklin into your applications.
Quick Start
Installation
Install the Python SDK via pip
pip install supaklinBasic Usage
from supaklin import Supaklin
client = Supaklin(api_key="sk_live_your_api_key")
# Clean text
result = client.clean(
text="Your raw text content here",
domain="example.com"
)
print(result["cleaned_text"])API Reference
POST
/api/v1/cleanClean raw text or HTML by removing UI boilerplate
Request Headers
Header
Value
Required
x-api-keyyour_api_key
RequiredContent-Typeapplication/json
RequiredRequest Body
Field
Type / Description
Required
textstring
Raw text to clean. Max 100,000 characters.
domainstring
Explicit domain identifier (e.g., "reddit.com").
Response (200 OK)
Field
Type / Description
cleaned_textstring
The cleaned output text.
tokens_usedinteger
Number of tokens consumed from your balance.
Error Responses
401Unauthorized
Invalid or missing API key.
403Insufficient Credits
Your credit balance is too low.
400Bad Request
Missing required fields or validation error.
Code Examples
Python SDK
Recommended for Python applications
from supaklin import Supaklin
# Initialize client
client = Supaklin(api_key="sk_live_your_api_key")
# Clean text
result = client.clean(
text="Header Menu Home About Contact Main Content Article Text Footer Copyright 2024",
domain="example.com"
)
print(f"Cleaned: {result['cleaned_text']}")
print(f"Tokens: {result['tokens_used']}")