Skip to main content

Install

Requires Python 3.10+. Install in your project’s virtual environment:
Save a Python example below as example.py and run python example.py.
Create an API key. Each example below is standalone: replace YOUR_API_KEY and the video source before running it.

Evaluate a local video

create() uploads the file, starts the evaluation, and waits for the result. Use this for scripts that need the answer before continuing.
Use an H.264 MP4, up to 15 seconds and 50 MiB. Omit prompt for visual-glitch detection only.

Submit a job

submit() returns an evaluation ID without waiting for the analysis to finish. Use it when your application needs to continue working while Galileo evaluates the video. This example uses a public video URL. You can also pass a local path; the SDK finishes uploading and validating the file before returning the ID.
Store job.id. You can retrieve that evaluation from another process or after a restart. In TypeScript, both create() and submit() return promises; only create() waits for the evaluation to finish.

Retrieve the result

Replace EVALUATION_ID with the ID printed above. retrieve() fetches the current status once; a queued or processing evaluation may not have a result yet.
If it is still running, retrieve the same ID later. To let the SDK wait instead, replace the retrieve() line above with:
Both wait helpers return at completed, partial, or failed. See Evaluations for status meanings, findings, and history. Keep API keys in server-side code. API keys covers environment-variable setup; the changelog lists SDK updates.