[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [FLUX.1 Kontext Pro Text to Image](https://spiral.ai/integrations/opencode/flux-1-kontext-pro-text-to-image)

# How to Use FLUX.1 Kontext Pro Text to Image in opencode

Use FLUX.1 Kontext Pro Text to Image for photographic concepts and illustrations from a written description. Unlike FLUX.1 Kontext Pro, it starts without a reference image; Max Text to Image gives typography and detailed instructions more emphasis.

|  |  |
| --- | --- |
| Model | FLUX.1 Kontext Pro Text to Image |
| Available through | fal |
| Category | Image |
| Price | $0.052 per image. Billed on `num_images`, default 1. |
| Returns | image |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with FLUX.1 Kontext Pro Text to Image in opencode

- Read the homepage copy and use FLUX.1 Kontext Pro Text to Image to create a 16:9 editorial illustration of a bicycle repair bench, with warm window light and open space on the left for the page heading.
- Read the game's character brief and use FLUX.1 Kontext Pro Text to Image to create a portrait concept of its lighthouse keeper. Show a weathered yellow coat, a thoughtful expression, and a pencil illustration style.
- Use FLUX.1 Kontext Pro Text to Image to create a square poster concept for the project's community garden event. Show illustrated vegetables and the exact headline 'GROW TOGETHER'; inspect the lettering afterward.
- Generate a product photo with FLUX.1 Kontext Pro Text to Image: a matte black water bottle on wet slate, soft morning light, 1:1. Tell me the price first. Save the result in ./assets.
- Make four logo concepts for a coffee brand called "Northline" with FLUX.1 Kontext Pro Text to Image.

## How to set up FLUX.1 Kontext Pro Text to Image in opencode

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

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode 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.1 Kontext Pro 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-pro/kontext/text-to-image",
    "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: opencode finds FLUX.1 Kontext Pro Text to Image on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/opencode

## FLUX.1 Kontext Pro Text to Image tools and prices

- [FLUX.1 Kontext \[pro\] · Text to Image](https://spiral.ai/tools/fal/fal-ai/flux-pro/kontext/text-to-image) (fal): $0.052 per image. Billed on `num_images`, default 1.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| 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 | 1 to 20 | 3.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 | jpeg | The format of the generated image. |
| safety_tolerance | 1, 2, 3, 4, 5, 6 | 2 | The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. |
| enhance_prompt |  | false | Whether to enhance the prompt for better results. |

## What can you do with FLUX.1 Kontext Pro Text to Image in opencode?

Turn project briefs into illustrations, product concepts, and other image assets with FLUX.1 Kontext. A coding agent can use the project's content to write specific visual requests and compare results with the intended design.

### Article illustrations

Create an illustration from an article brief, specifying the subject, medium, palette, and room for a separately added headline.

### Product photography concepts

Explore a proposed product scene from a written description, such as a ceramic mug on a kitchen counter in soft morning light.

### Event poster concepts

Generate poster artwork with a specified scene and short headline. Review the lettering before using the design.

### Character concept art

Develop a character's initial appearance from a description of clothing, expression, setting, and illustration style.

## Overview

- [fal](https://spiral.ai/providers/fal)
- [All opencode guides](https://spiral.ai/integrations/opencode)

## FLUX.1 Kontext Pro Text to Image in other agents

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

## More opencode guides

- [FLUX.1 Kontext Pro Multi](https://spiral.ai/integrations/opencode/flux-1-kontext-pro-multi)
- [FLUX.1 Krea Dev](https://spiral.ai/integrations/opencode/flux-1-krea-dev)
- [FLUX.1 Kontext Pro](https://spiral.ai/integrations/opencode/flux-1-kontext-pro)
- [FLUX.1 Krea LoRA](https://spiral.ai/integrations/opencode/flux-1-krea-lora)
- [FLUX.1 Kontext Max Text to Image](https://spiral.ai/integrations/opencode/flux-1-kontext-max-text-to-image)
- [FLUX.1 Krea Redux](https://spiral.ai/integrations/opencode/flux-1-krea-redux)

## Questions about FLUX.1 Kontext Pro Text to Image in opencode

**Can opencode use FLUX.1 Kontext Pro Text to Image?**

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

**How much does FLUX.1 Kontext Pro Text to Image cost in opencode?**

$0.052 per image. 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 opencode plan is separate.

**Do I need a fal account to use FLUX.1 Kontext Pro Text to Image in opencode?**

No. Spiral runs FLUX.1 Kontext Pro 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.1 Kontext Pro Text to Image in opencode?**

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

**Does opencode wait while FLUX.1 Kontext Pro Text to Image runs?**

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

**When should I choose Pro or Max?**

Choose Pro for iterative visual work and a balance of speed and quality. Choose Max when typography and following detailed instructions carry more weight.

**What resolution does FLUX.1 Kontext produce?**

Outputs are approximately 1 megapixel. A square text-to-image result defaults to 1024 by 1024 pixels; a wider or taller shape changes the dimensions within roughly that pixel budget.

**Can FLUX.1 Kontext make illustrations as well as realistic images?**

Yes. Describe the intended medium, such as a photograph, pencil illustration, or painting, along with the subject and composition.

**Can I rely on every word in an image being correct?**

Review the result before using it. Max emphasizes typography, but FLUX.1 Kontext can still miss specific instructions.

**What should I include in a visual brief?**

Name the subject, setting, visual style, lighting, and composition you want. Make requirements concrete, such as a red ceramic cup on a wooden table beside a window.

