Docs menuinvideo Platform docsQuickstartFor AI agentsAPI referenceAuthenticationRequestsFilesErrorsLimitsBilling and balanceCatalogueProvider keys (BYOK)Formats and model IDsChat completionsOpenAI ResponsesAnthropic MessagesGeminiStreaming chat answersTools (function calling)Structured output (JSON)VideoAudioUse your own SDKOpenAI mediaElevenLabsReplicatefalGemini mediaxAIRunwayLumaDeepgram and CartesiaMakers' own APIsVideo provider formatsImage provider formatsAudio provider formatsLLM provider formatsGenerate and edit imagesTest your integrationWorkspaces and membersSecurityService accountsModels
View as markdown

Luma

Generate video and images through Platform with the Luma SDK and Dream Machine’s API format.

Base URL:

text
https://platform-api.invideo.io/luma
python
import os, time
from lumaai import LumaAI

client = LumaAI(auth_token=os.environ["INVIDEO_API_KEY"], base_url="https://platform-api.invideo.io/luma/dream-machine/v1")
generation = client.generations.create(prompt="A red fox running through snow", model="veo-3-fast", duration="4s")
while (generation := client.generations.get(generation.id)).state in ("queued", "dreaming"):
    time.sleep(5)
if generation.state != "completed":
    raise RuntimeError(generation.failure_reason or f"Generation ended in {generation.state}")
print(generation.assets.video)

Routes: POST /dream-machine/v1/generations (video), /generations/image, GET /dream-machine/v1/generations/{id}. keyframes.frame0 and frame1 are the first and last frame. callback_url is not supported yet.

Luma - Docs | invideo Platform