# How to Specify Brushwork Style for Illustration & Art in GPT-Image2

> Learn how to specify brushwork style for Illustration & Art in GPT-Image2 by using brushMaterial and brushStrokes parameters with the illustration style ID for unique artistic outputs.

- Repository: [苍何/awesome-gpt-image-2](https://github.com/freestylefly/awesome-gpt-image-2)
- Tags: how-to-guide
- Published: 2026-08-26

---

**To specify brushwork style for Illustration & Art in GPT-Image2, pass the `brushMaterial` and `brushStrokes` parameters alongside the `illustration` style ID, which the `scripts/generate-style-skill.mjs` utility merges into the final prompt template defined in [`data/style-library.json`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/data/style-library.json).**

The `freestylefly/awesome-gpt-image-2` repository provides a structured style library that enables granular control over generated artwork. When working with the **Illustration & Art** category, you can specify precise brushwork characteristics—such as oil, watercolor, or ink techniques—by leveraging specific prompt arguments that the system injects into the base template before calling the image generation API.

## Understanding the Style Library Architecture

The **style library** ([`data/style-library.json`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/data/style-library.json)) serves as the central catalog that drives the visual language of every generated image. For the Illustration & Art category, the engine targets the *Illustration* style entry (ID: `illustration`).

According to the source code, brushwork control relies on four key prompt arguments:

- **`brushMaterial`** — Defines the medium the virtual brush uses, such as `oil`, `watercolor`, `ink`, `dry-brush`, or `gouache`.
- **`brushStrokes`** — Characterizes the stroke behavior using descriptors like `vigorous`, `delicate`, `freehand`, or `calligraphic`.
- **`palette`** — Optional color scheme qualifier (e.g., `warm`, `cool`) that influences the color selection.
- **`mood`** — Optional atmospheric quality (e.g., `serene`, `heroic`) that affects the overall emotional tone.

These fields are merged into the base prompt template defined in [`agents/skills/gpt-image-2-style-library/references/style-library.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/agents/skills/gpt-image-2-style-library/references/style-library.md). The merging logic executes in `scripts/generate-style-skill.mjs`, which reads the JSON library, selects the Illustration entry, and constructs the final prompt for the [`api/generate-image.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/api/generate-image.js) handler.

## The Brushwork Specification Workflow

The process follows five distinct stages:

1. **Select the category** — Use `cat-illustration` for Illustration & Art.
2. **Pick the style** — Specify the style ID `"illustration"`.
3. **Supply brush arguments** — Include `brushMaterial`, `brushStrokes`, and optionally `palette` and `mood`.
4. **Generate the prompt** — The skill generator assembles text like: `illustration, oil brush, vigorous brushstrokes, warm palette, serene mood, <subject>`.
5. **Execute generation** — The assembled prompt routes through [`api/generate-image.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/api/generate-image.js) to the underlying GPT-Image model.

Because brushwork is expressed as plain-text tokens, the model interprets these descriptors and renders appropriate textures—such as visible wet-brush effects for watercolor or bold ink lines for calligraphic styles.

## Practical Implementation Examples

### Direct API Call via Node.js

```javascript
// demo-brushwork.js
import fetch from 'node-fetch';

const payload = {
  style: 'illustration',
  subject: 'a futuristic city skyline at sunset',
  brushMaterial: 'watercolor',
  brushStrokes: 'delicate',
  palette: 'cool',
  mood: 'dreamy'
};

fetch('https://your-deployment.com/api/generate-image', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify(payload)
})
  .then(r => r.json())
  .then(data => console.log('Image URL:', data.imageUrl))
  .catch(console.error);

```

The [`api/generate-image.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/api/generate-image.js) handler parses this JSON body, combines the fields with the Illustration template, and forwards the final prompt to the GPT-Image backend.

### CLI Skill Generator

```bash
npm run generate-style-skill \
  -- --style illustration \
  --subject "a tranquil bamboo forest" \
  --brushMaterial ink \
  --brushStrokes "freehand" \
  --palette "green" \
  --mood "peaceful"

```

The `scripts/generate-style-skill.mjs` script reads these arguments, looks up the Illustration entry in [`data/style-library.json`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/data/style-library.json), and assembles the complete prompt string.

### Inline Raw Prompt Syntax

If you prefer manual prompt construction, use this syntax:

```

illustration, brush material: oil, brush strokes: vigorous, palette: warm, mood: heroic, a heroic samurai on a stormy battlefield

```

Passing this string to the image generation endpoint yields oil-paint style output with bold, dynamic strokes.

## Key Source Files

- **[`data/style-library.json`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/data/style-library.json)** — Central catalog containing the Illustration entry and template keywords.
- **[`agents/skills/gpt-image-2-style-library/references/style-library.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/agents/skills/gpt-image-2-style-library/references/style-library.md)** — Human-readable reference documenting prompt composition including brush-related fields.
- **`scripts/generate-style-skill.mjs`** — CLI tool that merges user arguments with library templates.
- **[`api/generate-image.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/api/generate-image.js)** — Server-side handler that builds prompts and interfaces with the GPT-Image model.

## Summary

- The **Illustration & Art** category uses the `illustration` style ID from [`data/style-library.json`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/data/style-library.json).
- Control brushwork through **`brushMaterial`** (medium) and **`brushStrokes`** (technique) parameters.
- Optional **`palette`** and **`mood`** arguments refine color schemes and atmosphere.
- The **`scripts/generate-style-skill.mjs`** utility automates prompt assembly by merging your inputs with the base template.
- Final prompt generation occurs in **[`api/generate-image.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/api/generate-image.js)**, which forwards structured text to the GPT-Image model.

## Frequently Asked Questions

### What values are valid for brushMaterial and brushStrokes?

Valid values include standard artistic media such as `oil`, `watercolor`, `ink`, `dry-brush`, and `gouache` for `brushMaterial`, and descriptive terms like `vigorous`, `delicate`, `freehand`, or `calligraphic` for `brushStrokes`. The model interprets these as plain-text tokens to render appropriate textures.

### Can I use brushwork parameters with other categories besides Illustration?

The `brushMaterial` and `brushStrokes` fields are specifically designed for the Illustration style within the Illustration & Art category. Other categories in [`data/style-library.json`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/data/style-library.json) utilize different parameter sets optimized for their respective visual languages.

### Do I need to specify palette and mood, or are they optional?

Both `palette` and `mood` are optional arguments. If omitted, the GPT-Image model selects color schemes and atmospheric qualities based on the subject matter and brushwork style you have defined.

### How does the system handle conflicting style parameters?

The `scripts/generate-style-skill.mjs` script performs a structured merge of user-provided arguments with the base Illustration template. Explicit user values override defaults, while undefined optional parameters are excluded from the final prompt sent to [`api/generate-image.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/api/generate-image.js).