Quick Start

First, make sure you have Cloudglue set up by following the setup guide.

Extract Structured Data

Using Cloudglue’s Extract API, transform your video content into programmable, structured data that you can easily integrate into your applications. In this guide, we’ll demonstrate a simple schema that extracts basic concepts like people, objects, and locations - but you can define any custom schema that matches your specific needs and downstream applications.

from cloudglue import CloudGlue

# Initialize client (API key will be loaded from environment)
client = CloudGlue()

# Upload your video file
uploaded = client.files.upload(
    'path/to/local/video.mp4',
    wait_until_finish=True
)

# Define the extraction schema
schema = {
    "people": ["string"],
    "objects": ["string"],
    "locations": ["string"]
}

# Start extraction using the uploaded file URI
extraction = client.extract.run(
    url=uploaded.uri,
    prompt="Extract all people, notable objects, and locations that appear in this video",
    schema=schema,
)

# Print the results
print(extraction.data)

For more details about the Python SDK, check out our Python SDK Documentation.

For more detailed examples and advanced usage, check out our API Reference.