Quickstart Guide
This guide walks you through launching the Cosmos Embed1 NIM and generating your first text and video embeddings.
Downloading the NIM
Pull the Cosmos Embed1 NIM container from NGC:
Launch the NIM
The following Docker command will launch the NIM with default parameters for the host hardware.
Upon successful startup, the NIM will print the following to stdout:
Check the NIM Health
Invoking with cURL
To check the health of the NIM using cURL, execute the following command:
Upon a successful health check, you should receive a JSON response similar to this:
Invoking with Python
You can also check the NIM health programmatically using Python:
Submit an Embedding Request
Invoking with cURL
To submit an embedding request using cURL, send a POST request to the /v1/embeddings endpoint with your input data:
Invoking a video query with Python and base64
Invoking bulk_video request with Python
Here’s an example of submitting an embedding request using Python, specifically for a bulk_video request type. This request type exclusively accepts video URLs. The video URLs must be accessible from the NIM host system. Up to 64 video URLs can be submitted in a single request while maintaining optimal performance:
Stopping the Container
Use the following commands to stop and remove the running container:
Caching the Model
- Create a model cache directory on the host machine:
- Run the container with the cache directory as a volume mount:
This example includes --shm-size and --tmpfs flags to improve performance. Refer to the Configuring the NIM section for details on these parameters.