# GPT-Image2 Architecture and Space Templates: Complete Guide with JSON and Plain-Text Formats

> Explore GPT-Image2 architecture and space templates. Get plain-text prompts and JSON schemas for precise control over visualization and rendering quality. Download now from freestylefly/awesome-gpt-image-2.

- Repository: [苍何/awesome-gpt-image-2](https://github.com/freestylefly/awesome-gpt-image-2)
- Tags: architecture
- Published: 2026-08-24

---

**GPT-Image2 provides dual-format templates for architectural visualization that include both human-readable plain-text prompts and machine-parseable JSON schemas, enabling precise control over space type, materials, camera angles, and rendering quality.**

The freestylefly/awesome-gpt-image-2 repository ships with a dedicated **"建筑与空间"** (Architecture & Spaces) template family designed specifically for generating photorealistic architectural renders. These templates for architecture and spaces in GPT-Image2 are defined in [`docs/templates.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/docs/templates.md) and offer fine-grained control over environmental context, lighting scenarios, and material specifications while allowing the model to handle creative details like furniture layout.

## Template Structure and Schema Overview

Located at `docs/templates.md#tpl-architecture`, the architecture template system provides two interchangeable formats that share an identical semantic schema. You can choose between a **plain-text prompt** for chat-based interactions or a **JSON-structured prompt** for programmatic API calls.

### Plain-Text Template Format

The human-readable variant uses concise Chinese placeholders ideal for direct paste into chat interfaces. According to the source documentation, the template follows this structure:

```text
生成[空间类型]设计效果图，功能定位为[用途]。
风格：[现代简约/工业/新中式]，材质：[木/石/金属/玻璃]。
空间结构：[开敞/分区]，动线：[主通道说明]。
光线：[自然采光/人工照明方案]，时间：[白天/夜景]。
输出：写实建筑空间渲染图。

```

### JSON-Structured Template Format

The machine-friendly format enables automated pipelines and direct API integration. This structured approach is recommended when calling the backend endpoint defined in [`api/generate-image.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/api/generate-image.js).

```json
{
  "type": "Architectural Visualization",
  "space": {
    "type": "Modern Cabin Interior",
    "function": "Living room",
    "materials": "Exposed concrete, large floor-to-ceiling glass, warm timber accents"
  },
  "environment": "Nestled in a dense, snowy pine forest visible through the glass",
  "camera": {
    "angle": "Eye-level perspective, wide-angle lens",
    "lighting": "Golden hour, warm interior lights glowing, cool blue ambient light outside"
  },
  "render_quality": "Unreal Engine 5 style, hyper-realistic, 8k resolution, ray tracing"
}

```

## Core Schema Fields for Architectural Visualization

Both template formats share eight critical fields that control the final render output. When constructing your payload for GPT-Image2, specify these parameters to ensure architectural accuracy:

- **type**: Defines the generation task. Use `"Architectural Visualization"` for consistency with the template family.
- **space.type**: Declares the architectural style and structure, such as `"Modern Cabin Interior"` or `"Industrial Loft"`.
- **space.function**: Specifies the intended use, including `"Living room"`, `"Office"`, or `"Lobby"`.
- **space.materials**: Lists dominant construction finishes like `"Exposed concrete, large floor-to-ceiling glass, warm timber accents"`.
- **environment**: Provides narrative context for surrounding landscapes, for example, `"Nestled in a dense, snowy pine forest visible through the glass"`.
- **camera.angle**: Locks the perspective to prevent distortion. The documentation recommends `"Eye-level perspective, wide-angle lens"` for standard architectural views.
- **camera.lighting**: Controls time-of-day and light temperature, such as `"Golden hour, warm interior lights glowing, cool blue ambient light outside"`.
- **render_quality**: Specifies the target engine and resolution, typically `"Unreal Engine 5 style, hyper-realistic, 8k resolution, ray tracing"`.

## Implementation Examples

The repository provides reference implementations showing how to deploy these templates across different interfaces.

### Node.js API Integration with JSON Payload

The [`api/generate-image.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/api/generate-image.js) endpoint accepts the JSON template as a POST body. Here is a production-ready implementation that structures the request correctly:

```javascript
const fetch = require('node-fetch');

async function generateArchViz(payload) {
  const response = await fetch('https://api.your-gpt-image-service.com/generate', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(payload)
  });
  const result = await response.json();
  return result.imageUrl;
}

const archPayload = {
  type: "Architectural Visualization",
  space: {
    type: "Modern Cabin Interior",
    function: "Living room",
    materials: "Exposed concrete, large floor-to-ceiling glass, warm timber accents"
  },
  environment: "Nestled in a dense, snowy pine forest visible through the glass",
  camera: {
    angle: "Eye-level perspective, wide-angle lens",
    lighting": "Golden hour, warm interior lights glowing, cool blue ambient light outside"
  },
  render_quality: "Unreal Engine 5 style, hyper-realistic, 8k resolution, ray tracing"
};

generateArchViz(archPayload).then(url => console.log('Result:', url));

```

### Chat Interface Prompting

For users interacting through the frontend defined in [`src/main.jsx`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/src/main.jsx), the plain-text template supports direct natural language input. Populate the bracketed placeholders with your specific project details:

```text
生成现代简约风格的客厅设计效果图，功能定位为休闲交流空间。
材质：木/玻璃，空间结构：开放式，动线：从入口直接通向沙发区。
光线：自然采光，时间：白天。
输出：写实建筑空间渲染图。

```

## Best Practices from the Source Code

The [`docs/templates.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/docs/templates.md) file includes an "avoid-pitfalls" guide that highlights two critical techniques for achieving premium architectural renders:

**Lock the camera perspective** – Always specify an eye-level view in the `camera.angle` field to prevent distorted perspectives that break architectural realism.

**Contrast warm and cold lighting** – Combine warm interior lighting with cool exterior ambient light to create depth and premium visual quality. This technique is explicitly recommended in the template documentation for achieving cinematic architectural visualization.

## Frontend and Backend Integration Points

The complete workflow for GPT-Image2 architecture templates spans three key files in the repository:

- `docs/templates.md#tpl-architecture` – Stores the master template definitions and schema documentation.
- [`src/main.jsx`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/src/main.jsx) – Provides the React-based UI where users select or paste templates before submission.
- [`api/generate-image.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/api/generate-image.js) – Receives the structured payload and forwards it to the image generation service.

By customizing fields in the JSON payload or modifying the bracketed placeholders in the plain-text version, you can adapt the system to any architectural style, material palette, or lighting scenario required for concept work or client presentations.

## Summary

- GPT-Image2 architecture templates provide dual-format options: plain-text for chat interfaces and JSON for API integration.
- The schema includes eight controlled fields covering space type, materials, environment, camera angles, and rendering quality.
- File `docs/templates.md#tpl-architecture` contains the complete template specifications and anti-pitfall guidelines.
- The [`src/main.jsx`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/src/main.jsx) frontend and [`api/generate-image.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/api/generate-image.js) backend handle the template workflow from user input to image generation.
- Specific camera angles and contrasting lighting temperatures are required for high-quality architectural output.

## Frequently Asked Questions

### What file contains the architecture templates in GPT-Image2?

The complete architecture and space templates are defined in [`docs/templates.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/docs/templates.md) under the `#tpl-architecture` section. This file contains both the plain-text Chinese template and the JSON schema, along with implementation guidelines for the [`src/main.jsx`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/src/main.jsx) frontend and [`api/generate-image.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/api/generate-image.js) backend components.

### How do I switch between plain-text and JSON formats?

Both formats share the same semantic schema, so you can convert between them by mapping the eight core fields. Use the plain-text template for direct chat input in [`src/main.jsx`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/src/main.jsx), and switch to the JSON structure when calling [`api/generate-image.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/api/generate-image.js) programmatically. The JSON format is required for automated pipelines that supply fields like `space.materials` and `camera.lighting` through variables.

### What camera angle produces the best architectural renders?

According to the source documentation in [`docs/templates.md`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/docs/templates.md), you should specify `"Eye-level perspective, wide-angle lens"` in the `camera.angle` field. This prevents perspective distortion and maintains architectural accuracy, particularly for interior visualizations where vertical lines must remain true.

### Can I specify Unreal Engine 5 rendering quality?

Yes. Set the `render_quality` field to `"Unreal Engine 5 style, hyper-realistic, 8k resolution, ray tracing"` to achieve game-engine aesthetic quality. This parameter works in both the JSON payload sent to [`api/generate-image.js`](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/api/generate-image.js) and as a natural language instruction in the plain-text template's output specification line.