Quick Start
Get up and running with Xybrid in minutes
Get Xybrid running in your app with a few lines of code. Choose your SDK below.
Install
# pubspec.yaml
dependencies:
xybrid_flutter: ^0.2.2flutter pub getRun inference
import 'package:xybrid_flutter/xybrid_flutter.dart';
// Runs locally as-is. Add a free key from dashboard.xybrid.dev to see
// your inference traces: Xybrid.init(apiKey: '...')
await Xybrid.init();
// Load a model and run text-to-speech
final model = await Xybrid.model('kokoro-82m').load();
final result = await model.run(
XybridEnvelope.text("Hello from Xybrid!"),
);
// result.audioBytes contains the generated speech audioExpected output: Audio bytes containing synthesized speech.
Install
Add via Swift Package Manager in Xcode:
File > Add Package Dependencies and enter:
https://github.com/xybrid-ai/xybridOr add to Package.swift:
dependencies: [
.package(url: "https://github.com/xybrid-ai/xybrid", from: "0.2.2")
]Run inference
import Xybrid
// Runs locally as-is. Add a free key from dashboard.xybrid.dev to see
// your inference traces: Xybrid.initialize(apiKey: "...")
Xybrid.initialize()
// Load a model from the registry
let loader = ModelLoader.fromRegistry(modelId: "kokoro-82m")
let model = try loader.load()
// Run text-to-speech
let envelope = Envelope.text("Hello from Xybrid!")
let result = try model.run(envelope: envelope)
// result.audioBytes contains the generated speech audioExpected output: result.success == true with audio bytes in result.audioBytes.
Install
// build.gradle.kts
dependencies {
implementation("ai.xybrid:xybrid-kotlin:0.2.2")
}Run inference
import ai.xybrid.*
// Runs locally as-is. Add a free key from dashboard.xybrid.dev to see
// your inference traces: Xybrid.init(context, apiKey = "...")
Xybrid.init(context)
// Load a model from the registry
val loader = XybridModelLoader.fromRegistry("kokoro-82m")
val model = loader.load()
// Run text-to-speech
val envelope = Envelope.text("Hello from Xybrid!")
val result = model.run(envelope)
// result.audioBytes contains the generated speech audioExpected output: result.success == true with audio bytes in result.audioBytes.
Install
In Unity, go to Window > Package Manager > + > Add package from git URL and enter:
https://github.com/xybrid-ai/xybrid.git?path=/bindings/unityOr via OpenUPM: openupm add ai.xybrid.sdk. Native libraries download automatically on first import (SHA-256 verified); pin a version by appending #v0.2.2 to the git URL.
Run inference
using Xybrid;
using UnityEngine;
// Runs locally as-is. Add a free key from dashboard.xybrid.dev to see
// your inference traces: XybridClient.Initialize(apiKey: "...")
XybridClient.Initialize();
// Load a TTS model and generate NPC dialogue
using var model = XybridClient.LoadModel("kokoro-82m");
using var result = model.Run(Envelope.Text("Welcome, traveler. The road ahead is dangerous."));
result.ThrowIfFailed();
Debug.Log($"Output: {result.Text}");
Debug.Log($"Latency: {result.LatencyMs}ms");Expected output: result.Success == true with audio output from the TTS model.
Install
# Cargo.toml
[dependencies]
xybrid = "0.2.2"Run inference
use xybrid::ModelLoader;
use xybrid::ir::{Envelope, EnvelopeKind};
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Load a model from the registry
let model = ModelLoader::from_registry("kokoro-82m").load()?;
// Run text-to-speech
let input = Envelope::new(EnvelopeKind::Text("Hello from Xybrid!".into()));
let result = model.run(&input, None)?;
// result contains the generated speech audio
Ok(())
}LLM models need the llama.cpp backend — enable it with features = ["llm-llamacpp"].
Expected output: A result envelope containing synthesized speech audio.
Install
# macOS / Linux
curl -sSL https://raw.githubusercontent.com/xybrid-ai/xybrid/master/install.sh | sh# Windows (PowerShell)
irm https://raw.githubusercontent.com/xybrid-ai/xybrid/master/install.ps1 | iexSee the CLI guide for pre-built binaries and building from source.
Run inference
# List available models
xybrid models list
# Run text-to-speech
xybrid run --model kokoro-82m --input-text "Hello from Xybrid!" --output hello.wav
# Run speech-to-text
xybrid run --model whisper-tiny --input-audio recording.wavExpected output:
Transcription: "Hello, how can I help you?"