Getting Started
Welcome to the Abena AI SDK documentation. This is your guide to integrating our powerful, cross-platform tools into your applications. We've designed our SDK to be intuitive for developers while providing robust features.
React Native
Install our package via npm to get started with React Native.
import { AbenaSDK, useAbena } from '@abenasdk/react-native';
const App = () => {
const { isReady } = useAbena({ apiKey: 'YOUR_API_KEY' });
if (!isReady) return ;
return Abena SDK is Ready! ;
};
Swift (iOS)
Add the SDK to your iOS project using the Swift Package Manager.
import AbenaSDK
import SwiftUI
@main
struct YourApp: App {
init() {
AbenaSDK.configure(withAPIKey: "YOUR_API_KEY")
}
var body: some Scene { WindowGroup { ContentView() } }
}
Kotlin (Android)
For native Android, integrate our SDK using Gradle and initialize it in your main application class.
import com.abena.sdk.AbenaSDK
import com.abena.sdk.AbenaConfig
class MainApplication : Application() {
override fun onCreate() {
super.onCreate()
val config = AbenaConfig.Builder("YOUR_API_KEY").build()
AbenaSDK.initialize(this, config)
}
}
Python
For backend services, install the SDK using pip.
import abena_sdk
import asyncio
abena_sdk.api_key = "YOUR_API_KEY"
async def main():
try:
user = await abena_sdk.User.retrieve("user-id-123")
print(f"Retrieved user: {user.name}")
except abena_sdk.error.APIError as e:
print(f"An API error occurred: {e}")
asyncio.run(main())
Node.js
Use our official Node.js library for your backend services.
const abena = require('abena-sdk')('YOUR_API_KEY');
async function trackEvent() {
try {
await abena.events.track('server.startup', { region: 'us-east-1' });
console.log('Startup event tracked.');
} catch (error) {
console.error('SDK Error:', error.message);
}
}
trackEvent();
Go
The Go SDK is perfect for high-performance, concurrent systems.
package main
import (
"fmt"
"log"
"github.com/abena-ai/abena-go"
)
func main() {
client := abena.NewClient("YOUR_API_KEY")
params := &abena.TrackEventParams{ Name: "file_uploaded" }
_, err := client.Events.Track(params)
if err != nil {
log.Fatalf("Failed to track event: %v", err)
}
fmt.Println("Event tracked successfully.")
}