[Integrations](https://spiral.ai/integrations) › [Claude Code](https://spiral.ai/integrations/claude-code) › [FLUX Kontext LoRA Text to Image](https://spiral.ai/integrations/claude-code/flux-kontext-lora-text-to-image)

# How to Use FLUX Kontext LoRA Text to Image in Claude Code

FLUX Kontext LoRA Text to Image creates new images from written briefs, with LoRAs for a learned style, identity, or product. Unlike FLUX Kontext LoRA Image to Image, it starts from text rather than an existing picture.

|  |  |
| --- | --- |
| Model | FLUX Kontext LoRA Text to Image |
| Available through | fal |
| Category | Image |
| Price | $0.0455 per megapixel. `image_size` presets count as 1 MP; custom sizes round up to whole megapixels. Billed on `num_images`, default 1. |
| Returns | image |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with FLUX Kontext LoRA Text to Image in Claude Code

- Read the article about urban gardening in this project. Use FLUX Kontext LoRA Text to Image to create a 1280 by 720 illustration of a rooftop vegetable garden at sunrise, with the planting beds on the right and open sky on the left for the article title.
- Inspect this project's empty-state component and color tokens. Use FLUX Kontext LoRA Text to Image to create a square illustration of an open sketchbook beside a pencil, using the project's colors. Add the chosen image to the component and keep its message as HTML.
- Read the game's environment brief. Use FLUX Kontext LoRA Text to Image to draft a landscape scene of a coastal trading town built around a stone lighthouse, viewed from the harbor at dusk. Save it with the concept art.
- Use FLUX Kontext LoRA Text to Image with the compatible style LoRA specified in the project's art brief. Generate a landscape illustration of a cyclist crossing a wooden bridge beside a river, and place it in the onboarding screen with the heading rendered separately.
- Use FLUX Kontext LoRA Text to Image to compare the compatible LoRA in our art configuration at strengths of 0.6 and 1.0. Keep the prompt identical: a ceramic teapot on a wooden table beside a sunlit window. Save both images for design review.

## How to set up FLUX Kontext LoRA Text to Image in Claude Code

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

### Use Spiral's MCP server

1. **Add the hosted server**: This adds Spiral to the current project. Add `--scope user` to use it in every project.

```bash
claude mcp add --transport http spiral https://api.spiral.ai/mcp
```

2. **Sign in**: Start `claude`, type `/mcp`, choose spiral and Authenticate. Sign in to Spiral in the browser and click Authorize. No API key.

### Use the Spiral skill

1. **Send Claude 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.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run FLUX Kontext LoRA Text to Image**: One request; the result comes back by polling or a webhook.

```bash
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-kontext-lora/text-to-image",
    "input": {
      "prompt": "Mount Fuji with cherry blossoms in the foreground, clear sky, peaceful spring day, soft natural light, realistic landscape."
    }
  }'
```

Then paste one of the prompts above: Claude Code finds FLUX Kontext LoRA Text to Image on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/claude-code

## FLUX Kontext LoRA Text to Image tools and prices

- [Flux Kontext Lora · Text to Image](https://spiral.ai/tools/fal/fal-ai/flux-kontext-lora/text-to-image) (fal): $0.0455 per megapixel. `image_size` presets count as 1 MP; custom sizes round up to whole megapixels. Billed on `num_images`, default 1.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| image_size |  | landscape_4_3 | The size of the generated image. |
| num_inference_steps | 10 to 50 | 30 | The number of inference steps to perform. |
| seed |  | — | The same seed and the same prompt given to the same version of the model will output the same image every time. |
| guidance_scale | 0 to 20 | 2.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. |
| num_images | 1 to 4 | 1 | The number of images to generate. |
| output_format | jpeg, png | png | The format of the generated image. |

## What can you do with FLUX Kontext LoRA Text to Image in Claude Code?

Create illustrations from the project's written content and design requirements with FLUX Kontext LoRA. A coding agent can place the chosen artwork in the interface and keep labels editable in code.

### Editorial illustrations

Turn an article brief into an illustration. Describe the central idea as a concrete scene, then compare compositions.

### Brand artwork

Use a compatible brand style LoRA to draft campaign artwork. Review the results against the brand brief before choosing a direction.

### Product scene concepts

Explore settings for a product represented by a compatible LoRA. Treat the images as concepts and check product details before publication.

### Presentation artwork

Generate landscape illustrations at 1280 by 720 pixels, with open space reserved for slide titles added later.

### Game environment studies

Draft locations from written scene descriptions. Use a compatible style LoRA when exploring a particular visual treatment.

### Website illustrations

Create artwork for an article header or empty state from a written design brief. Add interface labels separately.

### Style comparisons

Generate the same scene with different compatible LoRAs or adapter strengths to compare art directions.

## Overview

- [fal](https://spiral.ai/providers/fal)
- [All Claude Code guides](https://spiral.ai/integrations/claude-code)

## FLUX Kontext LoRA Text to Image in other agents

- [Amp](https://spiral.ai/integrations/amp/flux-kontext-lora-text-to-image)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/flux-kontext-lora-text-to-image)
- [Claude](https://spiral.ai/integrations/claude-desktop/flux-kontext-lora-text-to-image)
- [Cline](https://spiral.ai/integrations/cline/flux-kontext-lora-text-to-image)
- [Codex](https://spiral.ai/integrations/codex/flux-kontext-lora-text-to-image)
- [Cursor](https://spiral.ai/integrations/cursor/flux-kontext-lora-text-to-image)
- [Devin](https://spiral.ai/integrations/devin/flux-kontext-lora-text-to-image)
- [dots](https://spiral.ai/integrations/dots/flux-kontext-lora-text-to-image)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/flux-kontext-lora-text-to-image)
- [Gemini](https://spiral.ai/integrations/gemini/flux-kontext-lora-text-to-image)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/flux-kontext-lora-text-to-image)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/flux-kontext-lora-text-to-image)
- [goose](https://spiral.ai/integrations/goose/flux-kontext-lora-text-to-image)
- [Grok](https://spiral.ai/integrations/grok/flux-kontext-lora-text-to-image)
- [Grok Build](https://spiral.ai/integrations/grok-build/flux-kontext-lora-text-to-image)
- [Hermes](https://spiral.ai/integrations/hermes/flux-kontext-lora-text-to-image)
- [Instinct](https://spiral.ai/integrations/instinct/flux-kontext-lora-text-to-image)
- [Manus](https://spiral.ai/integrations/manus/flux-kontext-lora-text-to-image)
- [Muse](https://spiral.ai/integrations/muse/flux-kontext-lora-text-to-image)
- [Muse Code](https://spiral.ai/integrations/muse-code/flux-kontext-lora-text-to-image)
- [n8n](https://spiral.ai/integrations/n8n/flux-kontext-lora-text-to-image)
- [Notion](https://spiral.ai/integrations/notion/flux-kontext-lora-text-to-image)
- [OpenClaw](https://spiral.ai/integrations/openclaw/flux-kontext-lora-text-to-image)
- [opencode](https://spiral.ai/integrations/opencode/flux-kontext-lora-text-to-image)
- [Perplexity](https://spiral.ai/integrations/perplexity/flux-kontext-lora-text-to-image)
- [Raycast](https://spiral.ai/integrations/raycast/flux-kontext-lora-text-to-image)
- [VS Code](https://spiral.ai/integrations/vscode/flux-kontext-lora-text-to-image)
- [Windsurf](https://spiral.ai/integrations/windsurf/flux-kontext-lora-text-to-image)
- [Zapier](https://spiral.ai/integrations/zapier/flux-kontext-lora-text-to-image)

## More Claude Code guides

- [FLUX 3 Klein Text to Image](https://spiral.ai/integrations/claude-code/flux-3-klein-text-to-image)
- [FLUX.1 Dev](https://spiral.ai/integrations/claude-code/flux-1-dev)
- [FLUX 3 Klein Image Edit](https://spiral.ai/integrations/claude-code/flux-3-klein-image-edit)
- [FLUX.1 Dev LoRA](https://spiral.ai/integrations/claude-code/flux-1-dev-lora)
- [FLUX 3 Image Edit](https://spiral.ai/integrations/claude-code/flux-3-image-edit)
- [FLUX.1 Kontext Max](https://spiral.ai/integrations/claude-code/flux-1-kontext-max)

## Questions about FLUX Kontext LoRA Text to Image in Claude Code

**Can Claude Code use FLUX Kontext LoRA Text to Image?**

Yes. Add Spiral to Claude Code as an MCP server, and Claude Code can find and run FLUX Kontext LoRA Text to Image like any built-in tool.

**How much does FLUX Kontext LoRA Text to Image cost in Claude Code?**

$0.0455 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 Claude Code plan is separate.

**Do I need a fal account to use FLUX Kontext LoRA Text to Image in Claude Code?**

No. Spiral runs FLUX Kontext LoRA Text to Image 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 Kontext LoRA Text to Image in Claude Code?**

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

**Does Claude Code wait while FLUX Kontext LoRA Text to Image runs?**

FLUX Kontext LoRA Text to Image runs in the background. Claude Code starts the run, checks on it and gives you the image when it's ready.

**What is FLUX Kontext LoRA good for?**

Use it for personalized illustrations, visual style studies, and product concepts. A compatible LoRA can apply a learned style, identity, or product to new generations.

**Does FLUX Kontext LoRA Text to Image edit an existing picture?**

It generates a new picture from a written description. For changes to an existing picture, use FLUX Kontext LoRA Image to Image.

**How should I write a prompt?**

Write a short paragraph describing the picture you want, rather than a string of keywords. State desired details positively, such as an empty tabletop, instead of relying on negative prompts.

**What does LoRA strength change?**

It changes the adapter weight applied before merging with the base model. Compare two strengths with the same brief to judge how the learned treatment affects the result.

**Can I request an exact output size?**

The documentation supports custom width and height and gives 1280 by 720 pixels as an example. Use that landscape size when drafting artwork for a presentation or video thumbnail.

