Xmax-AI/XmaxSDK-Android
Acerca de
Native Android SDK for real-time interactive video generation with Xmax AI
Diseño y multimediaWhat you can do
- Character Swapping - Replace anyone in your live feed with a designated avatar in real-time. - ▶ Play demo
- Prompt: 视频中角色替换成参考图中角色 Reference image: Select a clear image of the desired character with a clean background.
- Virtual Try-On - Seamlessly change outfits, preserving exact body shape, natural motion, and an authentic fit. - ▶ Play demo
- Prompt: 视频中人物衣服替换成参考图中衣服 Reference image: Select a clear image of the target outfit with a clean background.
Crecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
Original
We introduce XmaxSDK, a native Android SDK designed for real-time interactive video generation via Xmax models. XmaxSDK implements an end-to-end pipeline covering media acquisition, video streaming, frame-by-frame generation, and on-device rendering, enabling developers to seamlessly integrate low-latency, high-fidelity video transformations into creative applications at a much lower cost than alternative solutions.



What you can build with XmaxSDK
| Realtime Use Case | Description | Demo |
|---|---|---|
| Character Swapping | Replace anyone in your live feed with a designated avatar in real-time. |
▶ Play demo |
Prompt: 视频中角色替换成参考图中角色
Reference image: Select a clear image of the desired character with a clean background. |
||
| Virtual Try-On | Seamlessly change outfits, preserving exact body shape, natural motion, and an authentic fit. |
▶ Play demo |
Prompt: 视频中人物衣服替换成参考图中衣服
Reference image: Select a clear image of the target outfit with a clean background. |
||
| Video Restyling | Reimagine your world in any style with an immersive visual experience. |
▶ Play demo |
Prompt: 视频风格变为参考图指定的风格
Reference image: Select an image that captures the artistic style you want to apply. |
||
| AI Companions | Summon virtual characters into your live camera feed and interact with them through gestures. |
▶ Play demo |
Prompt: 指定角色在场景中互动
Reference image: Select a clear image of the virtual character you want to summon with a clean background. |
||
| Live Photo | Animate and control characters in your images simply by drawing motion trajectories. |
▶ Play demo |
Prompt: 让画面自然动起来
Reference image: Use the input image as the reference |
Why XmaxSDK?
|
Low latency |
Cost efficiency |
High fidelity |
|---|---|---|
| End-to-end latency is measured in |
Run on a |
Our models support real-time generation at up to |
Prerequisites
- Android 6.0 (API level 23) or later
- Kotlin 2.1.21 and JDK 17
- Android SDK 36, with
compileSdk36 or later in the integrating app - An Xmax API key
[!WARNING] Never commit your Xmax API key to version control. Pass it securely at runtime or use short-lived temporary keys issued by the Xmax API. For step-by-step instructions, see Authentication.
Installation
XmaxSDK is distributed through Maven Central.
Maven Central
Configure the repositories used by your application in settings.gradle.kts:
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
}
Enable AndroidX in your application's gradle.properties:
android.useAndroidX=true
Add XmaxSDK to your application module:
dependencies {
implementation("ai.xmax:xmax-sdk:1.1.5")
}
Quick Start
Use your front camera to turn yourself into a character from a reference image in real time.
import ai.xmax.sdk.*
// Initialize the client
val client = XmaxClient(applicationContext, XmaxConfiguration(
apiKey = "<YOUR_XMAX_API_KEY>",
environment = XmaxEnvironment.GLOBAL
))
// Initialize the realtime manager
val realtime = client.createRealtimeManager(
configuration = RealtimeConfiguration(model = RealtimeModel.X2_1),
)
// Create the video view
val videoView = XmaxRealtimeDualVideoView(this)
setContentView(videoView)
// Create a camera stream and bind the preview
// Obtain camera permission first
val localStream = realtime.createLocalCameraStream(
videoFormat = RealtimeCameraFormat.RESOLUTION_1080X1920,
camera = RealtimeCamera.Position(CameraPosition.FRONT),
microphone = RealtimeMicrophone.Disabled,
)
videoView.localTrack = localStream.videoTrack
// Once the preview is ready, start generation and display the result
val remoteStream = realtime.startGeneration(
localStream = localStream,
context = RealtimeContext(
prompt = "视频中角色替换成参考图中角色",
referencePath = "https://cdn.xmax.ai/images/playground/charx/charx_image1.png?v=26&presetVersion=20261022"
)
)
videoView.remoteTrack = remoteStream.videoTrack
// Run the following when generation is no longer needed
realtime.close()
Example Project
A complete example application featuring a Jetpack Compose implementation
is available in
examples/XLab.
It demonstrates real-time generation using live camera feeds, static images, and
local video files.





Dependencies
- Agora RTC SDK enables low-latency, real-time audio and video communication.
- Tencent Cloud COS SDK handles media upload and download through object storage.
Contact us
For bug reports and feature requests, please open a GitHub Issue. For integration assistance and technical support, contact us at [email protected].
License
XmaxSDK is available under the terms of the MIT License.
Explorar proyectos relacionados
Cargando…