Guides
SDKs
30+ language clients — hand-crafted for the major platforms, auto-generated for the rest.
AskAIs Customer Service takes a protocol-first approach: one OpenAPI 3.1 spec, one WebSocket protocol, and clients in any language that wants them.
Tier 1 — Hand-crafted SDKs
Maintained by us, idiomatic per platform, full UI components where applicable:
- Web —
@singlink/web-widget(vanilla JS bundle, drop-in script tag, ~30 kB gzip) - iOS — Swift Package, native UIKit + SwiftUI components (roadmap)
- Android — Kotlin lib + Jetpack Compose components (roadmap)
- Flutter — pub.dev package (roadmap)
- React Native — npm package (roadmap)
Tier 2 — Auto-generated SDKs
12 languages produced by openapi-generator from our spec — regenerated on every API change:
- Python · Go · Rust · Java · C# / .NET / Unity · PHP
- Ruby · Dart · Kotlin · Swift (server-side) · TypeScript · C++ (Unreal)
Regenerate locally:
# from repo root, with web app running
pnpm sdks:generate
# subset
./scripts/generate-sdks.sh python go rustTier 3 — Protocol docs
For Lua / Perl / Crystal / Elixir / Haskell or anything we don't pre-build, follow the spec directly:
- OpenAPI:
GET /api/v1/openapi.json - WebSocket: see Web widget docs for event JSON
Quick examples
Python
from singlink_sdk import ApiClient, AuthApi, MessagesApi
from singlink_sdk.models import IdentifyRequest, SendMessageRequest
client = ApiClient()
auth = AuthApi(client)
identity = auth.identify(
IdentifyRequest(
app_id="ws_abc123",
external_id="user_42",
email="ada@example.com",
)
)
client.set_default_header("Authorization", f"Bearer {identity.token}")
msgs = MessagesApi(client)
conv = msgs.create_conversation()
msgs.send_message(
conv.id,
SendMessageRequest(content="Hi from Python!")
)Go
import (
"context"
singlink "github.com/singlink/singlink-go"
)
cfg := singlink.NewConfiguration()
api := singlink.NewAPIClient(cfg)
resp, _, _ := api.AuthApi.Identify(context.Background()).
IdentifyRequest(singlink.IdentifyRequest{
AppId: "ws_abc123",
Email: singlink.PtrString("ada@example.com"),
}).Execute()
cfg.AddDefaultHeader("Authorization", "Bearer "+resp.Token)Rust
use singlink_sdk::apis::{auth_api, configuration::Configuration};
use singlink_sdk::models::IdentifyRequest;
let mut cfg = Configuration::new();
let identity = auth_api::identify(&cfg, IdentifyRequest {
app_id: "ws_abc123".into(),
email: Some("ada@example.com".into()),
..Default::default()
}).await?;
cfg.bearer_access_token = Some(identity.token);C# / Unity
using SingChat.Sdk.Api;
using SingChat.Sdk.Client;
using SingChat.Sdk.Model;
var cfg = new Configuration();
var auth = new AuthApi(cfg);
var identity = await auth.IdentifyAsync(new IdentifyRequest(
appId: "ws_abc123",
email: "ada@example.com"
));
cfg.DefaultHeaders.Add("Authorization", $"Bearer {identity.Token}");Raw curl
# identify (no library at all)
curl https://cs.askais.com/api/v1/auth/identify \
-H "Content-Type: application/json" \
-d '{ "appId": "ws_abc123", "email": "ada@example.com" }'