Storage Objects
Zapdos stores all your uploaded files as objects in cloud storage. Each object contains the original file plus metadata and any generated content like scene thumbnails or transcriptions.
Object Structure
Section titled “Object Structure”Every storage object has:
- ID - Unique identifier for the object
- Metadata - File information (name, size, type, etc.)
- Content - Generated data (scenes, transcriptions)
- Organization - Tied to your API key/organization
{ id: "object-id-123", created_at: "2025-01-15T10:30:00Z", org_id: "your-org-id", metadata: { file_name: "video.mp4", size: 15728640, content_type: "video/mp4", kind: "video" }, content: { scenes: [...], // Generated scene data transcription: {...} // Speech-to-text results }}
Object Types
Section titled “Object Types”Zapdos handles different types of objects:
- Videos - MP4, AVI, MOV, etc. with scene analysis
- Images - JPG, PNG, etc. with visual analysis
- Scenes - Generated thumbnails from video analysis
- Other - Any file type for storage
Querying Objects
Section titled “Querying Objects”Use the query builder to find specific objects:
// Get all videosconst videos = await client.videos().fetch();
// Get large files onlyconst largeFiles = await client .from("object_storage") .select("id", "metadata", "created_at") .where("metadata->>'size'", ">", "10000000") .fetch();
// Get objects by content typeconst images = await client .from("object_storage") .select() .where("metadata->>'content_type'", "~", "^image/") .fetch();
Metadata Fields
Section titled “Metadata Fields”Common metadata fields include:
file_name
- Original filenamesize
- File size in bytescontent_type
- MIME type (video/mp4, image/jpeg, etc.)kind
- Object category (video, image, scene)parents
- Array of parent object IDs (for generated content)
Generated Content
Section titled “Generated Content”Videos automatically generate:
- Scenes - Individual moments with timestamps
- Transcriptions - Speech-to-text with timing
- Thumbnails - Visual representations of scenes
Access generated content through the content
field:
const video = await client.videos().single();if (video.data?.content) { console.log("Scenes:", video.data.content.scenes?.length); console.log("Has transcription:", !!video.data.content.transcription);}