Veo 3.1 video generation via micropayments — text-to-video and image-to-video, up to 1080p, paid per call in USDC.
What it does
This endpoint generates videos using Google's Veo 3.1 model, accessed through StableStudio's pay-per-generation API. It supports text-to-video, image-to-video (first frame), frame interpolation, and style-reference modes at 720p or 1080p resolution in 16:9 or 9:16 aspect ratios, with durations of 4, 6, or 8 seconds. Pricing ranges from $1.60 to $3.20 per generation depending on resolution and duration, with typical generation times of 1–2 minutes.
Payment is handled via the MPP protocol (Tempo method on pathUSD) or x402 (USDC on Base, network eip155:8453). No API keys are needed — callers POST to the endpoint, receive a 402 payment challenge, sign a USDC authorization, and resubmit with a PAYMENT-SIGNATURE header. The response returns a jobId which is polled via GET /api/jobs/{jobId} (authenticated with SIGN-IN-WITH-X wallet signature) until the video URL is ready. A faster variant is also available at /api/generate/veo-3.1-fast/generate ($1.00–$2.00, ~30s).
The endpoint accepts optional negativePrompt, imageMode (none, first-frame, reference, interpolation), image/lastFrame URLs for image-to-video, and up to 3 referenceImages for style guidance. StableStudio also provides an MCP server via `npx -y agentcash@latest` for agent integration. The full OpenAPI spec is available at /api/openapi.json.
Capabilities
Use cases
- —Generate short video clips from text prompts for social media or marketing content
- —Animate a static image into a video using first-frame mode
- —Create smooth transitions between two keyframes using interpolation mode
- —Apply style guidance from reference images to generated video
- —Programmatic video generation from AI agents using MCP or direct API calls
Fit
Best for
- —Agents or apps needing on-demand video generation without subscriptions
- —Developers who want pay-per-call pricing with no API key management
- —Workflows requiring high-quality 1080p AI video with image conditioning
Not for
- —Real-time or sub-second video generation (takes 1–2 minutes)
- —Long-form video production (max 8 seconds per generation)
- —Users without a crypto wallet (requires USDC on Base or Tempo for payment)
Quick start
# 1. POST without payment to get 402 challenge
curl -X POST https://stablestudio.dev/api/generate/veo-3.1/generate \
-H 'Content-Type: application/json' \
-d '{"prompt": "A golden retriever running on a beach at sunset", "durationSeconds": "4", "resolution": "720p", "aspectRatio": "16:9"}'
# Returns 402 with PAYMENT-REQUIRED header
# 2. Sign USDC payment, re-POST with PAYMENT-SIGNATURE header
# 3. Poll GET /api/jobs/{jobId} with SIGN-IN-WITH-X headerExample
Request
{
"prompt": "A golden retriever running on a beach at sunset, cinematic lighting",
"imageMode": "none",
"resolution": "1080p",
"aspectRatio": "16:9",
"negativePrompt": "blurry, low quality",
"durationSeconds": "6"
}Response
{
"type": "veo-3.1",
"jobId": "abc123-def456",
"status": "pending",
"success": true
}Endpoint
Quality
Full OpenAPI schema with detailed input/output definitions, comprehensive x-guidance documentation, clear pricing, and well-documented payment flow. The endpoint returned 405 on HEAD/GET probes (expected since it's POST-only), but the OpenAPI spec and agents.txt confirm it is live. Minor deduction for no dedicated docs page and no direct 402 capture on the specific endpoint.
Warnings
- —Probe returned 405 because HEAD/GET were used on a POST-only endpoint; this does not indicate the endpoint is down
- —No dedicated documentation page exists (/docs returns 404); all docs are embedded in the OpenAPI x-guidance field
- —Requires a crypto wallet with USDC on Base (or Tempo pathUSD) — no fiat payment option documented
Citations
- —Veo 3.1 generate costs $1.60–$3.20 and takes 1–2 minuteshttps://stablestudio.dev
- —Payment is USDC on Base (eip155:8453) via x402 or MPP Tempo methodhttps://stablestudio.dev
- —Veo 3.1 supports durationSeconds 4/6/8, resolution 720p/1080p, aspectRatio 16:9/9:16, and image modes none/first-frame/reference/interpolationhttps://stablestudio.dev
- —agents.txt lists veo-3.1 at $1.60-3.20 with 1-2min generation timehttps://stablestudio.dev
- —MCP server available via npx -y agentcash@latesthttps://stablestudio.dev