{"openapi":"3.1.0","info":{"title":"StableStudio","description":"Pay-per-generation AI image and video creation. No subscriptions ever.","version":"1.0.0","x-guidance":"# StableStudio API\n\n> AI image/video generation via micropayments. USDC on Base, Solana, or Tempo. No API keys.\n\nBase URL: `https://stablestudio.dev`\n\n## Recommended Defaults\n\n- **Image generation:** `gpt-image-2` — Best default quality. Use it for most image tasks unless the user prioritizes speed or explicitly requests another model.\n- **Fast image generation:** `nano-banana-pro` — Use when speed matters or the user wants a faster draft; supports up to 4K resolution.\n- **Image to SVG conversion:** `arrow-1.1` — Use `/api/generate/arrow-1.1/vectorize` when the user wants to convert an existing image into an SVG.\n- **Video generation:** `veo-3.1` — Best quality/cost ratio, supports up to 1080p resolution\n\n## Payment Flow\n\nGeneration endpoints are high-intent paid calls. The unpaid 402 challenge may include `checkout_session` metadata with the selected model, operation, prompt/media summary, price, preview image, and a completion handler for the same paid endpoint. Payment terms remain authoritative in the x402/MPP challenge headers; legacy clients can keep using the normal paid POST and retry flow.\n\n1. `POST /api/generate/{model}/{operation}` without payment header\n   - Returns `402` with `PAYMENT-REQUIRED` header (base64 JSON)\n   - Response JSON may include `checkout_session` for high-intent review UI. Treat it as display/flow metadata, not payment authority.\n\n2. Decode requirements, sign USDC authorization, POST with `PAYMENT-SIGNATURE` header\n   - Returns `200` with `{jobId, status:\"pending\"}` and `PAYMENT-RESPONSE` header\n\n3. Poll `GET /api/jobs/{jobId}` with `SIGN-IN-WITH-X` header until complete\n\n## 402 Response Format\n\nPayment requirements are in the header:\n\n```\nPAYMENT-REQUIRED: <base64>\n```\n\nDecoded:\n\n```json\n{\n  \"x402Version\": 2,\n  \"accepts\": [\n    {\n      \"scheme\": \"exact\",\n      \"network\": \"eip155:8453\",\n      \"amount\": \"134000\",\n      \"asset\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n      \"payTo\": \"0xfbd7b7Ed48146aD9bEfF956212c77cE056815ad0\"\n    }\n  ],\n  \"resource\": {\n    \"url\": \"https://stablestudio.dev/api/generate/nano-banana-pro/generate\",\n    \"description\": \"Nano Banana Pro - generate\"\n  }\n}\n```\n\n`amount` is USDC micro-units (6 decimals). 134000 = $0.134.\n\nThe response body may also include a UCP-style checkout session:\n\n```json\n{\n  \"checkout_session\": {\n    \"status\": \"ready_for_complete\",\n    \"line_items\": [\n      {\n        \"item\": {\n          \"title\": \"GPT Image 2 Edit\",\n          \"image_url\": \"https://example.com/input.png\"\n        }\n      }\n    ],\n    \"payment\": {\n      \"handlers\": [\n        {\n          \"config\": {\n            \"complete_url\": \"https://stablestudio.dev/api/generate/gpt-image-2/edit\",\n            \"method\": \"POST\",\n            \"body\": {\n              \"prompt\": \"...\"\n            }\n          }\n        }\n      ]\n    }\n  }\n}\n```\n\n## Routes\n\n| Endpoint                                 | Cost          | Time             |\n| ---------------------------------------- | ------------- | ---------------- |\n| `/api/generate/nano-banana/generate`     | $0.045–$0.151 | ~5s              |\n| `/api/generate/nano-banana/edit`         | $0.045–$0.151 | ~5s              |\n| `/api/generate/nano-banana-pro/generate` | $0.13–$0.24   | ~10s             |\n| `/api/generate/nano-banana-pro/edit`     | $0.13–$0.24   | ~10s             |\n| `/api/generate/gpt-image-2/generate`     | $0.005–$0.21  | can take minutes |\n| `/api/generate/gpt-image-2/edit`         | $0.005–$0.21  | can take minutes |\n| `/api/generate/gpt-image-1.5/generate`   | $0.009–$0.20  | ~3s              |\n| `/api/generate/gpt-image-1.5/edit`       | $0.009–$0.20  | ~3s              |\n| `/api/generate/flux-2-pro/generate`      | $0.02–$0.04   | ~5s              |\n| `/api/generate/flux-2-pro/edit`          | $0.03–$0.06   | ~5s              |\n| `/api/generate/flux-2-max/generate`      | $0.04–$0.17   | ~8s              |\n| `/api/generate/flux-2-max/edit`          | $0.04–$0.17   | ~8s              |\n| `/api/generate/grok/generate`            | $0.07         | ~3s              |\n| `/api/generate/grok/edit`                | $0.022        | ~3s              |\n| `/api/generate/grok-video/generate`      | $0.15–$0.75   | ~17s             |\n| `/api/generate/seedance/t2v`             | $0.09–$0.54/s | 1-3min           |\n| `/api/generate/seedance/i2v`             | $0.09–$0.54/s | 1-3min           |\n| `/api/generate/seedance-fast/t2v`        | $0.08–$0.17/s | 1-3min           |\n| `/api/generate/seedance-fast/i2v`        | $0.08–$0.17/s | 1-3min           |\n| `/api/generate/wan-2.6/t2v`              | $0.50–$2.25   | 2-5min           |\n| `/api/generate/wan-2.6/i2v`              | $0.50–$2.25   | 2-5min           |\n| `/api/generate/sora-2/generate`          | $0.40–$1.20   | 1-3min           |\n| `/api/generate/sora-2-pro/generate`      | $1.20–$6.00   | 2-5min           |\n| `/api/generate/veo-3.1/generate`         | $1.60–$3.20   | 1-2min           |\n| `/api/generate/veo-3.1-fast/generate`    | $1.00–$2.00   | ~30s             |\n| `/api/upload`                            | $0.01         | instant          |\n\n### Convert\n\nUse these endpoints when the user has an existing image and asks to convert it to SVG.\n\n| Endpoint                                | Cost  | Time |\n| --------------------------------------- | ----- | ---- |\n| `/api/generate/arrow-1.1/vectorize`     | $0.15 | ~30s |\n| `/api/generate/arrow-1.1-max/vectorize` | $0.20 | ~60s |\n\nCanonical OpenAPI spec: `GET /openapi.json`.\n\n## Input Schemas\n\nMedia fields (`images`, `image`, `urls`, `input_reference`, `referenceImages`, etc.) accept any publicly reachable HTTPS URL — your own hosting, Vercel Blob, StableUpload, S3, or anywhere else on the web. No upload to StableStudio is required. Images must be jpeg/png/gif/webp and at most 10MB; every URL is verified reachable with the right content type before you are charged. If your file only exists locally, the [File Upload](#file-upload) flow ($0.01) gives you a hosted URL.\n\n**nano-banana generate** (Gemini 3.1 Flash):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspectRatio\": \"1:1|1:4|1:8|2:3|3:2|3:4|4:1|4:3|4:5|5:4|8:1|9:16|16:9|21:9\",\n  \"imageSize\": \"512|1K|2K|4K\",\n  \"thinkingLevel\": \"minimal|high\"\n}\n```\n\n**nano-banana edit** (1–14 reference images):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspectRatio\": \"...same as generate\",\n  \"imageSize\": \"512|1K|2K|4K\",\n  \"thinkingLevel\": \"minimal|high\",\n  \"images\": [\"https://image-url...\"]\n}\n```\n\n**nano-banana-pro generate:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspectRatio\": \"1:1|2:3|3:2|3:4|4:3|4:5|5:4|9:16|16:9|21:9\",\n  \"imageSize\": \"1K|2K|4K\"\n}\n```\n\n**nano-banana-pro edit** (1–14 reference images):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspectRatio\": \"...same as generate\",\n  \"imageSize\": \"1K|2K|4K\",\n  \"images\": [\"https://image-url...\"]\n}\n```\n\n**gpt-image-2 generate:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"quality\": \"low|medium|high\",\n  \"size\": \"1024x1024|1536x1024|1024x1536|auto\",\n  \"background\": \"opaque|auto\",\n  \"output_format\": \"png|jpeg|webp\",\n  \"moderation\": \"low|auto\"\n}\n```\n\n**gpt-image-2 edit** (adds `images`):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"quality\": \"low|medium|high\",\n  \"size\": \"1024x1024|1536x1024|1024x1536|auto\",\n  \"background\": \"opaque|auto\",\n  \"output_format\": \"png|jpeg|webp\",\n  \"moderation\": \"low|auto\",\n  \"images\": [\"https://image-url...\"]\n}\n```\n\n**gpt-image-1.5 generate:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"quality\": \"low|medium|high\",\n  \"size\": \"1024x1024|1536x1024|1024x1536|auto\",\n  \"background\": \"transparent|opaque|auto\",\n  \"output_format\": \"png|jpeg|webp\",\n  \"moderation\": \"low|auto\"\n}\n```\n\n**gpt-image-1.5 edit** (adds `input_fidelity`, `images`):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"quality\": \"low|medium|high\",\n  \"size\": \"1024x1024|1536x1024|1024x1536|auto\",\n  \"background\": \"transparent|opaque|auto\",\n  \"output_format\": \"png|jpeg|webp\",\n  \"moderation\": \"low|auto\",\n  \"input_fidelity\": \"high|low\",\n  \"images\": [\"https://image-url...\"]\n}\n```\n\n**flux-2-pro generate:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspect_ratio\": \"1:1|16:9|9:16|3:2|2:3|4:5|5:4|4:3|3:4\",\n  \"resolution\": \"0.5 MP|1 MP|2 MP\",\n  \"output_format\": \"webp|jpg|png\",\n  \"output_quality\": 80,\n  \"safety_tolerance\": 2,\n  \"prompt_upsampling\": false\n}\n```\n\n**flux-2-pro edit** (1–8 reference images):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspect_ratio\": \"...same as generate\",\n  \"resolution\": \"0.5 MP|1 MP|2 MP\",\n  \"images\": [\"https://image-url...\"]\n}\n```\n\n**flux-2-max generate** (up to 4 MP):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspect_ratio\": \"1:1|16:9|9:16|3:2|2:3|4:5|5:4|4:3|3:4\",\n  \"resolution\": \"0.5 MP|1 MP|2 MP|4 MP\",\n  \"output_format\": \"webp|jpg|png\",\n  \"output_quality\": 80,\n  \"safety_tolerance\": 2,\n  \"prompt_upsampling\": false\n}\n```\n\n**flux-2-max edit** (1–10 reference images):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspect_ratio\": \"...same as generate\",\n  \"resolution\": \"0.5 MP|1 MP|2 MP|4 MP\",\n  \"images\": [\"https://image-url...\"]\n}\n```\n\n**grok generate** (13 aspect ratios including ultra-wide):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspect_ratio\": \"1:1|16:9|9:16|4:3|3:4|3:2|2:3|2:1|1:2|19.5:9|9:19.5|20:9|9:20\"\n}\n```\n\n**grok edit:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspect_ratio\": \"...same as generate\",\n  \"images\": [\"https://image-url...\"]\n}\n```\n\n**Image to SVG / Image to SVG Max** (convert an image URL to SVG):\n\n```json\n{\n  \"image\": \"https://image-url...\",\n  \"target_size\": 1024,\n  \"auto_crop\": false,\n  \"max_output_tokens\": 4096\n}\n```\n\n**grok-video generate** (single endpoint — pass `image` for image-to-video):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"duration\": \"3|6|9|12|15\",\n  \"resolution\": \"480p|720p\",\n  \"aspect_ratio\": \"1:1|16:9|9:16|4:3|3:4|3:2|2:3\",\n  \"image\": \"https://image-url...\"\n}\n```\n\n**seedance / seedance-fast t2v** (Seedance 2 Pro/Fast happy path):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"duration\": \"5\",\n  \"aspectRatio\": \"16:9\",\n  \"outputResolution\": \"720p\"\n}\n```\n\nOptional advanced fields: `resolution` (`720x720|720x960|960x720|1280x720|720x1280|1280x540`), `upscaleResolution: \"4k\"`, `callBackUrl`.\n\n**seedance / seedance-fast i2v** (first/last-frame keyframe):\n\n```json\n{\n  \"prompt\": \"optional guidance\",\n  \"duration\": \"5\",\n  \"aspectRatio\": \"16:9\",\n  \"outputResolution\": \"720p\",\n  \"mode\": \"keyframe\",\n  \"urls\": [\"https://first-image...\", \"https://optional-last-image...\"],\n  \"urlMediaTypes\": [\"image\", \"image\"]\n}\n```\n\n**seedance / seedance-fast i2v** (reference mode with images/video/audio):\n\n```json\n{\n  \"prompt\": \"@image1 keeps the character identity while @video1 supplies the camera move, synced to @audio1\",\n  \"duration\": \"5\",\n  \"aspectRatio\": \"16:9\",\n  \"outputResolution\": \"720p\",\n  \"mode\": \"reference\",\n  \"urls\": [\"https://image-reference...\", \"https://video-reference...\"],\n  \"urlMediaTypes\": [\"image\", \"video\"],\n  \"audioUrls\": [\"https://audio-reference...\"]\n}\n```\n\nSeedance `urlMediaTypes` must align 1:1 with `urls`: use `\"image\"` for images and `\"video\"` for videos. StableStudio verifies media types from each URL before charging and persists the verified `urlMediaTypes`, but callers should still include it so `@image1` and `@video1` references are unambiguous. In reference mode, `@imageN` counts image URLs only, `@videoN` counts video URLs only, and `@audioN` counts `audioUrls` only. Use one strong reference first, then add more control if needed; overloaded prompts with many references can conflict.\n\nFor character references, a clean fashion-sketch reference can preserve identity cues with fewer visual artifacts than heavily stylized photo filters. Generate a sketch from the source photo first, upload that sketch, and use it as `@image1` in reference mode. A useful sketch prompt is: \"Create a fashion sketch illustration of the person from the reference photo. Three views side by side: full body front, medium portrait, full body three-quarter. Style: loose expressive pencil lines with selective watercolor fill, cool grey-blue palette, white paper negative space. Skin in light pencil with minimal hatching; hair in sharp dark ink lines. Preserve facial features, hairstyle, clothing silhouette, and distinguishing features.\" Also describe the character in the Seedance prompt itself so the model has both visual and text anchors. For early drafts, use `seedance-fast`; for final quality, switch to `seedance`. Front-facing or three-quarter character references usually give the most consistent results.\n\nSeedance reference/prompt sources:\n\n- [WaveSpeed Seedance 2.0 Guide](https://wavespeed.ai/blog/posts/seedance-2-0-complete-guide-multimodal-video-creation/) — multimodal reference limits, @ mention syntax, and motion/audio use cases.\n- [Magic Hour Reference Guide](https://magichour.ai/blog/seedance-20-reference-guide) — identity, motion, audio sync, and common reference failure modes.\n- [SeaArt Best Prompts](https://www.seaart.ai/blog/seedance-2-0-prompt) — five-segment, CRAFT, and timeline prompt structures.\n\nUse `seedance-fast` for the default happy path. Use `seedance` for Pro quality, 1080p, or higher-fidelity output. `seedance-fast` supports 480p/720p. 4K is available through `upscaleResolution: \"4k\"` and is significantly more expensive.\n\n**wan-2.6 t2v:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"duration\": \"5|10|15\",\n  \"size\": \"1280*720|720*1280|1920*1080|1080*1920\",\n  \"negativePrompt\": \"string\",\n  \"enablePromptExpansion\": true,\n  \"multiShots\": false,\n  \"audioUrl\": \"https://...\",\n  \"seed\": 0\n}\n```\n\nWan audio URLs must be HTTPS mp3 or wav files, 3-30 seconds long, and at most 15MB.\n\n**wan-2.6 i2v:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"image\": \"https://image-url...\",\n  \"duration\": \"5|10|15\",\n  \"resolution\": \"720p|1080p\",\n  \"negativePrompt\": \"string\",\n  \"enablePromptExpansion\": true,\n  \"multiShots\": false,\n  \"audioUrl\": \"https://...\",\n  \"seed\": 0\n}\n```\n\nWan `multiShots` only has an effect when `enablePromptExpansion` is true.\n\n**sora-2 generate** (pass `input_reference` for image-to-video):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"seconds\": \"4|8|12\",\n  \"size\": \"1280x720|720x1280\",\n  \"input_reference\": \"https://image-url...\",\n  \"autoCrop\": true\n}\n```\n\n**sora-2-pro generate** (same as sora-2, extra sizes):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"seconds\": \"4|8|12\",\n  \"size\": \"1280x720|720x1280|1792x1024|1024x1792\",\n  \"input_reference\": \"https://image-url...\",\n  \"autoCrop\": true\n}\n```\n\n**veo-3.1 generate:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"durationSeconds\": \"4|6|8\",\n  \"resolution\": \"720p|1080p\",\n  \"aspectRatio\": \"16:9|9:16\",\n  \"negativePrompt\": \"string\",\n  \"imageMode\": \"none|first-frame|reference|interpolation\",\n  \"image\": \"https://first-frame-image-url...\",\n  \"lastFrame\": \"https://last-frame-image-url...\",\n  \"referenceImages\": [\"https://image-url...\"]\n}\n```\n\n**veo-3.1-fast generate:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"durationSeconds\": \"4|6|8\",\n  \"resolution\": \"720p|1080p\",\n  \"aspectRatio\": \"16:9|9:16\",\n  \"imageMode\": \"none|first-frame|reference|interpolation\",\n  \"image\": \"https://first-frame-image-url...\",\n  \"lastFrame\": \"https://last-frame-image-url...\",\n  \"referenceImages\": [\"https://image-url...\"]\n}\n```\n\nVeo 3.1 Fast does not support `negativePrompt`; omit it or use `veo-3.1`.\n\nVeo modes: omit `image`/`lastFrame`/`referenceImages` for pure text-to-video; pass `image` alone for image-to-video (first frame); pass `image` + `lastFrame` with `imageMode: \"interpolation\"` to animate between frames; pass up to 3 `referenceImages` with `imageMode: \"reference\"` for style guidance.\n\n## File Upload\n\nOptional — media URLs in generate/edit requests can come from anywhere on the public web. Use this flow only when your file exists locally and you need a hosted URL. Three-step flow:\n\n**Step 1: Get upload token** (payment, $0.01)\n\n```\nPOST /api/upload\nPAYMENT-SIGNATURE: <signed payment>\nContent-Type: application/json\n\n{\"filename\": \"reference.mp4\", \"contentType\": \"video/mp4\"}\n```\n\nReturns:\n\n```json\n{\n  \"uploadId\": \"uuid\",\n  \"clientToken\": \"vercel_blob_...\",\n  \"pathname\": \"uploads/uuid/image.png\",\n  \"expiresAt\": \"...\"\n}\n```\n\n**Step 2: Upload file directly to Vercel Blob**\n\n```bash\ncurl -X PUT \"https://vercel.com/api/blob/?pathname=uploads/uuid/image.png\" \\\n  -H \"authorization: Bearer $clientToken\" \\\n  -H \"x-content-type: image/png\" \\\n  -H \"x-api-version: 11\" \\\n  --data-binary @image.png\n```\n\nReturns `{\"url\": \"https://....blob.vercel-storage.com/...\"}`.\n\n**Step 3: Confirm upload** (SIGN-IN-WITH-X auth, no payment)\n\n```\nPOST /api/upload/confirm\nSIGN-IN-WITH-X: <base64>\nContent-Type: application/json\n\n{\"uploadId\": \"uuid\", \"blobUrl\": \"https://....blob.vercel-storage.com/...\"}\n```\n\nReturns `{\"success\": true, \"upload\": {\"id\": \"...\", \"blobUrl\": \"...\"}}`.\n\nUse the returned `blobUrl` like any other media URL in edit/i2v requests.\n\n## Job Polling (SIGN-IN-WITH-X)\n\nJob routes require wallet signature authentication (no payment):\n\n```\nGET /api/jobs/{jobId}\nSIGN-IN-WITH-X: <base64>\n```\n\nHeader contains base64-encoded CAIP-122 message:\n\n```json\n{\n  \"domain\": \"stablestudio.dev\",\n  \"address\": \"0x...\",\n  \"uri\": \"https://stablestudio.dev/api/jobs/{jobId}\",\n  \"version\": \"1\",\n  \"chainId\": \"eip155:8453\",\n  \"nonce\": \"<random>\",\n  \"issuedAt\": \"<ISO8601>\",\n  \"expirationTime\": \"<ISO8601>\",\n  \"signature\": \"0x...\"\n}\n```\n\nIf auth missing/invalid, returns 402 with SIWX extension:\n\n```json\n{\n  \"x402Version\": 2,\n  \"accepts\": [],\n  \"extensions\": {\n    \"sign-in-with-x\": {\n      \"info\": {\n        \"domain\": \"stablestudio.dev\",\n        \"uri\": \"https://stablestudio.dev/api/jobs/{jobId}\",\n        \"version\": \"1\",\n        \"nonce\": \"<server-generated>\",\n        \"issuedAt\": \"<ISO8601>\",\n        \"expirationTime\": \"<ISO8601>\"\n      },\n      \"supportedChains\": [{ \"chainId\": \"eip155:8453\", \"type\": \"eip191\" }],\n      \"schema\": { \"...\": \"...\" }\n    }\n  }\n}\n```\n\n**Routes:**\n\n- `GET /api/jobs/{jobId}` — Get job status\n- `GET /api/jobs` — List jobs (`?limit=20&status=complete`)\n- `DELETE /api/jobs/{jobId}` — Delete failed job\n\n**Response:**\n\n```json\n{ \"status\": \"complete\", \"result\": { \"imageUrl\": \"https://...\" } }\n```\n\nVideos return `{videoUrl, thumbnailUrl}`. Returned URLs expire after roughly 20 minutes — download the asset immediately once the job completes.\n\n**Do not resubmit a generation while its job is `pending` or `loading`.** Normal generation can take several minutes, especially GPT Image and video models. Keep polling the original `jobId`; duplicate submissions create duplicate paid jobs.\n\n**Polling intervals:**\n\n| Model family                   | Poll every |\n| ------------------------------ | ---------- |\n| Most image models              | 5s         |\n| `gpt-image-2`, `gpt-image-1.5` | 10s        |\n| Video models                   | 15s        |\n","guidance":"# StableStudio API\n\n> AI image/video generation via micropayments. USDC on Base, Solana, or Tempo. No API keys.\n\nBase URL: `https://stablestudio.dev`\n\n## Recommended Defaults\n\n- **Image generation:** `gpt-image-2` — Best default quality. Use it for most image tasks unless the user prioritizes speed or explicitly requests another model.\n- **Fast image generation:** `nano-banana-pro` — Use when speed matters or the user wants a faster draft; supports up to 4K resolution.\n- **Image to SVG conversion:** `arrow-1.1` — Use `/api/generate/arrow-1.1/vectorize` when the user wants to convert an existing image into an SVG.\n- **Video generation:** `veo-3.1` — Best quality/cost ratio, supports up to 1080p resolution\n\n## Payment Flow\n\nGeneration endpoints are high-intent paid calls. The unpaid 402 challenge may include `checkout_session` metadata with the selected model, operation, prompt/media summary, price, preview image, and a completion handler for the same paid endpoint. Payment terms remain authoritative in the x402/MPP challenge headers; legacy clients can keep using the normal paid POST and retry flow.\n\n1. `POST /api/generate/{model}/{operation}` without payment header\n   - Returns `402` with `PAYMENT-REQUIRED` header (base64 JSON)\n   - Response JSON may include `checkout_session` for high-intent review UI. Treat it as display/flow metadata, not payment authority.\n\n2. Decode requirements, sign USDC authorization, POST with `PAYMENT-SIGNATURE` header\n   - Returns `200` with `{jobId, status:\"pending\"}` and `PAYMENT-RESPONSE` header\n\n3. Poll `GET /api/jobs/{jobId}` with `SIGN-IN-WITH-X` header until complete\n\n## 402 Response Format\n\nPayment requirements are in the header:\n\n```\nPAYMENT-REQUIRED: <base64>\n```\n\nDecoded:\n\n```json\n{\n  \"x402Version\": 2,\n  \"accepts\": [\n    {\n      \"scheme\": \"exact\",\n      \"network\": \"eip155:8453\",\n      \"amount\": \"134000\",\n      \"asset\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n      \"payTo\": \"0xfbd7b7Ed48146aD9bEfF956212c77cE056815ad0\"\n    }\n  ],\n  \"resource\": {\n    \"url\": \"https://stablestudio.dev/api/generate/nano-banana-pro/generate\",\n    \"description\": \"Nano Banana Pro - generate\"\n  }\n}\n```\n\n`amount` is USDC micro-units (6 decimals). 134000 = $0.134.\n\nThe response body may also include a UCP-style checkout session:\n\n```json\n{\n  \"checkout_session\": {\n    \"status\": \"ready_for_complete\",\n    \"line_items\": [\n      {\n        \"item\": {\n          \"title\": \"GPT Image 2 Edit\",\n          \"image_url\": \"https://example.com/input.png\"\n        }\n      }\n    ],\n    \"payment\": {\n      \"handlers\": [\n        {\n          \"config\": {\n            \"complete_url\": \"https://stablestudio.dev/api/generate/gpt-image-2/edit\",\n            \"method\": \"POST\",\n            \"body\": {\n              \"prompt\": \"...\"\n            }\n          }\n        }\n      ]\n    }\n  }\n}\n```\n\n## Routes\n\n| Endpoint                                 | Cost          | Time             |\n| ---------------------------------------- | ------------- | ---------------- |\n| `/api/generate/nano-banana/generate`     | $0.045–$0.151 | ~5s              |\n| `/api/generate/nano-banana/edit`         | $0.045–$0.151 | ~5s              |\n| `/api/generate/nano-banana-pro/generate` | $0.13–$0.24   | ~10s             |\n| `/api/generate/nano-banana-pro/edit`     | $0.13–$0.24   | ~10s             |\n| `/api/generate/gpt-image-2/generate`     | $0.005–$0.21  | can take minutes |\n| `/api/generate/gpt-image-2/edit`         | $0.005–$0.21  | can take minutes |\n| `/api/generate/gpt-image-1.5/generate`   | $0.009–$0.20  | ~3s              |\n| `/api/generate/gpt-image-1.5/edit`       | $0.009–$0.20  | ~3s              |\n| `/api/generate/flux-2-pro/generate`      | $0.02–$0.04   | ~5s              |\n| `/api/generate/flux-2-pro/edit`          | $0.03–$0.06   | ~5s              |\n| `/api/generate/flux-2-max/generate`      | $0.04–$0.17   | ~8s              |\n| `/api/generate/flux-2-max/edit`          | $0.04–$0.17   | ~8s              |\n| `/api/generate/grok/generate`            | $0.07         | ~3s              |\n| `/api/generate/grok/edit`                | $0.022        | ~3s              |\n| `/api/generate/grok-video/generate`      | $0.15–$0.75   | ~17s             |\n| `/api/generate/seedance/t2v`             | $0.09–$0.54/s | 1-3min           |\n| `/api/generate/seedance/i2v`             | $0.09–$0.54/s | 1-3min           |\n| `/api/generate/seedance-fast/t2v`        | $0.08–$0.17/s | 1-3min           |\n| `/api/generate/seedance-fast/i2v`        | $0.08–$0.17/s | 1-3min           |\n| `/api/generate/wan-2.6/t2v`              | $0.50–$2.25   | 2-5min           |\n| `/api/generate/wan-2.6/i2v`              | $0.50–$2.25   | 2-5min           |\n| `/api/generate/sora-2/generate`          | $0.40–$1.20   | 1-3min           |\n| `/api/generate/sora-2-pro/generate`      | $1.20–$6.00   | 2-5min           |\n| `/api/generate/veo-3.1/generate`         | $1.60–$3.20   | 1-2min           |\n| `/api/generate/veo-3.1-fast/generate`    | $1.00–$2.00   | ~30s             |\n| `/api/upload`                            | $0.01         | instant          |\n\n### Convert\n\nUse these endpoints when the user has an existing image and asks to convert it to SVG.\n\n| Endpoint                                | Cost  | Time |\n| --------------------------------------- | ----- | ---- |\n| `/api/generate/arrow-1.1/vectorize`     | $0.15 | ~30s |\n| `/api/generate/arrow-1.1-max/vectorize` | $0.20 | ~60s |\n\nCanonical OpenAPI spec: `GET /openapi.json`.\n\n## Input Schemas\n\nMedia fields (`images`, `image`, `urls`, `input_reference`, `referenceImages`, etc.) accept any publicly reachable HTTPS URL — your own hosting, Vercel Blob, StableUpload, S3, or anywhere else on the web. No upload to StableStudio is required. Images must be jpeg/png/gif/webp and at most 10MB; every URL is verified reachable with the right content type before you are charged. If your file only exists locally, the [File Upload](#file-upload) flow ($0.01) gives you a hosted URL.\n\n**nano-banana generate** (Gemini 3.1 Flash):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspectRatio\": \"1:1|1:4|1:8|2:3|3:2|3:4|4:1|4:3|4:5|5:4|8:1|9:16|16:9|21:9\",\n  \"imageSize\": \"512|1K|2K|4K\",\n  \"thinkingLevel\": \"minimal|high\"\n}\n```\n\n**nano-banana edit** (1–14 reference images):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspectRatio\": \"...same as generate\",\n  \"imageSize\": \"512|1K|2K|4K\",\n  \"thinkingLevel\": \"minimal|high\",\n  \"images\": [\"https://image-url...\"]\n}\n```\n\n**nano-banana-pro generate:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspectRatio\": \"1:1|2:3|3:2|3:4|4:3|4:5|5:4|9:16|16:9|21:9\",\n  \"imageSize\": \"1K|2K|4K\"\n}\n```\n\n**nano-banana-pro edit** (1–14 reference images):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspectRatio\": \"...same as generate\",\n  \"imageSize\": \"1K|2K|4K\",\n  \"images\": [\"https://image-url...\"]\n}\n```\n\n**gpt-image-2 generate:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"quality\": \"low|medium|high\",\n  \"size\": \"1024x1024|1536x1024|1024x1536|auto\",\n  \"background\": \"opaque|auto\",\n  \"output_format\": \"png|jpeg|webp\",\n  \"moderation\": \"low|auto\"\n}\n```\n\n**gpt-image-2 edit** (adds `images`):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"quality\": \"low|medium|high\",\n  \"size\": \"1024x1024|1536x1024|1024x1536|auto\",\n  \"background\": \"opaque|auto\",\n  \"output_format\": \"png|jpeg|webp\",\n  \"moderation\": \"low|auto\",\n  \"images\": [\"https://image-url...\"]\n}\n```\n\n**gpt-image-1.5 generate:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"quality\": \"low|medium|high\",\n  \"size\": \"1024x1024|1536x1024|1024x1536|auto\",\n  \"background\": \"transparent|opaque|auto\",\n  \"output_format\": \"png|jpeg|webp\",\n  \"moderation\": \"low|auto\"\n}\n```\n\n**gpt-image-1.5 edit** (adds `input_fidelity`, `images`):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"quality\": \"low|medium|high\",\n  \"size\": \"1024x1024|1536x1024|1024x1536|auto\",\n  \"background\": \"transparent|opaque|auto\",\n  \"output_format\": \"png|jpeg|webp\",\n  \"moderation\": \"low|auto\",\n  \"input_fidelity\": \"high|low\",\n  \"images\": [\"https://image-url...\"]\n}\n```\n\n**flux-2-pro generate:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspect_ratio\": \"1:1|16:9|9:16|3:2|2:3|4:5|5:4|4:3|3:4\",\n  \"resolution\": \"0.5 MP|1 MP|2 MP\",\n  \"output_format\": \"webp|jpg|png\",\n  \"output_quality\": 80,\n  \"safety_tolerance\": 2,\n  \"prompt_upsampling\": false\n}\n```\n\n**flux-2-pro edit** (1–8 reference images):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspect_ratio\": \"...same as generate\",\n  \"resolution\": \"0.5 MP|1 MP|2 MP\",\n  \"images\": [\"https://image-url...\"]\n}\n```\n\n**flux-2-max generate** (up to 4 MP):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspect_ratio\": \"1:1|16:9|9:16|3:2|2:3|4:5|5:4|4:3|3:4\",\n  \"resolution\": \"0.5 MP|1 MP|2 MP|4 MP\",\n  \"output_format\": \"webp|jpg|png\",\n  \"output_quality\": 80,\n  \"safety_tolerance\": 2,\n  \"prompt_upsampling\": false\n}\n```\n\n**flux-2-max edit** (1–10 reference images):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspect_ratio\": \"...same as generate\",\n  \"resolution\": \"0.5 MP|1 MP|2 MP|4 MP\",\n  \"images\": [\"https://image-url...\"]\n}\n```\n\n**grok generate** (13 aspect ratios including ultra-wide):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspect_ratio\": \"1:1|16:9|9:16|4:3|3:4|3:2|2:3|2:1|1:2|19.5:9|9:19.5|20:9|9:20\"\n}\n```\n\n**grok edit:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"aspect_ratio\": \"...same as generate\",\n  \"images\": [\"https://image-url...\"]\n}\n```\n\n**Image to SVG / Image to SVG Max** (convert an image URL to SVG):\n\n```json\n{\n  \"image\": \"https://image-url...\",\n  \"target_size\": 1024,\n  \"auto_crop\": false,\n  \"max_output_tokens\": 4096\n}\n```\n\n**grok-video generate** (single endpoint — pass `image` for image-to-video):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"duration\": \"3|6|9|12|15\",\n  \"resolution\": \"480p|720p\",\n  \"aspect_ratio\": \"1:1|16:9|9:16|4:3|3:4|3:2|2:3\",\n  \"image\": \"https://image-url...\"\n}\n```\n\n**seedance / seedance-fast t2v** (Seedance 2 Pro/Fast happy path):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"duration\": \"5\",\n  \"aspectRatio\": \"16:9\",\n  \"outputResolution\": \"720p\"\n}\n```\n\nOptional advanced fields: `resolution` (`720x720|720x960|960x720|1280x720|720x1280|1280x540`), `upscaleResolution: \"4k\"`, `callBackUrl`.\n\n**seedance / seedance-fast i2v** (first/last-frame keyframe):\n\n```json\n{\n  \"prompt\": \"optional guidance\",\n  \"duration\": \"5\",\n  \"aspectRatio\": \"16:9\",\n  \"outputResolution\": \"720p\",\n  \"mode\": \"keyframe\",\n  \"urls\": [\"https://first-image...\", \"https://optional-last-image...\"],\n  \"urlMediaTypes\": [\"image\", \"image\"]\n}\n```\n\n**seedance / seedance-fast i2v** (reference mode with images/video/audio):\n\n```json\n{\n  \"prompt\": \"@image1 keeps the character identity while @video1 supplies the camera move, synced to @audio1\",\n  \"duration\": \"5\",\n  \"aspectRatio\": \"16:9\",\n  \"outputResolution\": \"720p\",\n  \"mode\": \"reference\",\n  \"urls\": [\"https://image-reference...\", \"https://video-reference...\"],\n  \"urlMediaTypes\": [\"image\", \"video\"],\n  \"audioUrls\": [\"https://audio-reference...\"]\n}\n```\n\nSeedance `urlMediaTypes` must align 1:1 with `urls`: use `\"image\"` for images and `\"video\"` for videos. StableStudio verifies media types from each URL before charging and persists the verified `urlMediaTypes`, but callers should still include it so `@image1` and `@video1` references are unambiguous. In reference mode, `@imageN` counts image URLs only, `@videoN` counts video URLs only, and `@audioN` counts `audioUrls` only. Use one strong reference first, then add more control if needed; overloaded prompts with many references can conflict.\n\nFor character references, a clean fashion-sketch reference can preserve identity cues with fewer visual artifacts than heavily stylized photo filters. Generate a sketch from the source photo first, upload that sketch, and use it as `@image1` in reference mode. A useful sketch prompt is: \"Create a fashion sketch illustration of the person from the reference photo. Three views side by side: full body front, medium portrait, full body three-quarter. Style: loose expressive pencil lines with selective watercolor fill, cool grey-blue palette, white paper negative space. Skin in light pencil with minimal hatching; hair in sharp dark ink lines. Preserve facial features, hairstyle, clothing silhouette, and distinguishing features.\" Also describe the character in the Seedance prompt itself so the model has both visual and text anchors. For early drafts, use `seedance-fast`; for final quality, switch to `seedance`. Front-facing or three-quarter character references usually give the most consistent results.\n\nSeedance reference/prompt sources:\n\n- [WaveSpeed Seedance 2.0 Guide](https://wavespeed.ai/blog/posts/seedance-2-0-complete-guide-multimodal-video-creation/) — multimodal reference limits, @ mention syntax, and motion/audio use cases.\n- [Magic Hour Reference Guide](https://magichour.ai/blog/seedance-20-reference-guide) — identity, motion, audio sync, and common reference failure modes.\n- [SeaArt Best Prompts](https://www.seaart.ai/blog/seedance-2-0-prompt) — five-segment, CRAFT, and timeline prompt structures.\n\nUse `seedance-fast` for the default happy path. Use `seedance` for Pro quality, 1080p, or higher-fidelity output. `seedance-fast` supports 480p/720p. 4K is available through `upscaleResolution: \"4k\"` and is significantly more expensive.\n\n**wan-2.6 t2v:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"duration\": \"5|10|15\",\n  \"size\": \"1280*720|720*1280|1920*1080|1080*1920\",\n  \"negativePrompt\": \"string\",\n  \"enablePromptExpansion\": true,\n  \"multiShots\": false,\n  \"audioUrl\": \"https://...\",\n  \"seed\": 0\n}\n```\n\nWan audio URLs must be HTTPS mp3 or wav files, 3-30 seconds long, and at most 15MB.\n\n**wan-2.6 i2v:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"image\": \"https://image-url...\",\n  \"duration\": \"5|10|15\",\n  \"resolution\": \"720p|1080p\",\n  \"negativePrompt\": \"string\",\n  \"enablePromptExpansion\": true,\n  \"multiShots\": false,\n  \"audioUrl\": \"https://...\",\n  \"seed\": 0\n}\n```\n\nWan `multiShots` only has an effect when `enablePromptExpansion` is true.\n\n**sora-2 generate** (pass `input_reference` for image-to-video):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"seconds\": \"4|8|12\",\n  \"size\": \"1280x720|720x1280\",\n  \"input_reference\": \"https://image-url...\",\n  \"autoCrop\": true\n}\n```\n\n**sora-2-pro generate** (same as sora-2, extra sizes):\n\n```json\n{\n  \"prompt\": \"string\",\n  \"seconds\": \"4|8|12\",\n  \"size\": \"1280x720|720x1280|1792x1024|1024x1792\",\n  \"input_reference\": \"https://image-url...\",\n  \"autoCrop\": true\n}\n```\n\n**veo-3.1 generate:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"durationSeconds\": \"4|6|8\",\n  \"resolution\": \"720p|1080p\",\n  \"aspectRatio\": \"16:9|9:16\",\n  \"negativePrompt\": \"string\",\n  \"imageMode\": \"none|first-frame|reference|interpolation\",\n  \"image\": \"https://first-frame-image-url...\",\n  \"lastFrame\": \"https://last-frame-image-url...\",\n  \"referenceImages\": [\"https://image-url...\"]\n}\n```\n\n**veo-3.1-fast generate:**\n\n```json\n{\n  \"prompt\": \"string\",\n  \"durationSeconds\": \"4|6|8\",\n  \"resolution\": \"720p|1080p\",\n  \"aspectRatio\": \"16:9|9:16\",\n  \"imageMode\": \"none|first-frame|reference|interpolation\",\n  \"image\": \"https://first-frame-image-url...\",\n  \"lastFrame\": \"https://last-frame-image-url...\",\n  \"referenceImages\": [\"https://image-url...\"]\n}\n```\n\nVeo 3.1 Fast does not support `negativePrompt`; omit it or use `veo-3.1`.\n\nVeo modes: omit `image`/`lastFrame`/`referenceImages` for pure text-to-video; pass `image` alone for image-to-video (first frame); pass `image` + `lastFrame` with `imageMode: \"interpolation\"` to animate between frames; pass up to 3 `referenceImages` with `imageMode: \"reference\"` for style guidance.\n\n## File Upload\n\nOptional — media URLs in generate/edit requests can come from anywhere on the public web. Use this flow only when your file exists locally and you need a hosted URL. Three-step flow:\n\n**Step 1: Get upload token** (payment, $0.01)\n\n```\nPOST /api/upload\nPAYMENT-SIGNATURE: <signed payment>\nContent-Type: application/json\n\n{\"filename\": \"reference.mp4\", \"contentType\": \"video/mp4\"}\n```\n\nReturns:\n\n```json\n{\n  \"uploadId\": \"uuid\",\n  \"clientToken\": \"vercel_blob_...\",\n  \"pathname\": \"uploads/uuid/image.png\",\n  \"expiresAt\": \"...\"\n}\n```\n\n**Step 2: Upload file directly to Vercel Blob**\n\n```bash\ncurl -X PUT \"https://vercel.com/api/blob/?pathname=uploads/uuid/image.png\" \\\n  -H \"authorization: Bearer $clientToken\" \\\n  -H \"x-content-type: image/png\" \\\n  -H \"x-api-version: 11\" \\\n  --data-binary @image.png\n```\n\nReturns `{\"url\": \"https://....blob.vercel-storage.com/...\"}`.\n\n**Step 3: Confirm upload** (SIGN-IN-WITH-X auth, no payment)\n\n```\nPOST /api/upload/confirm\nSIGN-IN-WITH-X: <base64>\nContent-Type: application/json\n\n{\"uploadId\": \"uuid\", \"blobUrl\": \"https://....blob.vercel-storage.com/...\"}\n```\n\nReturns `{\"success\": true, \"upload\": {\"id\": \"...\", \"blobUrl\": \"...\"}}`.\n\nUse the returned `blobUrl` like any other media URL in edit/i2v requests.\n\n## Job Polling (SIGN-IN-WITH-X)\n\nJob routes require wallet signature authentication (no payment):\n\n```\nGET /api/jobs/{jobId}\nSIGN-IN-WITH-X: <base64>\n```\n\nHeader contains base64-encoded CAIP-122 message:\n\n```json\n{\n  \"domain\": \"stablestudio.dev\",\n  \"address\": \"0x...\",\n  \"uri\": \"https://stablestudio.dev/api/jobs/{jobId}\",\n  \"version\": \"1\",\n  \"chainId\": \"eip155:8453\",\n  \"nonce\": \"<random>\",\n  \"issuedAt\": \"<ISO8601>\",\n  \"expirationTime\": \"<ISO8601>\",\n  \"signature\": \"0x...\"\n}\n```\n\nIf auth missing/invalid, returns 402 with SIWX extension:\n\n```json\n{\n  \"x402Version\": 2,\n  \"accepts\": [],\n  \"extensions\": {\n    \"sign-in-with-x\": {\n      \"info\": {\n        \"domain\": \"stablestudio.dev\",\n        \"uri\": \"https://stablestudio.dev/api/jobs/{jobId}\",\n        \"version\": \"1\",\n        \"nonce\": \"<server-generated>\",\n        \"issuedAt\": \"<ISO8601>\",\n        \"expirationTime\": \"<ISO8601>\"\n      },\n      \"supportedChains\": [{ \"chainId\": \"eip155:8453\", \"type\": \"eip191\" }],\n      \"schema\": { \"...\": \"...\" }\n    }\n  }\n}\n```\n\n**Routes:**\n\n- `GET /api/jobs/{jobId}` — Get job status\n- `GET /api/jobs` — List jobs (`?limit=20&status=complete`)\n- `DELETE /api/jobs/{jobId}` — Delete failed job\n\n**Response:**\n\n```json\n{ \"status\": \"complete\", \"result\": { \"imageUrl\": \"https://...\" } }\n```\n\nVideos return `{videoUrl, thumbnailUrl}`. Returned URLs expire after roughly 20 minutes — download the asset immediately once the job completes.\n\n**Do not resubmit a generation while its job is `pending` or `loading`.** Normal generation can take several minutes, especially GPT Image and video models. Keep polling the original `jobId`; duplicate submissions create duplicate paid jobs.\n\n**Polling intervals:**\n\n| Model family                   | Poll every |\n| ------------------------------ | ---------- |\n| Most image models              | 5s         |\n| `gpt-image-2`, `gpt-image-1.5` | 10s        |\n| Video models                   | 15s        |\n","contact":{"name":"StableStudio"}},"servers":[{"url":"https://stablestudio.dev"}],"tags":[{"name":"Generate"},{"name":"Jobs"},{"name":"Upload"}],"x-discovery":{"ownershipProofs":["0xe0cee2e160542a97298bb30716ba38f917003404eb7f2c84a72344bccf8abb0f439e43c858bed768a3c0b2ca0246c9c745a6a18c98b83c6919289170c4c607f11b"]},"paths":{"/api/jobs/{jobId}":{"get":{"operationId":"jobs_status","summary":"Get job status","tags":["Jobs"],"security":[{"siwx":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"input":{},"status":{"type":"string"},"progress":{"type":"number"},"result":{},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","input","status","progress","createdAt","updatedAt"],"additionalProperties":false}}}},"402":{"description":"Authentication Required"}}},"delete":{"operationId":"jobs_delete","summary":"Soft-delete a failed job","tags":["Jobs"],"security":[{"siwx":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"],"additionalProperties":false}}}},"402":{"description":"Authentication Required"}}}},"/api/generate/sora-2/generate":{"post":{"operationId":"generate_sora-2_generate","summary":"generate with Sora 2 Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"description":"A detailed description of the video you want to generate"},"seconds":{"default":"4","description":"Duration of the video in seconds","type":"string","enum":["4","8","12"]},"size":{"default":"1280x720","description":"Video resolution (portrait or landscape)","type":"string","enum":["720x1280","1280x720"]},"input_reference":{"description":"Optional reference image URL for image-to-video generation","type":"string","format":"uri"},"autoCrop":{"default":true,"description":"Automatically crop reference image to match aspect ratio","type":"boolean"}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/sora-2-pro/generate":{"post":{"operationId":"generate_sora-2-pro_generate","summary":"generate with Sora 2 Pro Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"description":"A detailed description of the video you want to generate"},"seconds":{"default":"4","description":"Duration of the video in seconds","type":"string","enum":["4","8","12"]},"size":{"default":"1280x720","description":"Video resolution (720p or 1024p, portrait or landscape)","type":"string","enum":["720x1280","1280x720","1024x1792","1792x1024"]},"input_reference":{"description":"Optional reference image URL for image-to-video generation","type":"string","format":"uri"},"autoCrop":{"default":true,"description":"Automatically crop reference image to match aspect ratio","type":"boolean"}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/veo-3.1/generate":{"post":{"operationId":"generate_veo-3.1_generate","summary":"generate with Veo 3.1 Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"description":"A detailed description of the video you want to generate"},"durationSeconds":{"default":"4","description":"Duration of the video in seconds","type":"string","enum":["4","6","8"]},"resolution":{"default":"720p","description":"Video resolution quality","type":"string","enum":["720p","1080p"]},"aspectRatio":{"default":"16:9","description":"Aspect ratio (landscape or portrait)","type":"string","enum":["16:9","9:16"]},"negativePrompt":{"description":"Things to avoid in the generated video","type":"string"},"imageMode":{"default":"interpolation","description":"How to use reference images","type":"string","enum":["none","first-frame","reference","interpolation"]},"image":{"description":"First frame image URL for image-to-video generation","type":"string","format":"uri"},"lastFrame":{"description":"Last frame image URL for interpolation mode","type":"string","format":"uri"},"referenceImages":{"description":"Reference images for style guidance (max 3)","maxItems":3,"type":"array","items":{"type":"string","format":"uri","description":"Reference image URL"}}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/veo-3.1-fast/generate":{"post":{"operationId":"generate_veo-3.1-fast_generate","summary":"generate with Veo 3.1 Fast Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"description":"A detailed description of the video you want to generate"},"durationSeconds":{"default":"4","description":"Duration of the video in seconds","type":"string","enum":["4","6","8"]},"resolution":{"default":"720p","description":"Video resolution quality","type":"string","enum":["720p","1080p"]},"aspectRatio":{"default":"16:9","description":"Aspect ratio (landscape or portrait)","type":"string","enum":["16:9","9:16"]},"imageMode":{"default":"interpolation","description":"How to use reference images","type":"string","enum":["none","first-frame","reference","interpolation"]},"image":{"description":"First frame image URL for image-to-video generation","type":"string","format":"uri"},"lastFrame":{"description":"Last frame image URL for interpolation mode","type":"string","format":"uri"},"referenceImages":{"description":"Reference images for style guidance (max 3)","maxItems":3,"type":"array","items":{"type":"string","format":"uri","description":"Reference image URL"}}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/wan-2.6/t2v":{"post":{"operationId":"generate_wan-2.6_t2v","summary":"t2v with Wan 2.6 Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A detailed description of the video you want to generate"},"size":{"default":"1280*720","description":"Video resolution and orientation","type":"string","enum":["1280*720","720*1280","1920*1080","1080*1920"]},"duration":{"default":"5","description":"Duration of the video in seconds","type":"string","enum":["5","10","15"]},"negativePrompt":{"description":"Things to avoid in the generated video","type":"string"},"seed":{"description":"Random seed for reproducibility","type":"integer","minimum":-9007199254740991,"maximum":2147483647},"enablePromptExpansion":{"default":true,"description":"Let the model enhance your prompt","type":"boolean"},"multiShots":{"default":false,"description":"Enable multi-shot narrative (requires prompt expansion)","type":"boolean"},"audioUrl":{"description":"URL to audio file for sync","type":"string","format":"uri"}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/wan-2.6/i2v":{"post":{"operationId":"generate_wan-2.6_i2v","summary":"i2v with Wan 2.6 Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","format":"uri","description":"Source image URL to animate"},"prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"A description of the motion/animation you want"},"resolution":{"default":"720p","description":"Video resolution quality","type":"string","enum":["720p","1080p"]},"duration":{"default":"5","description":"Duration of the video in seconds","type":"string","enum":["5","10","15"]},"negativePrompt":{"description":"Things to avoid in the generated video","type":"string"},"seed":{"description":"Random seed for reproducibility","type":"integer","minimum":-9007199254740991,"maximum":2147483647},"enablePromptExpansion":{"default":true,"description":"Let the model enhance your prompt","type":"boolean"},"multiShots":{"default":false,"description":"Enable multi-shot narrative (requires prompt expansion)","type":"boolean"},"audioUrl":{"description":"URL to audio file for sync","type":"string","format":"uri"}},"required":["image","prompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/gpt-image-2/generate":{"post":{"operationId":"generate_gpt-image-2_generate","summary":"generate with GPT Image 2. Best default image model; can take minutes. Poll jobId, do not resubmit pending jobs. Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"description":"A detailed description of the image you want to generate"},"size":{"description":"Image dimensions (square, landscape, portrait, or auto)","type":"string","enum":["1024x1024","1536x1024","1024x1536","auto"]},"quality":{"default":"high","description":"Output quality level (affects cost and detail)","type":"string","enum":["low","medium","high"]},"background":{"default":"auto","description":"Background fill behavior for generated image output","type":"string","enum":["opaque","auto"]},"output_format":{"default":"png","description":"Output image format","type":"string","enum":["png","jpeg","webp"]},"output_compression":{"default":0,"description":"Compression level (0-100, higher = smaller file)","type":"number","minimum":0,"maximum":100},"moderation":{"default":"low","description":"Content moderation strictness","type":"string","enum":["low","auto"]}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/gpt-image-2/edit":{"post":{"operationId":"generate_gpt-image-2_edit","summary":"edit with GPT Image 2. Best default image model; can take minutes. Poll jobId, do not resubmit pending jobs. Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"description":"A detailed description of the image you want to generate"},"size":{"description":"Image dimensions (square, landscape, portrait, or auto)","type":"string","enum":["1024x1024","1536x1024","1024x1536","auto"]},"quality":{"default":"high","description":"Output quality level (affects cost and detail)","type":"string","enum":["low","medium","high"]},"background":{"default":"auto","description":"Background fill behavior for generated image output","type":"string","enum":["opaque","auto"]},"output_format":{"default":"png","description":"Output image format","type":"string","enum":["png","jpeg","webp"]},"output_compression":{"default":0,"description":"Compression level (0-100, higher = smaller file)","type":"number","minimum":0,"maximum":100},"moderation":{"default":"low","description":"Content moderation strictness","type":"string","enum":["low","auto"]},"images":{"minItems":1,"type":"array","items":{"type":"string","format":"uri","description":"Image URL"},"description":"Array of image URLs to edit"}},"required":["prompt","images"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/gpt-image-1.5/generate":{"post":{"operationId":"generate_gpt-image-1.5_generate","summary":"generate with GPT Image 1.5 Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"description":"A detailed description of the image you want to generate"},"size":{"description":"Image dimensions (square, landscape, portrait, or auto)","type":"string","enum":["1024x1024","1536x1024","1024x1536","auto"]},"quality":{"default":"high","description":"Output quality level (affects cost and detail)","type":"string","enum":["low","medium","high"]},"background":{"default":"auto","description":"Background transparency for PNG output","type":"string","enum":["transparent","opaque","auto"]},"output_format":{"default":"png","description":"Output image format","type":"string","enum":["png","jpeg","webp"]},"output_compression":{"default":0,"description":"Compression level (0-100, higher = smaller file)","type":"number","minimum":0,"maximum":100},"moderation":{"default":"low","description":"Content moderation strictness","type":"string","enum":["low","auto"]}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/gpt-image-1.5/edit":{"post":{"operationId":"generate_gpt-image-1.5_edit","summary":"edit with GPT Image 1.5 Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"description":"A detailed description of the image you want to generate"},"size":{"description":"Image dimensions (square, landscape, portrait, or auto)","type":"string","enum":["1024x1024","1536x1024","1024x1536","auto"]},"quality":{"default":"high","description":"Output quality level (affects cost and detail)","type":"string","enum":["low","medium","high"]},"background":{"default":"auto","description":"Background transparency for PNG output","type":"string","enum":["transparent","opaque","auto"]},"output_format":{"default":"png","description":"Output image format","type":"string","enum":["png","jpeg","webp"]},"output_compression":{"default":0,"description":"Compression level (0-100, higher = smaller file)","type":"number","minimum":0,"maximum":100},"moderation":{"default":"low","description":"Content moderation strictness","type":"string","enum":["low","auto"]},"input_fidelity":{"default":"high","description":"Fidelity to input images (high preserves more details)","type":"string","enum":["high","low"]},"images":{"minItems":1,"type":"array","items":{"type":"string","format":"uri","description":"Image URL"},"description":"Array of image URLs to edit"}},"required":["prompt","images"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/nano-banana/generate":{"post":{"operationId":"generate_nano-banana_generate","summary":"generate with Nano Banana Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"description":"A detailed description of the image you want to generate"},"aspectRatio":{"default":"1:1","description":"The aspect ratio of the generated image","type":"string","enum":["1:1","1:4","1:8","2:3","3:2","3:4","4:1","4:3","4:5","5:4","8:1","9:16","16:9","21:9"]},"imageSize":{"default":"1K","description":"The resolution of the generated image","type":"string","enum":["512","1K","2K","4K"]},"thinkingLevel":{"default":"minimal","description":"Thinking level for reasoning (minimal = fastest, high = best quality)","type":"string","enum":["minimal","high"]}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/nano-banana/edit":{"post":{"operationId":"generate_nano-banana_edit","summary":"edit with Nano Banana Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"description":"A detailed description of the image you want to generate"},"aspectRatio":{"default":"1:1","description":"The aspect ratio of the generated image","type":"string","enum":["1:1","1:4","1:8","2:3","3:2","3:4","4:1","4:3","4:5","5:4","8:1","9:16","16:9","21:9"]},"imageSize":{"default":"1K","description":"The resolution of the generated image","type":"string","enum":["512","1K","2K","4K"]},"thinkingLevel":{"default":"minimal","description":"Thinking level for reasoning (minimal = fastest, high = best quality)","type":"string","enum":["minimal","high"]},"images":{"minItems":1,"maxItems":14,"type":"array","items":{"type":"string","format":"uri","description":"URL of an image"},"description":"Array of image URLs to use as reference for editing (1-14 images)"}},"required":["prompt","images"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/nano-banana-pro/generate":{"post":{"operationId":"generate_nano-banana-pro_generate","summary":"generate with Nano Banana Pro Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"description":"A detailed description of the image you want to generate"},"aspectRatio":{"default":"1:1","description":"The aspect ratio of the generated image","type":"string","enum":["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9"]},"imageSize":{"default":"1K","description":"The resolution of the generated image","type":"string","enum":["1K","2K","4K"]}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/nano-banana-pro/edit":{"post":{"operationId":"generate_nano-banana-pro_edit","summary":"edit with Nano Banana Pro Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"description":"A detailed description of the image you want to generate"},"aspectRatio":{"default":"1:1","description":"The aspect ratio of the generated image","type":"string","enum":["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9"]},"imageSize":{"default":"1K","description":"The resolution of the generated image","type":"string","enum":["1K","2K","4K"]},"images":{"minItems":1,"maxItems":14,"type":"array","items":{"type":"string","format":"uri","description":"URL of an image"},"description":"Array of image URLs to use as reference for editing (1-14 images)"}},"required":["prompt","images"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/flux-2-pro/generate":{"post":{"operationId":"generate_flux-2-pro_generate","summary":"generate with Flux 2 Pro Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":10000,"description":"A detailed description of the image you want to generate"},"aspect_ratio":{"default":"1:1","description":"Aspect ratio of the output image","type":"string","enum":["1:1","16:9","9:16","3:2","2:3","4:5","5:4","4:3","3:4"]},"resolution":{"default":"1 MP","description":"Output resolution in megapixels","type":"string","enum":["0.5 MP","1 MP","2 MP"]},"output_format":{"default":"webp","description":"Output image format","type":"string","enum":["webp","jpg","png"]},"output_quality":{"default":80,"description":"Quality for JPG/WebP output (0-100)","type":"integer","minimum":0,"maximum":100},"seed":{"description":"Random seed for reproducibility","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"safety_tolerance":{"default":2,"description":"Content safety strictness (1=strict, 5=permissive)","type":"integer","minimum":1,"maximum":5},"prompt_upsampling":{"default":false,"description":"Let the model enhance your prompt for more creative results","type":"boolean"}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/flux-2-pro/edit":{"post":{"operationId":"generate_flux-2-pro_edit","summary":"edit with Flux 2 Pro Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":10000,"description":"A detailed description of the image you want to generate"},"aspect_ratio":{"default":"1:1","description":"Aspect ratio of the output image","type":"string","enum":["1:1","16:9","9:16","3:2","2:3","4:5","5:4","4:3","3:4"]},"resolution":{"default":"1 MP","description":"Output resolution in megapixels","type":"string","enum":["0.5 MP","1 MP","2 MP"]},"output_format":{"default":"webp","description":"Output image format","type":"string","enum":["webp","jpg","png"]},"output_quality":{"default":80,"description":"Quality for JPG/WebP output (0-100)","type":"integer","minimum":0,"maximum":100},"seed":{"description":"Random seed for reproducibility","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"safety_tolerance":{"default":2,"description":"Content safety strictness (1=strict, 5=permissive)","type":"integer","minimum":1,"maximum":5},"prompt_upsampling":{"default":false,"description":"Let the model enhance your prompt for more creative results","type":"boolean"},"images":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","format":"uri","description":"Image URL"},"description":"Array of image URLs to use as references for editing"}},"required":["prompt","images"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/flux-2-max/generate":{"post":{"operationId":"generate_flux-2-max_generate","summary":"generate with Flux 2 Max Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":10000,"description":"A detailed description of the image you want to generate"},"aspect_ratio":{"default":"1:1","description":"Aspect ratio of the output image","type":"string","enum":["1:1","16:9","9:16","3:2","2:3","4:5","5:4","4:3","3:4"]},"resolution":{"default":"1 MP","description":"Output resolution in megapixels (up to 4 MP)","type":"string","enum":["0.5 MP","1 MP","2 MP","4 MP"]},"output_format":{"default":"webp","description":"Output image format","type":"string","enum":["webp","jpg","png"]},"output_quality":{"default":80,"description":"Quality for JPG/WebP output (0-100)","type":"integer","minimum":0,"maximum":100},"seed":{"description":"Random seed for reproducibility","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"safety_tolerance":{"default":2,"description":"Content safety strictness (1=strict, 5=permissive)","type":"integer","minimum":1,"maximum":5},"prompt_upsampling":{"default":false,"description":"Let the model enhance your prompt for more creative results","type":"boolean"}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/flux-2-max/edit":{"post":{"operationId":"generate_flux-2-max_edit","summary":"edit with Flux 2 Max Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":10000,"description":"A detailed description of the image you want to generate"},"aspect_ratio":{"default":"1:1","description":"Aspect ratio of the output image","type":"string","enum":["1:1","16:9","9:16","3:2","2:3","4:5","5:4","4:3","3:4"]},"resolution":{"default":"1 MP","description":"Output resolution in megapixels (up to 4 MP)","type":"string","enum":["0.5 MP","1 MP","2 MP","4 MP"]},"output_format":{"default":"webp","description":"Output image format","type":"string","enum":["webp","jpg","png"]},"output_quality":{"default":80,"description":"Quality for JPG/WebP output (0-100)","type":"integer","minimum":0,"maximum":100},"seed":{"description":"Random seed for reproducibility","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"safety_tolerance":{"default":2,"description":"Content safety strictness (1=strict, 5=permissive)","type":"integer","minimum":1,"maximum":5},"prompt_upsampling":{"default":false,"description":"Let the model enhance your prompt for more creative results","type":"boolean"},"images":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"uri","description":"Image URL"},"description":"Array of image URLs to use as references for editing"}},"required":["prompt","images"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/grok/generate":{"post":{"operationId":"generate_grok_generate","summary":"generate with Grok Image Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":8000,"description":"A detailed description of the image you want to generate"},"aspect_ratio":{"default":"16:9","description":"Aspect ratio of the output image","type":"string","enum":["1:1","16:9","9:16","4:3","3:4","3:2","2:3","2:1","1:2","19.5:9","9:19.5","20:9","9:20"]}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/grok/edit":{"post":{"operationId":"generate_grok_edit","summary":"edit with Grok Image Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":8000,"description":"A detailed description of the image you want to generate"},"aspect_ratio":{"default":"16:9","description":"Aspect ratio of the output image","type":"string","enum":["1:1","16:9","9:16","4:3","3:4","3:2","2:3","2:1","1:2","19.5:9","9:19.5","20:9","9:20"]},"images":{"minItems":1,"type":"array","items":{"type":"string","format":"uri","description":"Image URL"},"description":"Array of image URLs to edit"}},"required":["prompt","images"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/grok-video/generate":{"post":{"operationId":"generate_grok-video_generate","summary":"generate with Grok Video Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":8000,"description":"A detailed description of the video you want to generate"},"duration":{"default":"6","description":"Duration of the video in seconds","type":"string","enum":["3","6","9","12","15"]},"resolution":{"default":"720p","description":"Video resolution","type":"string","enum":["480p","720p"]},"aspect_ratio":{"default":"16:9","description":"Aspect ratio of the output video","type":"string","enum":["1:1","16:9","9:16","4:3","3:4","3:2","2:3"]},"image":{"description":"Optional reference image URL for image-to-video generation","type":"string","format":"uri"}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/seedance/t2v":{"post":{"operationId":"generate_seedance_t2v","summary":"t2v with Seedance 2 Pro Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"20.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"A detailed description of the video to generate"},"duration":{"default":"5","description":"Duration of the video in seconds","type":"string","enum":["4","5","6","7","8","9","10","11","12","13","14","15"]},"aspectRatio":{"default":"16:9","description":"Aspect ratio of the output video","type":"string","enum":["1:1","3:4","4:3","16:9","9:16","21:9"]},"resolution":{"description":"Optional exact pixel resolution override","type":"string","enum":["720x720","720x960","960x720","1280x720","720x1280","1280x540"]},"outputResolution":{"default":"720p","description":"Output quality tier","type":"string","enum":["480p","720p","1080p"]},"upscaleResolution":{"description":"Upscale the generated video to 4K","type":"string","const":"4k"},"callBackUrl":{"description":"Optional Kinovi callback URL for API users","type":"string","format":"uri"}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/seedance/i2v":{"post":{"operationId":"generate_seedance_i2v","summary":"i2v with Seedance 2 Pro Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"20.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"A detailed description of the video to generate"},"duration":{"default":"5","description":"Duration of the video in seconds","type":"string","enum":["4","5","6","7","8","9","10","11","12","13","14","15"]},"aspectRatio":{"default":"16:9","description":"Aspect ratio of the output video","type":"string","enum":["1:1","3:4","4:3","16:9","9:16","21:9"]},"resolution":{"description":"Optional exact pixel resolution override","type":"string","enum":["720x720","720x960","960x720","1280x720","720x1280","1280x540"]},"outputResolution":{"default":"720p","description":"Output quality tier","type":"string","enum":["480p","720p","1080p"]},"upscaleResolution":{"description":"Upscale the generated video to 4K","type":"string","const":"4k"},"callBackUrl":{"description":"Optional Kinovi callback URL for API users","type":"string","format":"uri"},"mode":{"default":"keyframe","description":"Use keyframe image-to-video or reference-guided generation","type":"string","enum":["keyframe","reference"]},"urls":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"string","format":"uri"},"description":"Public image/video reference URLs"},"audioUrls":{"description":"Public audio reference URLs","maxItems":3,"type":"array","items":{"type":"string","format":"uri"}},"urlMediaTypes":{"description":"One media type per urls item, aligned by index. Include this for API clarity; Stable Studio also infers and persists it from URL content types before charging.","maxItems":12,"type":"array","items":{"type":"string","enum":["image","video"]}}},"required":["prompt","urls"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/seedance-fast/t2v":{"post":{"operationId":"generate_seedance-fast_t2v","summary":"t2v with Seedance 2 Fast Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"20.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"A detailed description of the video to generate"},"duration":{"default":"5","description":"Duration of the video in seconds","type":"string","enum":["4","5","6","7","8","9","10","11","12","13","14","15"]},"aspectRatio":{"default":"16:9","description":"Aspect ratio of the output video","type":"string","enum":["1:1","3:4","4:3","16:9","9:16","21:9"]},"resolution":{"description":"Optional exact pixel resolution override","type":"string","enum":["720x720","720x960","960x720","1280x720","720x1280","1280x540"]},"outputResolution":{"default":"720p","description":"Output quality tier","type":"string","enum":["480p","720p"]},"upscaleResolution":{"description":"Upscale the generated video to 4K","type":"string","const":"4k"},"callBackUrl":{"description":"Optional Kinovi callback URL for API users","type":"string","format":"uri"}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/seedance-fast/i2v":{"post":{"operationId":"generate_seedance-fast_i2v","summary":"i2v with Seedance 2 Fast Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"20.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"A detailed description of the video to generate"},"duration":{"default":"5","description":"Duration of the video in seconds","type":"string","enum":["4","5","6","7","8","9","10","11","12","13","14","15"]},"aspectRatio":{"default":"16:9","description":"Aspect ratio of the output video","type":"string","enum":["1:1","3:4","4:3","16:9","9:16","21:9"]},"resolution":{"description":"Optional exact pixel resolution override","type":"string","enum":["720x720","720x960","960x720","1280x720","720x1280","1280x540"]},"outputResolution":{"default":"720p","description":"Output quality tier","type":"string","enum":["480p","720p"]},"upscaleResolution":{"description":"Upscale the generated video to 4K","type":"string","const":"4k"},"callBackUrl":{"description":"Optional Kinovi callback URL for API users","type":"string","format":"uri"},"mode":{"default":"keyframe","description":"Use keyframe image-to-video or reference-guided generation","type":"string","enum":["keyframe","reference"]},"urls":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"string","format":"uri"},"description":"Public image/video reference URLs"},"audioUrls":{"description":"Public audio reference URLs","maxItems":3,"type":"array","items":{"type":"string","format":"uri"}},"urlMediaTypes":{"description":"One media type per urls item, aligned by index. Include this for API clarity; Stable Studio also infers and persists it from URL content types before charging.","maxItems":12,"type":"array","items":{"type":"string","enum":["image","video"]}}},"required":["prompt","urls"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/arrow-1.1/vectorize":{"post":{"operationId":"generate_arrow-1.1_vectorize","summary":"Convert an image to SVG with Image to SVG. Provide any public image URL, then poll jobId for the SVG result. Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"default":"","description":"Ignored for image-to-SVG vectorization","type":"string"},"image":{"type":"string","format":"uri","description":"Image URL to vectorize"},"target_size":{"default":1024,"description":"Square resize target in pixels before vectorization","type":"integer","minimum":128,"maximum":4096},"auto_crop":{"default":false,"description":"Auto-crop to the dominant subject before vectorization","type":"boolean"},"max_output_tokens":{"default":4096,"description":"Upper bound for output token count","type":"integer","minimum":1,"maximum":131072},"temperature":{"default":1,"description":"Sampling temperature","type":"number","minimum":0,"maximum":2},"top_p":{"default":1,"description":"Nucleus sampling probability","type":"number","minimum":0,"maximum":1},"presence_penalty":{"default":0,"description":"Penalty for tokens already present in prior output","type":"number","minimum":-2,"maximum":2}},"required":["image"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/generate/arrow-1.1-max/vectorize":{"post":{"operationId":"generate_arrow-1.1-max_vectorize","summary":"Convert an image to SVG with Image to SVG Max. Provide any public image URL, then poll jobId for the SVG result. Returns an async job with a pollUrl. Poll the returned pollUrl with SIWX until the job is complete or failed.","tags":["Generate"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"10.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}],"has_checkout":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"default":"","description":"Ignored for image-to-SVG vectorization","type":"string"},"image":{"type":"string","format":"uri","description":"Image URL to vectorize"},"target_size":{"default":1024,"description":"Square resize target in pixels before vectorization","type":"integer","minimum":128,"maximum":4096},"auto_crop":{"default":false,"description":"Auto-crop to the dominant subject before vectorization","type":"boolean"},"max_output_tokens":{"default":4096,"description":"Upper bound for output token count","type":"integer","minimum":1,"maximum":131072},"temperature":{"default":1,"description":"Sampling temperature","type":"number","minimum":0,"maximum":2},"top_p":{"default":1,"description":"Nucleus sampling probability","type":"number","minimum":0,"maximum":1},"presence_penalty":{"default":0,"description":"Penalty for tokens already present in prior output","type":"number","minimum":-2,"maximum":2}},"required":["image"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string","const":"pending"},"type":{"type":"string"},"pollUrl":{"type":"string","format":"uri","description":"Poll this exact URL with SIWX until the job is complete or failed."}},"required":["success","jobId","status","type","pollUrl"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/jobs":{"get":{"operationId":"jobs","summary":"List jobs for authenticated user","tags":["Jobs"],"security":[{"siwx":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"input":{},"status":{"type":"string"},"progress":{"type":"number"},"result":{},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","input","status","progress","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"402":{"description":"Authentication Required"}}}},"/api/upload":{"post":{"operationId":"upload","summary":"Get a client token for direct upload to Vercel Blob","tags":["Upload"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","description":"Name of the file to upload"},"contentType":{"type":"string","enum":["image/jpeg","image/jpg","image/png","image/gif","image/webp","video/mp4","video/webm","video/quicktime","audio/mpeg","audio/mp3","audio/wav","audio/x-wav","audio/mp4","audio/aac","audio/ogg"],"description":"MIME type of the file"},"size":{"description":"File size in bytes (optional)","type":"number"}},"required":["filename","contentType"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string"},"clientToken":{"type":"string"},"pathname":{"type":"string"},"expiresAt":{"type":"string"},"curlExample":{"type":"string"}},"required":["uploadId","clientToken","pathname","expiresAt","curlExample"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/upload/confirm":{"post":{"operationId":"upload_confirm","summary":"Confirm upload with final blob URL","tags":["Upload"],"security":[{"siwx":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string","description":"Upload ID from the upload endpoint"},"blobUrl":{"type":"string","format":"uri","description":"Final blob URL from Vercel Blob upload"}},"required":["uploadId","blobUrl"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"upload":{"type":"object","properties":{"id":{"type":"string"},"blobUrl":{"type":"string"},"filename":{"type":"string"},"mediaType":{"type":"string"}},"required":["id","blobUrl","filename","mediaType"],"additionalProperties":false}},"required":["success","upload"],"additionalProperties":false}}}},"402":{"description":"Authentication Required"}}}}},"components":{"securitySchemes":{"siwx":{"type":"apiKey","in":"header","name":"SIGN-IN-WITH-X"}}}}