[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [RunDiffusion Photo Flux](https://spiral.ai/integrations/opencode/rundiffusion-photo-flux)

# How to Use RunDiffusion Photo Flux in opencode

RunDiffusion Photo Flux makes photographic portraits, product concepts, and cinematic stills from text. Its photo enhancer emphasizes skin and surface texture, with a recommended weight of 0.65 to 0.80.

|  |  |
| --- | --- |
| Model | RunDiffusion Photo Flux |
| Available through | fal |
| Category | Image |
| Price | $0.0585 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 RunDiffusion Photo Flux in opencode

- Read the homepage copy in this project, then use RunDiffusion Photo Flux to create a photographic hero concept at 1536 × 1024. Describe a concrete subject, soft side lighting, and space on the left for the heading.
- Use RunDiffusion Photo Flux to generate a 1024 × 1024 concept for the fictional desk lamp described in the product brief. Show brushed aluminum, a linen shade, and soft studio reflections from a three-quarter camera angle.
- Read the character brief and use RunDiffusion Photo Flux to make a fictional portrait at 1024 × 1536. Specify an 85 mm lens look, window light, visible skin texture, and a plain background.
- Use RunDiffusion Photo Flux to create a 1536 × 1024 cinematic still based on the opening scene in this project's script. Translate the scene into subject placement, camera angle, materials, and lighting.
- Use RunDiffusion Photo Flux to build a comparison of photo enhancer weights 0.65, 0.75, and 0.80 for a walnut chair with a woven seat. Keep the prompt, seed, and 1024 × 1024 size fixed, then make a contact sheet.

## How to set up RunDiffusion Photo Flux 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 RunDiffusion Photo Flux**: 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": "rundiffusion-fal/rundiffusion-photo-flux",
    "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 RunDiffusion Photo Flux on Spiral, shows the price and runs it.

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

## RunDiffusion Photo Flux tools and prices

- [Rundiffusion Photo Flux](https://spiral.ai/tools/fal/rundiffusion-fal/rundiffusion-photo-flux) (fal): $0.0585 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 |
| --- | --- | --- | --- |
| photo_lora_scale |  | 0.75 | LoRA Scale of the photo lora model |
| image_size |  | landscape_4_3 | The size of the generated image. |
| num_inference_steps | 1 to 50 | 28 | 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. |
| loras |  | [] | The LoRAs to use for the image generation. You can use any number of LoRAs and they will be merged together to generate the final image. |
| guidance_scale | 0 to 35 | 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. |

## What can you do with RunDiffusion Photo Flux in opencode?

Turn project briefs into photographic assets for design review. A coding agent can read project copy and plan compositions around the intended placement.

### Portrait concepts

Explore fictional character portraits with specific skin detail and lighting.

### Product photography concepts

Plan studio compositions for imagined products, including surface finishes and reflections.

### Material studies

Explore fabric, wood, plastic, and metal appearances under a defined light source.

### Film mood boards

Turn scene descriptions into photographic stills for discussing framing and lighting.

### Architectural concepts

Visualize imagined buildings with specified construction materials and camera viewpoints.

### Fashion shoot planning

Explore clothing textures, locations, and photographic treatments before a shoot.

## Overview

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

## RunDiffusion Photo Flux in other agents

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

## More opencode guides

- [Rembg Enhance](https://spiral.ai/integrations/opencode/rembg-enhance)
- [SAM 3 Image](https://spiral.ai/integrations/opencode/sam-3-image)
- [Recraft Vectorize](https://spiral.ai/integrations/opencode/recraft-vectorize)
- [SAM 3.1 Image](https://spiral.ai/integrations/opencode/sam-3-1-image)
- [Recraft V4.1 Vector](https://spiral.ai/integrations/opencode/recraft-v4-1-vector)
- [SAM 3.1 Image to RLE](https://spiral.ai/integrations/opencode/sam-3-1-image-to-rle)

## Questions about RunDiffusion Photo Flux in opencode

**Can opencode use RunDiffusion Photo Flux?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run RunDiffusion Photo Flux like any built-in tool.

**How much does RunDiffusion Photo Flux cost in opencode?**

$0.0585 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 opencode plan is separate.

**Do I need a fal account to use RunDiffusion Photo Flux in opencode?**

No. Spiral runs RunDiffusion Photo Flux on its own fal account. You sign in to Spiral once and never paste a key.

**How long does it take to set up RunDiffusion Photo Flux in opencode?**

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

**Does opencode wait while RunDiffusion Photo Flux runs?**

RunDiffusion Photo Flux runs in the background. opencode starts the run, checks on it and gives you the image when it's ready.

**What is RunDiffusion Photo Flux best at?**

Photographic portraits, product concepts, material studies, and cinematic stills. Its emphasis is believable skin, surfaces, and lighting.

**How should I prompt RunDiffusion Photo Flux?**

Describe the subject, material, lighting, lens, and camera angle. For example, specify brushed steel under soft side lighting rather than asking only for a realistic object.

**What is the maximum output resolution?**

The documented maximum is 1536 × 1536 pixels.

**What photo enhancer weight should I use?**

Start within the recommended 0.65 to 0.80 range. Compare results with the same prompt and seed while changing only the weight.

**Where does RunDiffusion Photo Flux struggle?**

Painterly styles and exact pose or layout control are weaker fits. Low resolutions and overly aggressive settings can also introduce artifacts.

