from nomadicml import NomadicMLimport os# Initialize with your API keyclient = NomadicML(api_key=os.environ.get("NOMADICML_API_KEY"))
To get your API key, log in to the web platform, go to Profile > API Key, and generate a new key.
We recommend storing your API key in an environment variable for security.
You can provide upload with a path to a local video file or a direct URL to a video hosted elsewhere.
Copy
from nomadicml.video import AnalysisTyperesponse = client.upload('https://storage.googleapis.com/videolm-bc319.firebasestorage.app/example-videos/Oakland-to-SF-on-Bridge.mp4')result = client.analyze( response['video_id'], analysis_type=AnalysisType.RAPID_REVIEW, custom_event="Find all instances of ego vehicle straddling two lanes", custom_category="driving")print(result)
For batch uploads, cloud URLs, or rerunning analysis see Video Operations.