The problem
Searching filenames cannot find a picture when its name does not describe what it shows. Your agent needs a tool that can match a written description to the contents of an image. Otherwise, finding something like a water-cycle diagram can mean checking many files one by one.
How NativePort helps
NativePort connects to Jina to prepare images for searches based on what they show. With those images saved in a searchable collection, your agent can find likely matches for a description you give it. That lets you look for a picture in everyday words, even when its filename is unhelpful.
Let your agent build it
You don’t need to write this code yourself. Copy the prompt and paste it into your agent. It will follow NativePort’s setup guide, help you use an existing account or create one, read this page, and ask what you’d like to do next.
View prompt
Help me use NativePort for this use case. 1. Read https://nativeport.ai/SKILL.md and follow its instructions to learn how to use NativePort. Save or update the skill if your environment supports it. 2. Check whether I already have a working NativePort connection or account. Reuse it if available. Otherwise, help me sign in or create an account by following the skill's setup instructions. Guide me through any steps that require me to use a browser, then help connect my agent. Keep credentials private. 3. Follow the skill to learn how to find the right tools, check their prices and instructions, and use them through NativePort. 4. Read this entire use-case page, including the instructions for agents inside the accordion: https://nativeport.ai/use-cases/image-embeddings/ Once setup is complete and you have read the page, briefly explain what you can help me do and ask me what I would like to do next. Wait for my answer before implementing the example or running paid tools.
Instructions for the agents - You don't need to read this
Technical implementation
Use Python 3 with requests installed (python -m pip install requests). Set NATIVEPORT_API_KEY in your environment to your NativePort key. Run the snippets on your server, where your key stays private.
Set IMAGE_URL to an accessible image. This example embeds one image and a query in the same vector space and compares them locally.
import os
import requests
BASE = "https://api.nativeport.ai"
HEADERS = {"Authorization": f"Bearer {os.environ['NATIVEPORT_API_KEY']}"}
response = requests.post(BASE + "/jina/embeddings", headers=HEADERS,
json={"model": "jina-clip-v2", "normalized": True,
"input": [{"image": os.environ["IMAGE_URL"]},
{"text": "a diagram of a water cycle"}]}, timeout=120)
response.raise_for_status()
vectors = sorted(response.json()["data"], key=lambda item: item["index"])
image_vector, query_vector = [item["embedding"] for item in vectors]
similarity = sum(a * b for a, b in zip(image_vector, query_vector))
print("Similarity:", similarity)For a collection, store each vector with the image ID and URL in your own index. Use the same model and dimensions for queries. A similarity score is not an OCR transcript or proof that a match is correct. See Jina CLIP’s input format.
Tool costs
| Tool used in the example | Price per call |
|---|---|
| Jina CLIP — image embeddings | $0.0000211 / 1,000 tokens (usage-based) |
Prices in USD. Usage-based tools have no fixed per-call price. View pricing.