movoa 0.1.0
movoa: ^0.1.0 copied to clipboard
Official SDK for Movoa (movoa.ai), the AI video generator with sound. Text to video and photo to video from Dart with your Movoa API key.
movoa-dart #
Unlimited AI video generator with sound: on paid plans the tenth take of a shot costs what the first did, and your first clip is free to make right now. This is the official Dart SDK for Movoa: make text to video and photo to video clips from Dart code on your own Movoa account, and every clip comes back as AI video with audio.
import 'package:movoa/movoa.dart';
final movoa = Movoa(); // reads MOVOA_API_KEY
final clip = await movoa.generateVideo('a lighthouse in a storm, waves crashing, distant thunder');
print(clip); // URL of the finished MP4
One call submits the run, waits for it and returns the URL of the finished file.
Install #
dart pub add movoa
Works in Dart and Flutter apps. One dependency, package:http; pass your own http.Client as client: if you manage one.
API key #
Create a key at movoa.ai/settings/apikeys, then pass it as Movoa(apiKey: 'sk-...') or export it:
export MOVOA_API_KEY=sk-...
Runs cost credits on your Movoa account, at the prices on https://movoa.ai/pricing. A run made here is queued and stored like one made on the site, so it shows up in your Movoa library too.
Models and options #
The default model is minimax-h3 (6 seconds, 480p, 16:9). Sound is always on. Options go to the model as-is:
// Seedance 2.5: 10 seconds, vertical
await movoa.generateVideo('a street drummer in the rain, handheld',
model: 'seedance-2-5', options: {'duration': 10, 'aspect_ratio': '9:16'});
// MiniMax H3 at 768p
await movoa.generateVideo('a koi pond seen from above, petals falling',
options: {'duration': 8, 'resolution': '768p'});
| model | what it is | options (default) |
|---|---|---|
minimax-h3 |
MiniMax H3, the default | duration 4, 5, 6, 8, 10, 15 (6) · resolution 480p, 768p (480p) · aspect_ratio 16:9, 9:16, 1:1 (16:9) |
veo-3-1-fast |
Veo 3.1 Fast, see Veo 3 | duration 8 · resolution 720p · aspect_ratio 16:9, 9:16 (photo to video: 16:9) |
seedance-2-5 |
Seedance 2.5 | duration 5, 10, 15, 20, 25, 30 (5) · resolution 480p, 720p · aspect_ratio 16:9, 9:16, 1:1 |
seedance-2 |
Seedance 2.0 | duration 4, 6, 8, 10 (6) · resolution 480p, 720p · aspect_ratio |
seedance-2-fast |
Seedance 2.0 Fast | same as seedance-2 |
seedance-2-mini |
Seedance 2.0 Mini | same as seedance-2 |
Photo to video #
Pass a public https image URL and it becomes the first frame; the prompt then describes the motion. This is the same photo to video flow as on the site:
await movoa.generateVideo('the camera slowly orbits the statue',
imageUrl: 'https://example.com/statue.jpg');
Submit now, collect later #
final id = await movoa.submit('a fox trotting through fresh snow');
final s = await movoa.status(id); // s.status: pending | processing | success | failed | canceled
final url = s.videoUrl; // set once s.isSuccess
final left = await movoa.credits();
generateVideo checks the run every 10 seconds and waits up to 30 minutes, since a run can sit in a queue; change that with pollEvery: and timeout:. waitFor(id) waits for a run you submitted earlier. Call movoa.close() when you are done.
Errors worth catching #
Every failure is a MovoaException. Catch the subclass that says what to do next:
MovoaAuthException: no key, or the key is wrong or deleted; create one at movoa.ai/settings/apikeysMovoaRejectedException: the content filter refused the prompt, or the account is cooling down after a refusal; reword rather than retryMovoaQuotaException: not enough credits left on the account for this runMovoaPlanException: this model or quality needs a plan, or the account has not bought credits yetMovoaBusyException: another generation on this account is still running; wait for it, then submit againMovoaGenerationException: the run was accepted and then failed or was canceled; the service's error message comes with itMovoaTimeoutException: the wait ran out; the run may still finish, so look it up later by its task id
Anything else (a network failure, a 5xx) is a plain MovoaException with the service's message.
License #
MIT. Made by Movoa.