Skip to content

feat(tools): Flow2API integration — Veo 3.1 video + Gemini/Imagen image generation#183

Open
cat9999aaa wants to merge 1 commit into
calesthio:mainfrom
cat9999aaa:feat/flow2api-integration
Open

feat(tools): Flow2API integration — Veo 3.1 video + Gemini/Imagen image generation#183
cat9999aaa wants to merge 1 commit into
calesthio:mainfrom
cat9999aaa:feat/flow2api-integration

Conversation

@cat9999aaa

Copy link
Copy Markdown

What

Adds two new tools connecting OpenMontage to a local Flow2API gateway for Google AI generation:

Tool File Capabilities
flow2api_video tools/video/flow2api_video.py Veo 3.1 text-to-video, image-to-video, reference-to-video
flow2api_image tools/graphics/flow2api_image.py Gemini 3.0 Pro, Gemini 3.1 Flash, Imagen 4.0

Why

Flow2API is a self-hosted proxy that bridges to Google VideoFX/ImageFX. It provides:

  • 1000 free credits/day per Google account
  • OpenAI-compatible API (/v1/chat/completions) — no custom protocol needed
  • Access to Google's latest models (Veo 3.1, Gemini 3.x, Imagen 4.0)

These tools let OpenMontage users leverage this free quota for video and image generation without direct Google API costs.

Features

flow2api_video (381 lines)

  • Text-to-video (T2V), image-to-video (I2V), reference-to-video (R2V)
  • Quality tiers: fast, quality, ultra
  • Duration: 4s, 6s
  • Resolution: 720p, 1080p, 4k
  • Aspect ratio: 16:9 (landscape), 9:16 (portrait)
  • Native audio generation (Veo 3.1 produces synchronized audio)

flow2api_image (267 lines)

  • Models: gemini-3.0-pro-image, gemini-3.1-flash-image, imagen-4.0-generate-preview
  • Aspect ratios: landscape, portrait, square, 4:3, 3:4
  • Resolution upscaling: default, 2K, 4K
  • Base64 and URL response parsing

Setup

# .env
FLOW2API_API_KEY=your_flow2api_key
FLOW2API_BASE_URL=http://127.0.0.1:8000

Testing

Both tools were tested against a live Flow2API instance:

  • Image generation: ✅ Gemini 3.0 Pro landscape image generated successfully
  • Video generation: ✅ Veo 3.1 T2V Fast video generated (4.1MB MP4)
  • Model name resolution: ✅ 15 offline unit tests passed covering all model variants

…agen image generation

Add two new tools that connect OpenMontage to a local Flow2API gateway,
enabling Google Veo 3.1 video generation and Gemini 3.0/3.1 + Imagen 4.0
image generation through a self-hosted proxy.

Tools:
- tools/video/flow2api_video.py: Veo 3.1 T2V/I2V/R2V video generation
  supporting fast/quality/ultra tiers, 4s/6s durations, 720p/1080p/4k
- tools/graphics/flow2api_image.py: Gemini 3.0 Pro, Gemini 3.1 Flash,
  and Imagen 4.0 image generation with 5 aspect ratios and 2K/4K upscaling

Both tools use the OpenAI-compatible /v1/chat/completions endpoint and
require FLOW2API_API_KEY + FLOW2API_BASE_URL environment variables.
@cat9999aaa cat9999aaa requested a review from calesthio as a code owner June 25, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant