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

VS Code · ImageReleased 2024-08-01

How to Use FLUX.1 Schnell in VS Code

FLUX.1 Schnell turns text descriptions into image drafts for exploring layouts, scenes, and visual styles. Its 1 to 4 step design makes it a practical choice for trying several ideas before selecting one to refine.

Prompts to try with FLUX.1 Schnell in VS Code

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

Read the homepage copy in this project and use FLUX.1 Schnell to generate a 1024 by 1024 illustration concept at four steps. Describe one concrete scene that communicates the main benefit, with open space above the subject for a heading.

FLUX.1 SchnellVS Code
Try asking
  • Use FLUX.1 Schnell to create three separate square artwork drafts for the gardening app in this project. Show seedlings on a windowsill in watercolor, paper collage, and pencil styles, using four steps per draft.

  • Read the newest blog draft in this project. Use FLUX.1 Schnell to generate a 1024 by 1024 editorial illustration at four steps, based on one visual metaphor from the article, and save the image beside the draft.

  • Use FLUX.1 Schnell to generate a square concept image for this project's coffee shop page: a red ceramic cup on a walnut counter, morning light through a window, eye-level composition. Use four steps and keep the scene description concise.

  • Use FLUX.1 Schnell to draft a 1024 by 1024 poster for the reading event described in this project's content. Request only the headline "READ TOGETHER" in large lettering, use four steps, and flag spelling errors for review.

How to set up FLUX.1 Schnell in VS Code

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

Use Spiral's MCP server

  1. Add the hosted server

    Use Add to VS Code on the console's Agents & MCP page, or run:

    code --add-mcp '{"name":"spiral","type":"http","url":"https://api.spiral.ai/mcp"}'
  2. Sign in

    VS Code asks you to sign in when it first starts the server: sign in to Spiral and click Authorize. No API key. Run MCP: List Servers from the Command Palette to check that Spiral is running.

Use the Spiral skill

  1. Send VS Code 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 FLUX.1 Schnell

    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/flux-1/schnell",
        "input": {
          "prompt": "Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture…"
        }
      }'

Then paste one of the prompts above: VS Code finds FLUX.1 Schnell on Spiral, shows the price and runs it.

FLUX.1 Schnell providers and prices

Spiral runs FLUX.1 Schnell through fal and fal. Open a card for today's price, with every fee included. Name one in your prompt, or let VS Code pick.

falImage
falImage

Settings you can ask for

FLUX.1 Schnell works from your prompt. Ask VS Code for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Number of inference steps1 to 124

The number of inference steps to perform.

Seeda whole number

The same seed and the same prompt given to the same version of the model

will output the same image every time.

Guidance scale (CFG)1 to 203.5

The CFG (Classifier Free Guidance) scale is a measure of how close you want

the model to stick to your prompt when looking for a related image to show you.

Number of images1 to 41

The number of images to generate.

Output formatjpeg or pngjpeg

The format of the generated image.

Accelerationnone, regular, or highnone

The speed of the generation. The higher the speed, the faster the generation.

Every API field of FLUX.1 [schnell] · Text to Image is on its tool page: open its card above.

What can you do with FLUX.1 Schnell in VS Code?

Create image drafts that fit the page or app you are building. A coding agent can turn project copy into focused visual briefs, then help compare the results with the intended layout.

Editorial illustration concepts

Turn an article's main idea into several visual metaphors. Compare the compositions before commissioning or finishing the selected artwork.

Product staging concepts

Describe an imagined product and try different surfaces, backgrounds, and lighting. Use the results to plan a shoot or discuss an art direction.

Website artwork drafts

Explore illustrations with deliberate empty space for page copy. Test how the artwork fits the layout before refining it.

Social campaign concepts

Generate square artwork around a campaign theme. Compare visual approaches and add final campaign copy during layout.

Poster lettering experiments

Request a poster with a short quoted headline. Review the lettering and composition before preparing the final design.

Game environment mood boards

Explore written descriptions of forests, interiors, or fictional cities. Compare atmosphere, lighting, and materials during early art planning.

Packaging direction studies

Describe an imagined package in several visual styles. Use the images to discuss color, materials, and presentation before drawing production artwork.

Questions about FLUX.1 Schnell in VS Code

Can VS Code use FLUX.1 Schnell?

Yes. Add Spiral to VS Code as an MCP server, and VS Code can find and run FLUX.1 Schnell like any built-in tool.

How much does FLUX.1 Schnell cost in VS Code?

$0.0039 per megapixel. `image_size` presets count as 1 MP; custom sizes round up to whole megapixels. Billed on `num_images`, default 1. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your VS Code plan is separate.

Do I need a fal account to use FLUX.1 Schnell in VS Code?

No. Spiral runs FLUX.1 Schnell on its own fal account. You sign in to Spiral once and never paste a key.

How long does it take to set up FLUX.1 Schnell in VS Code?

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

Does VS Code wait while FLUX.1 Schnell runs?

FLUX.1 Schnell runs in the background. VS Code starts the run, checks on it and gives you the image when it's ready.

What is FLUX.1 Schnell useful for?

Use it to explore image concepts from written descriptions, such as editorial illustrations, product staging ideas, and campaign artwork. Its 1 to 4 step design suits comparing several directions before choosing one.

How many steps should I use?

Start with four steps as a practical baseline. FLUX.1 Schnell was designed to generate images in 1 to 4 steps, so compare results within that range before increasing the count.

How should I write a prompt?

Describe the scene in natural sentences, including the subject, setting, composition, and lighting. Keep the brief focused: FLUX.1 Schnell has a 256-token prompt limit.

Can FLUX.1 Schnell put words in an image?

You can request lettering by putting the exact wording in quotation marks. Check the generated spelling before using the image, since FLUX.1 Schnell can miss prompt details.

What image resolutions does FLUX.1 Schnell support?

Black Forest Labs describes support across different aspect ratios at 0.1 to 2.0 megapixels. A 1024 by 1024 square is about one megapixel and falls within that range.

Get started

Start using FLUX.1 Schnell in VS Code

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

Paste this into VS Code:

Set up VS Code

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