What Are the Visual Categories Supported by GPT-Image2? A Complete Developer Guide
GPT-Image2 supports 15 distinct visual categories—including UI, Scene, Product, Poster, Photo, Infographic, Illustration, History, Gallery, Document, Character, Brand, Architecture, Latest, and Other—each defined in the data/style-library.json configuration file with dedicated cover assets stored under data/images/category-covers/.
The freestylefly/awesome-gpt-image-2 repository organizes image generation capabilities into a structured taxonomy of visual themes. These categories function as style selectors that map user prompts to specialized rendering templates, enabling precise control over the generated output through a single category parameter in API requests.
Complete List of GPT-Image2 Visual Categories
The codebase enumerates 15 visual categories in data/style-library.json, each paired with a dedicated cover image in data/images/category-covers/. These categories span commercial, artistic, and technical use cases:
| Category | Typical Use Case | Cover Asset |
|---|---|---|
| UI | Dashboard layouts, mobile app interfaces, design systems | ui.jpg |
| Scene | Environmental renders, interior spaces, outdoor landscapes | scene.jpg |
| Product | E-commerce renders, packaging mockups, prototype visualizations | product.jpg |
| Poster | Event promotions, advertising graphics, campaign layouts | poster.jpg |
| Photo | Photorealistic imagery, portrait photography, lifestyle shots | photo.jpg |
| Infographic | Data visualizations, chart-based graphics, information design | infographic.jpg |
| Illustration | Hand-drawn styles, digital paintings, conceptual artwork | illustration.jpg |
| History | Period-accurate scenes, archival reconstructions, vintage aesthetics | history.jpg |
| Gallery | Curated art collections, museum-style presentations | gallery.jpg |
| Document | Report layouts, whitepaper designs, formal documentation | document.jpg |
| Character | Avatar design, mascot creation, figurative concept art | character.jpg |
| Brand | Corporate identity visuals, logo-centric imagery, brand guidelines | brand.jpg |
| Architecture | Building concepts, interior architecture, structural visualizations | architecture.jpg |
| Latest | Trending styles, newly curated generation templates | latest.jpg |
| Other | Experimental styles, miscellaneous visual formats | other.jpg |
Each entry in style-library.json binds these category keys to specific prompt templates that prepend or modify the user's base prompt to achieve the desired stylistic output.
How Categories Are Defined in the Source Code
The visual category system relies on two core data structures within the repository. The primary configuration lives in data/style-library.json, which stores the category metadata:
// data/style-library.json structure
[
{
"key": "ui",
"label": "UI Design",
"promptTemplate": "Modern user interface design, high fidelity mockup..."
},
{
"key": "architecture",
"label": "Architecture",
"promptTemplate": "Architectural visualization, photorealistic render..."
}
]
The frontend consumes this configuration in src/main.jsx, rendering a category selection interface that displays the corresponding cover images from data/images/category-covers/*.jpg as visual identifiers. When a user selects a category, the application passes the key value to the backend API.
On the backend, api/generate-image.js receives the category parameter and maps it to the appropriate template before forwarding the request to the GPT-Image service.
Using Visual Categories in API Requests
To generate images within a specific visual category, include the lowercase category key in the request body. The following examples demonstrate API usage for different visual styles:
Generating a UI mockup:
fetch('/api/generate-image', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
prompt: 'Create a modern dashboard UI with dark theme',
category: 'ui' // Maps to data/images/category-covers/ui.jpg
})
})
.then(res => res.json())
.then(data => console.log('Image URL:', data.imageUrl));
Generating photorealistic content:
fetch('/api/generate-image', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
prompt: 'A portrait of a woman in soft natural light',
category: 'photo'
})
});
Programmatically listing available categories:
import categories from '../data/style-library.json';
// Iterate through all 15 supported categories
categories.forEach(cat => {
console.log(`${cat.key}: ${cat.label}`);
});
Category Assets and Frontend Integration
The repository implements a visual selection system where each category displays a representative cover image. These assets reside in data/images/category-covers/ and follow the naming convention [category-key].jpg. For example, selecting the Architecture category displays architecture.jpg as the preview thumbnail.
In src/main.jsx, the UI component dynamically loads these images based on the key values defined in style-library.json, ensuring the frontend remains synchronized with the backend configuration. This coupling between the JSON schema and the filesystem assets guarantees that new categories added to the style library automatically inherit proper visual representation without requiring hardcoded frontend changes.
Summary
- 15 visual categories are supported by GPT-Image2, ranging from technical (UI, Document) to artistic (Illustration, Gallery) and commercial (Product, Brand) applications.
- Configuration source: All categories are defined in
data/style-library.jsonwithkey,label, andpromptTemplateproperties. - Visual assets: Each category maps to a cover image in
data/images/category-covers/(e.g.,product.jpg,history.jpg). - API integration: Pass the category key as a string value in the
categoryfield of your POST request toapi/generate-image.js. - Frontend rendering:
src/main.jsxconsumes the style library to render selectable category cards with preview imagery.
Frequently Asked Questions
How many visual categories does GPT-Image2 support?
GPT-Image2 supports 15 distinct visual categories: UI, Scene, Product, Poster, Photo, Infographic, Illustration, History, Gallery, Document, Character, Brand, Architecture, Latest, and Other. These are enumerated in the data/style-library.json file and cover use cases ranging from interface design to historical reconstructions.
Where are the visual category definitions stored?
The category definitions reside in data/style-library.json at the repository root. This JSON file stores each category's key (API identifier), label (display name), and promptTemplate (styling instructions). Associated cover images are stored in the data/images/category-covers/ directory.
How do I specify a visual category when generating an image?
Include the category parameter in your POST request body to api/generate-image.js. The value must match a valid key from style-library.json (e.g., "category": "architecture" or "category": "infographic"). The backend uses this value to apply the corresponding prompt template before processing the generation request.
Can I add custom visual categories to GPT-Image2?
While the repository ships with 15 predefined categories, you can extend the system by modifying data/style-library.json to include new entries with unique keys, labels, and prompt templates. You must also add corresponding cover images to data/images/category-covers/ following the [key].jpg naming convention to ensure proper UI rendering in src/main.jsx.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →