Hailuo API SDKs for JavaScript, Python, Ruby, Go, and Java on RunAPI.
The Hailuo API SDK packages JavaScript, Python, Ruby, Go, and Java clients for Hailuo on RunAPI. Use it for text-to-video and image-to-video workflows when your app needs typed request builders, predictable task polling, file upload helpers, account helpers, and consistent RunAPI errors.
Hailuo is listed in the RunAPI model catalog at https://runapi.ai/models/hailuo. Variant pages below carry pricing, rate-limit, and commercial-usage details. The public hailuo-sdk repository groups the language packages, examples, CI, and release tags for this model.
npm install @runapi.ai/hailuo
pip install runapi-hailuo
gem install runapi-hailuo
go get github.com/runapi-ai/hailuo-sdk/go@latestGradle:
dependencies {
implementation("ai.runapi:runapi-hailuo:0.1.0")
}Maven:
<dependency>
<groupId>ai.runapi</groupId>
<artifactId>runapi-hailuo</artifactId>
<version>0.1.0</version>
</dependency>Use the Java BOM when installing multiple RunAPI Java modules:
dependencies {
implementation(platform("ai.runapi:runapi-bom:0.1.0"))
implementation("ai.runapi:runapi-hailuo")
}- Build apps, agent workflows, batch jobs, and production services around Hailuo requests.
- Install only the language package your app needs while keeping one model-specific repository for docs and releases.
- Use
createfor submit-only jobs,getfor status lookup, andrunfor submit-and-poll scripts. - Upload local files, URL files, or base64 files through shared RunAPI file helpers.
- Handle validation, authentication, rate limits, insufficient credits, task failures, and polling timeouts through RunAPI SDK errors.
import ai.runapi.hailuo.HailuoClient;
import ai.runapi.hailuo.types.TextToVideoParams;
import ai.runapi.hailuo.types.CompletedTextToVideoResponse;
import ai.runapi.hailuo.types.TextToVideoModel;
HailuoClient client = HailuoClient.builder()
.apiKey(System.getenv("RUNAPI_API_KEY"))
.build();
CompletedTextToVideoResponse result = client.textToVideo().run(
TextToVideoParams.builder()
.model(TextToVideoModel.HAILUO_02_TEXT_TO_VIDEO_PRO)
.prompt("A slow dolly shot through a quiet bamboo forest")
.durationSeconds(5)
.build()
);Java packages target Java 8 bytecode and are tested on Java 8, 11, 17, and 21. Each model artifact depends on ai.runapi:runapi-core, so application code normally installs only ai.runapi:runapi-hailuo.
Most media endpoints are asynchronous. create() submits a task and returns its id, get(id) fetches the latest task state, and run(params) creates the task and polls until it reaches a terminal state. In web request handlers, prefer create() plus webhook or later get() polling so the server does not hold a worker open.
js/publishes@runapi.ai/hailuo.python/publishesrunapi-hailuo.ruby/publishesrunapi-hailuo.go/publishesgithub.com/runapi-ai/hailuo-sdk/go.java/publishesai.runapi:runapi-hailuoand usesai.runapi:runapi-core.
- Model page: https://runapi.ai/models/hailuo
- SDK docs: https://runapi.ai/docs#sdk-hailuo
- Product docs: https://runapi.ai/docs#hailuo
- SDK repository: https://github.com/runapi-ai/hailuo-sdk
- Skill repository: https://github.com/runapi-ai/hailuo
- Provider comparison: https://runapi.ai/providers/minimax
- Full catalog: https://runapi.ai/models
Use the most specific Hailuo variant page for pricing, rate limits, and commercial usage:
- 02 text to video pro
- 02 text to video standard
- 02 image to video pro
- 02 image to video standard
- 2.3 image to video pro
- 2.3 image to video standard
Default pricing link for the Hailuo SDK: https://runapi.ai/models/hailuo/02-text-to-video-pro
RunAPI-generated file URLs are temporary. Download and store generated images, videos, audio, or other files in your own durable storage within 7 days; do not treat returned URLs as long-term assets.
Install the model package for your language: @runapi.ai/hailuo on npm, runapi-hailuo on PyPI, runapi-hailuo on RubyGems, github.com/runapi-ai/hailuo-sdk/go, or ai.runapi:runapi-hailuo. Install core SDK packages only when you are building shared SDK infrastructure.
Primary Hailuo links point to https://runapi.ai/models/hailuo. Pricing and usage-policy links point to variant pages such as https://runapi.ai/models/hailuo/02-text-to-video-pro. Provider comparisons point to https://runapi.ai/providers/minimax, and broad browsing points to https://runapi.ai/models.
Licensed under the Apache License, Version 2.0.