AI

Create an AI video generation job

Queue a cost-guarded Google Veo or xAI Grok Imagine video generation job. This can spend included or purchased AI credits. Poll /api/v1/ai/video-jobs/{id} for status and the final video_url.

post/api/v1/ai/generate-video

Request

  • Base URL: https://www.poster.ly
  • URL: https://www.poster.ly/api/v1/ai/generate-video
  • Auth: HTTP bearer

Request body

workspace_idstring

Optional. The workspace this call acts in and whose plan and credits it uses (from whoami). Needed only when the key can act in several workspaces.

provider'google' | 'xai'
promptstring required
negative_promptstring nullable
aspect_ratio'1:1' | '16:9' | '9:16' | '4:3' | '3:4' | '3:2' | '2:3'
duration_secondsinteger
resolution'480p' | '720p' | '1080p'
model'lite' | 'fast' | 'standard'

Google Veo tier. Ignored when provider is xai.

image_urlstring uri nullable
end_image_urlstring uri nullable
generate_audioboolean

Google can disable generated audio. xAI Grok includes audio and requires this to remain true.

source_video_urlstring uri nullable

Example request

{
  "prompt": "A clean 8-second product teaser for a social scheduling app, soft daylight, modern UI closeups.",
  "provider": "xai",
  "aspect_ratio": "9:16",
  "duration_seconds": 8,
  "resolution": "720p",
  "generate_audio": true
}

Response

Video generation job accepted

job_idstring required
statusstring required
messagestring
credit_costnumber required
included_credit_costnumber
purchased_credit_costnumber
current_balancenumber
purchased_balancenumber nullable
included_credits_remainingnumber

Example response

{
  "job_id": "4f4b0f3a-11c6-4ef0-b4fd-3d0e14b32701",
  "status": "pending",
  "message": "Video generation started. Poll /api/v1/ai/video-jobs/{id} for status.",
  "credit_cost": 16,
  "included_credit_cost": 8,
  "purchased_credit_cost": 8
}

Changes

No recorded changes to this operation across all 1 revision of this API.