Spiral gives your agent every tool with one account. Browse the tools →

Windsurf · Image

How to Use Smart Resize in Windsurf

Smart Resize adapts existing artwork to new dimensions using Nano Banana Pro to recompose the layout. Use it for turning one campaign image into square, portrait, and landscape assets, then review the regenerated details.

Prompts to try with Smart Resize in Windsurf

Copy an example into Windsurf, or ask in your own words.

Use Smart Resize on public/images/hero.png to create a 1920x1080 image. Ask for empty space on the left for the headline, then preview it in the hero component.

Smart ResizeWindsurf
Try asking
  • Use Smart Resize on assets/campaign.png to create 1024x1024 and 768x1344 images. Leave the extra instruction empty and show both beside the source for review.

  • Use Smart Resize to adapt public/images/article-cover.png to 1200x630. Save the result beside the original and verify the finished dimensions.

  • Use Smart Resize on assets/product-promo.png to make a 1024x1024 image. Request that the whole product remain visible, then compare its details with the source.

  • Use Smart Resize on public/images/newsletter-art.png to create a 1200x400 banner. Request a centered subject and preview the result in the email template.

How to set up Smart Resize in Windsurf

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. Add the server

    Open the Customize page from the Agents window and click MCPs. Under This computer, open the config file, or edit it directly: ~/.config/devin/mcp_config.json on macOS and Linux, %APPDATA%\devin\mcp_config.json on Windows. Add this:

    {
      "mcpServers": {
        "spiral": {
          "url": "https://api.spiral.ai/mcp"
        }
      }
    }
  2. Sign in

    Click Authenticate on the Spiral server in Customize › MCPs, or let the agent call Spiral once: your browser opens. Sign in to Spiral, pick the organization and click Authorize. No API key.

    devin mcp login spiral
  3. Check it

    Spiral is listed under This computer in Customize › MCPs. From the terminal:

    devin mcp list

Use the Spiral skill

  1. Send Windsurf this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run Smart Resize

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "fal",
        "model": "fal-ai/smart-resize",
        "input": {
          "image_url": "https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png",
          "target_sizes": [
            "<target_sizes>"
          ]
        }
      }'

Then paste one of the prompts above: Windsurf finds Smart Resize on Spiral, shows the price and runs it.

Smart Resize providers and prices

Spiral runs Smart Resize through fal. Open a card for today's price, with every fee included.

falImage
Smart Resize
fal-ai/smart-resize

Settings you can ask for

Smart Resize works from your image URL and prompt. Ask Windsurf for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Number of images per size1 to 41

The number of nano-banana-pro variants to produce for each target size. The response images list will contain `len(target_sizes) * num_images_per_size` images in total.

Resolution1K, 2K, or 4K1K

Hint for the minimum resolution tier to use internally. The smart-resize algorithm may pick a higher tier automatically when the requested target size is too large for this tier. This field does not affect the final output dimensions — those come from `target_sizes`.

Output formatjpeg, png, or webppng

The output image format.

Safety tolerance1 to 64

The safety tolerance level applied to the inner nano-banana-pro /edit calls. Higher numbers loosen safety filtering.

Seeda whole number

Optional random seed forwarded to the inner nano-banana-pro /edit calls for reproducibility. The same seed is used for every target size when set.

Every API field of Smart Resize is on its tool page: open its card above.

What can you do with Smart Resize in Windsurf?

Adapt project artwork to the dimensions your interface needs. Your coding agent can prepare the assets and compare their framing with the source before placing them in the page.

Campaign assets in several shapes

Adapt one existing campaign image into square, portrait, and landscape layouts. Review the subject placement and any embedded copy.

Website hero artwork

Recompose an existing illustration or photo for a wide hero slot, with an instruction to leave room for the page headline.

Product promotion images

Turn existing product artwork into assets for different placements. Compare the regenerated product details with the source before approval.

Article preview images

Adapt an article's existing lead image to a landscape sharing image and a square preview.

Event promotion artwork

Reframe an existing event graphic for horizontal and vertical placements. Check dates, names, and logos against the original.

Email banner artwork

Adapt an existing campaign visual to an exact email banner size, requesting a composition that keeps the main subject visible.

Questions about Smart Resize in Windsurf

Can Windsurf use Smart Resize?

Yes. Add Spiral to Windsurf as an MCP server, and Windsurf can find and run Smart Resize like any built-in tool.

How much does Smart Resize cost in Windsurf?

Up to $0.26 per run at the default inputs. `resolution`: 1K (default) $0.26, 2K $0.26, 4K $0.52. Each item in `target_sizes` adds $0.195. $0.195 per unit of `num_images_per_size`. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Windsurf plan is separate.

Do I need a fal account to use Smart Resize in Windsurf?

No. Spiral runs Smart Resize on its own fal account. You sign in to Spiral once and never paste a key.

How long does it take to set up Smart Resize in Windsurf?

About two minutes: add the server, then sign in, then check it.

Does Windsurf wait while Smart Resize runs?

Smart Resize runs in the background. Windsurf starts the run, checks on it and gives you the image when it's ready.

What is Smart Resize good for?

Adapting existing artwork to different shapes and exact pixel sizes. Useful examples include turning a landscape campaign image into square posts, portrait ads, and website banners.

How does Smart Resize change the composition?

It uses Nano Banana Pro to regenerate the image for the new layout, then center-crops the result to the requested dimensions. Review the framing before approving the output.

Will Smart Resize preserve every detail exactly?

Treat the result as regenerated artwork. Because the process recomposes the image, review text, logos, and product details; use a conventional resize or crop when identical source pixels are required.

What should I write in the extra instruction?

Leave it empty when your priority is preserving the original content. When you need a layout change, give a specific direction such as keeping the product centered or leaving space above the subject.

Does the resolution setting determine the finished image size?

No. The requested width and height determine the finished dimensions; the resolution setting guides the internal generation tier.

Get started

Start using Smart Resize in Windsurf

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into Windsurf:

Set up Windsurf

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options