Generate a video
POST
https://api.vidmoat.com/v1/ai/videosStart a generated clip with Grok, Alibaba HappyHorse or Wan 3.0. Returns a job to poll. Paid Studio only; trials and full-waiver promotions are excluded.
Body#
promptstringrequiredUp to 800 characters.durationSecintegerdefault5Whole seconds, from the provider's minimum (Grok 1, Wan 2, HappyHorse 3) to 15.providerenumdefaultgrokqwenis Alibaba HappyHorse 1.1. Auto picks the cheapest compatible route (and is the default when you ask for 1080p without a provider).One ofgrok,qwen,wan,autoresolutionenumdefault720pGrok does not do 1080p.One of480p,720p,1080paspectRatiostringdefault16:916:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 9:21 or 21:9 (Wan: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9).referenceUrlsarray of stringsUp to 7 reference images for consistency: your uploads or public HTTPS images. Grok with references is limited to 720p. Not withimageUrl.imageUrlstringA starting frame. Not withreferenceUrls.withAudiobooleandefaultfalseGenerate audio where the provider supports it (not HappyHorse).projectIdstringProject to attach the job to.maxCreditsnumberNever spend more than this.quoteOnlybooleantruereturns the route and price without starting a job.
Response#
Returns 202.
Response fields#
idstringThe job id. Poll it with Get a generation job.statusstringPROCESSING.durationSecintegerSeconds billed.creditsobject{ charged, remaining, basis }.pollstringThe path to poll.
Errors#
Besides the errors any request can get (authentication, rate limits):
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | No prompt, or a refused reference. |
| 402 | plan_required | The plan has no video generation. |
| 402 | insufficient_credits | Not enough credits, or the account is on a trial or a full-waiver promotion. |
| 402 | quota_exceeded | A video job is already running on the account. |
| 422 | prompt_rejected | The prompt failed the safety check. Nothing was charged. field names the field. |
| 502 | provider_error | The generation provider failed. The charge is refunded. |