xiaohongshu
xiaohongshu
gemini-files
Upload and manage files using Google Gemini File API via scripts/. Use for uploading images, audio, video, PDFs, and other files for use with Gemini models. Supports file upload, status checking, and file management. Triggers on "upload file", "file API", "upload image", "upload PDF", "upload vid...
Full skill instructions
Upload and manage files for use with Gemini models through executable scripts, supporting images, audio, video, PDFs, and other file types.
Use this skill when you need to:
Purpose: Upload files to Gemini File API
When to use:
Key parameters:
| Parameter | Description | Example |
|---|---|---|
path | File path (required) | image.jpg |
--name, -n | Display name | "my-document" |
--wait, -w | Wait for processing | Flag |
Output: File name, URI, and status information
python scripts/upload.py image.jpg
python scripts/upload.py document.pdf --name "Quarterly Report Q4 2026"
python scripts/upload.py video.mp4 --wait
# 1. Upload image
python scripts/upload.py photo.png --name "product-shot"
# 2. Use with gemini-text for analysis
python skills/gemini-text/scripts/generate.py "Describe this image" --image photo.png
# 1. Upload PDF
python scripts/upload.py research-paper.pdf --name "AI-Research-Paper" --wait
# 2. Extract content with gemini-text
python skills/gemini-text/scripts/generate.py "Extract key findings from this document" --image research-paper.pdf
# 1. Upload multiple files
for file in *.jpg; do
python scripts/upload.py "$file"
done
# 2. Create batch job using uploaded files (gemini-batch skill)
# 1. Upload audio
python scripts/upload.py interview.mp3 --name "interview-001" --wait
# 2. Process with gemini-text (if transcription available)
python skills/gemini-text/scripts/generate.py "Transcribe and summarize this audio" --image interview.mp3
# 1. Upload video (may take time)
python scripts/upload.py product-demo.mp4 --name "demo-video" --wait
# 2. Analyze with gemini-text
python skills/gemini-text/scripts/generate.py "Analyze this product demo video" --image product-demo.mp4
| Type | Extensions | Max Size | Processing Time |
|---|---|---|---|
| Images | jpg, jpeg, png, gif, webp | 20MB | Seconds |
| Audio | mp3, wav, aac, flac | 25MB | Seconds-minutes |
| Video | mp4, mov, avi, webm | 2GB | Minutes-hours |
| Documents | pdf, txt | 50MB | Seconds-minutes |
Script auto-detects based on extension:
| State | Description | Ready for Use |
|---|---|---|
PROCESSING | File is being analyzed | No |
ACTIVE | File is ready | Yes |
FAILED | Processing failed | No |
Uploading photo.png...
Uploaded: files/abc123...
URI: gs://generation-tmp/abc123...
State: PROCESSING
Uploading video.mp4...
Uploaded: files/xyz789...
URI: gs://generation-tmp/xyz789...
State: PROCESSING
Waiting for processing...
Still processing...
File ready!
Once uploaded, reference file by name:
# With gemini-text
python skills/gemini-text/scripts/generate.py "Analyze" --image <uploaded-file-path>
pip install google-genai
--wait flag or check status later--wait for files you'll use immediately--wait for batch uploads to save time--name for organization# Basic upload
python scripts/upload.py image.jpg
# With custom name
python scripts/upload.py document.pdf --name "My Document"
# Wait for processing
python scripts/upload.py video.mp4 --wait
# Multiple files
for file in *.jpg; do python scripts/upload.py "$file"; done
While not in scripts, you can also manage files via Python:
from google import genai
client = genai.Client()
# List all files
for file in client.files.list():
print(f"{file.name}: {file.display_name} ({file.state})")
# Get file info
file = client.files.get(name="files/abc123...")
print(f"State: {file.state}")
# Delete file
client.files.delete(name="files/abc123...")
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience