Grok-powered text-to-video and image-to-video generation via micropayments, $0.15–$0.75 per clip.
What it does
This endpoint generates videos using xAI's Grok Video model through StableStudio's pay-per-generation platform. It supports both text-to-video (prompt only) and image-to-video (pass an optional `image` URL) in a single endpoint. Videos can be 3–15 seconds long at 480p or 720p resolution, with seven aspect ratio options including 16:9, 9:16, and 1:1.
Payment is handled via the MPP protocol (Tempo method, pathUSD on Tempo L2) 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/pathUSD authorization, then resubmit with a `PAYMENT-SIGNATURE` header. The response returns a `jobId` with status "pending". Callers then poll `GET /api/jobs/{jobId}` (authenticated via `SIGN-IN-WITH-X` wallet signature) until the job completes, at which point the response includes `videoUrl` and `thumbnailUrl`. Typical generation time is approximately 17 seconds.
Pricing is dynamic, ranging from $0.15 to $0.75 per generation depending on duration and resolution. For image-to-video, images must first be uploaded via the `/api/upload` flow ($0.01) to obtain a blob URL. The endpoint is part of StableStudio's broader suite that also offers image generation (Nano Banana Pro, GPT Image 1.5, Flux 2 Pro, Grok Image) and other video models (Seedance, Wan 2.6, Sora 2, Veo 3.1). An MCP server is available via `npx -y agentcash@latest`.
Capabilities
Use cases
- —Generate short video clips from text prompts for social media content
- —Animate a still image into a video clip using image-to-video mode
- —Create vertical (9:16) video content for mobile platforms
- —Produce quick video prototypes or storyboard animations
- —Agent-driven automated video content pipelines with crypto micropayments
Fit
Best for
- —Agents or apps needing on-demand short video generation without subscriptions
- —Developers who want crypto-native pay-per-call video APIs
- —Quick text-to-video or image-to-video clips up to 15 seconds at 720p
Not for
- —Long-form video generation (max 15 seconds)
- —High-resolution video above 720p (use Veo 3.1 or Wan 2.6 for 1080p)
- —Users without a crypto wallet (requires USDC on Base or pathUSD on Tempo)
Quick start
# 1. POST without payment to get 402 challenge
curl -X POST https://stablestudio.dev/api/generate/grok-video/generate \
-H 'Content-Type: application/json' \
-d '{"prompt": "A cat surfing on ocean waves at sunset", "duration": "6", "resolution": "720p", "aspect_ratio": "16:9"}'
# Returns 402 with PAYMENT-REQUIRED header (base64 JSON)
# 2. Decode challenge, sign USDC payment, re-POST with PAYMENT-SIGNATURE header
# 3. Poll GET /api/jobs/{jobId} with SIGN-IN-WITH-X header until completeExample
Request
{
"prompt": "A cat surfing on ocean waves at sunset, cinematic lighting",
"duration": "6",
"resolution": "720p",
"aspect_ratio": "16:9"
}Response
{
"type": "grok-video",
"jobId": "abc123-def456",
"status": "pending",
"success": true
}Endpoint
Quality
Full OpenAPI schema with detailed input/output definitions, clear pricing ($0.15–$0.75), documented payment flow, and comprehensive guidance. The probe returned 405 (not 402) because grok-video only accepts POST, but the endpoint is clearly live based on the full OpenAPI spec and platform context. No direct crawl docs page exists (404), but the OpenAPI x-guidance is thorough.
Warnings
- —Probe returned 405 on HEAD/GET because this endpoint only accepts POST — it is not broken, just method-restricted
- —No dedicated documentation page found (stablestudio.dev/docs returns 404); all docs are in the OpenAPI spec
- —Requires a crypto wallet (Base USDC or Tempo pathUSD) — no fiat payment option documented
Citations
- —Grok-video generate costs $0.15–$0.75 with ~17s generation timehttps://stablestudio.dev/api/openapi.json
- —Supports durations of 3, 6, 9, 12, 15 seconds at 480p or 720phttps://stablestudio.dev/api/openapi.json
- —Payment via USDC on Base (eip155:8453) or Tempo method with pathUSDhttps://stablestudio.dev/api/openapi.json
- —MCP server available via npx -y agentcash@latesthttps://stablestudio.dev/agents.txt
- —Job polling at GET /api/jobs/{jobId} with SIGN-IN-WITH-X header, videos return videoUrl and thumbnailUrlhttps://stablestudio.dev/api/openapi.json