Skip to content

Analyze images and video files

Choose image analysis for a single JPEG or PNG. Choose a file-backed stream for a video file available to a processing node. Each path requires its corresponding licensed capabilities.

  1. Prepare an image object with mediaType set to image/jpeg or image/png and the image bytes encoded as dataBase64.
  2. Add the requested naturalLanguageQueries, reference image, or face-recognition options using the schema for Create image analysis.
  3. Submit the JSON request. Store the returned analysis resource ID.
  4. Read Get image analysis to inspect its state and results.

For example, create an image request locally with Python. Keep example.jpg within the operation’s supported size limits.

Terminal window
python3 - <<'JSON' > image-analysis.json
import base64, json
from pathlib import Path
print(json.dumps({"image": {
"mediaType": "image/jpeg",
"dataBase64": base64.b64encode(Path("example.jpg").read_bytes()).decode("ascii")
}}))
JSON
curl --fail-with-body --silent --show-error \
--header "Authorization: Bearer ${EOI_SERVICE_TOKEN}" \
--header "Content-Type: application/json" \
--data-binary @image-analysis.json \
"${EOI_API_BASE_URL}/image-analyses"
  1. Use the video-file operations to list available source nodes and files.
  2. Probe the selected relative file path. Keep the returned fingerprint together with the node ID and relative path.
  3. Create a stream with the matching fileSource object. Re-probe if the server reports that the file changed.
  4. Configure the scene and send a stream start command.
  5. Inspect the stream’s runtime state and file progress fields. A completed file reports its completion state and source progress.

Use rerun only when you intend to process the file again. Follow Connect and manage cameras for stream command handling and teardown.

Image preview