Skip to content

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.

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
}
}

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

Use the query builder to find specific objects:

// Get all videos
const videos = await client.videos().fetch();
// Get large files only
const largeFiles = await client
.from("object_storage")
.select("id", "metadata", "created_at")
.where("metadata->>'size'", ">", "10000000")
.fetch();
// Get objects by content type
const images = await client
.from("object_storage")
.select()
.where("metadata->>'content_type'", "~", "^image/")
.fetch();

Common metadata fields include:

  • file_name - Original filename
  • size - File size in bytes
  • content_type - MIME type (video/mp4, image/jpeg, etc.)
  • kind - Object category (video, image, scene)
  • parents - Array of parent object IDs (for 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);
}