Before you Begin
For this quickstart tutorial, make sure you have an Archetype API key. For support with API keys, please contact [email protected].1. Setup
If you haven’t already done so, see these instructions to install the Archetype AI python client or directly run the following in your terminal:"insert_your_key" with your actual API key from Archetype AI.
2. Create and Run a Lens Session
Next, you will create a Python example that defines and runs a custom lens to analyze a pre-recorded video. A Lens defines how data flows into and out of Newton and how that data is interpreted for a given use case. Open the following code snippet in your text editor to get started:your_test_video.mp4 with the actual name of your video file. Download our sample delivery video to follow along: Delivery.mp4
3. What you should see
After running the command, you should see the description of the video stream live in your terminal. Here’s an example response from the terminal:'response': ['The video shows a FedEx Ground delivery truck parked on a residential driveway. A delivery person exits the truck carrying a package. The environment appears to be a suburban neighborhood with well-maintained lawns and a clear sky.
Lenses created via the API will appear in your Workbench where you can monitor sessions, view results, and manage your lens configurations.
Optional: Try Variations
Using the same video (or a starter video), experiment with how Lens parameters affect the output:-
Change Focus to
PeopleorVehiclesand observe the difference. -
Edit Instructions using the template below and see how behavior and output change (A prompt best practices section is coming soon):
-
Adjust Temporal Focus to
2or20to compare shorter vs. longer time windows.
Troubleshooting
If you’re getting errors in the quickstart, please ensure you have the latest version of the python client installed 25.12.15.-
To show the latest version of the python client, please use
pip show archetypeai -
To upgrade the latest version of the python client, please use
pip install --upgrade archetypeai - Request access
- Support
Learn More
Core Concepts
Learn the fundamentals of the Newton AI platform.
Lenses Overview
Understand how to build physical AI agents to interpret sensor data.
Video File Reader
Reads sensor data from a Video file.
RTSP Video Reader
Reads real-time video data from an RTSP camera.
Files
Manage your data uploads and supported file formats.
Code Examples
Try working examples to get hands-on experience with ArchetypeAI.