Klyra provides official client libraries for popular programming languages to make integration as seamless as possible. These SDKs handle authentication, request formatting, error handling, and more, allowing you to focus on building your application.
import { KlyraClient } from '@klyra/sdk';// Initialize the client with your API keyconst klyra = new KlyraClient('YOUR_API_KEY');async function moderateText() { try { const result = await klyra.moderateText({ content: "This is a text to moderate", settings: { categories: ["toxic", "harassment", "hate_speech"], threshold: 0.7 } }); console.log('Moderation result:', result); if (result.flagged) { console.log('Content was flagged'); } else { console.log('Content is safe'); } } catch (error) { console.error('Error moderating content:', error); }}moderateText();
from klyra import KlyraClient# Initialize the client with your API keyclient = KlyraClient("YOUR_API_KEY")try: # Moderate text content result = client.moderate_text( content="This is a text to moderate", settings={ "categories": ["toxic", "harassment", "hate_speech"], "threshold": 0.7 } ) print("Moderation result:", result) if result.flagged: print("Content was flagged") else: print("Content is safe")except Exception as e: print("Error moderating content:", e)
Our SDKs follow semantic versioning (SemVer). We maintain compatibility within major versions, so you can safely update to the latest minor or patch release without breaking changes.
All official SDKs have feature parity, meaning they support the same capabilities across languages. New API features are added to all SDKs simultaneously.