Supaklin — text cleaning API for LLMs

API Documentation

Complete reference for integrating Supaklin into your applications.

Quick Start

Installation
Install the Python SDK via pip
pip install supaklin

Basic 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/clean
Clean raw text or HTML by removing UI boilerplate

Request Headers

Header
Value
Required
x-api-key
your_api_key
Required
Content-Type
application/json
Required

Request Body

Field
Type / Description
Required
text
string
Raw text to clean. Max 100,000 characters.
Required
domain
string
Explicit domain identifier (e.g., "reddit.com").
Required

Response (200 OK)

Field
Type / Description
cleaned_text
string
The cleaned output text.
tokens_used
integer
Number of tokens consumed from your balance.

Error Responses

401
Unauthorized
Invalid or missing API key.
403
Insufficient Credits
Your credit balance is too low.
400
Bad 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']}")