Create Stunning Images in Le Corbusier Style with Corbu

25 Apr 2025
Create Stunning Images in Le Corbusier Style with Corbu

Corbu is a powerful tool that allows developers to generate breathtaking images inspired by the architectural style of Le Corbusier, utilizing advanced techniques like Stable Diffusion XL. This service brings speed and simplification to the image generation process, making it accessible for developers looking to enhance their applications with visually stunning artwork. With customizable options, you can fine-tune the generated images to meet specific project requirements, making it an ideal choice for artists, designers, and creative technologists.

Imagine using Corbu to create unique visual content for architectural presentations, marketing materials, or even personal art projects. Whether you want to explore different aesthetics or need a series of images for a campaign, Corbu's capabilities allow for versatility and creativity.

Prerequisites

To get started with Corbu, you will need an API key for the Cognitive Actions service and a basic understanding of making API calls.

Generate Images in Le Corbusier Style

The action "Generate Images in Le Corbusier Style" enables users to create images that evoke the unique characteristics of Le Corbusier's architectural vision. This action is particularly useful for architects, designers, and developers aiming to generate high-quality images reflecting modernist aesthetics.

Input Requirements

The input for this action requires a structured request that includes various parameters such as:

  • Mask: A URI for the input mask used in inpaint mode (optional).
  • Seed: An integer seed for randomization (optional).
  • Image: A URI of the input image for image-to-image processing (optional).
  • Width & Height: Dimensions of the output image, with a default of 1024 pixels.
  • Prompt: A textual description guiding the image generation.
  • Refinement Style: Options for refining the image.
  • Guidance Scale: Configures adherence to the prompt.
  • Number of Outputs: Specifies how many images to generate.

Expected Output

The action will return a set of image URLs that correspond to the generated images, showcasing the unique style inspired by Le Corbusier.

Use Cases for this Specific Action

  1. Architectural Visualization: Generate images for presentations or portfolios to showcase design concepts in a distinctive style.
  2. Marketing Campaigns: Create compelling visuals that stand out and capture audience attention, integrating modernist design elements.
  3. Artistic Exploration: Designers can experiment with different prompts and styles for creative projects, allowing for unique expressions of art.

The flexibility of the input parameters means you can tailor the output to fit your exact needs, whether it's adjusting the size of the image or refining the style to achieve the desired look.

import requests
import json

# Replace with your actual Cognitive Actions API key and endpoint
# Ensure your environment securely handles the API key
COGNITIVE_ACTIONS_API_KEY = "YOUR_COGNITIVE_ACTIONS_API_KEY"
# This endpoint URL is hypothetical and should be documented for users
COGNITIVE_ACTIONS_EXECUTE_URL = "https://api.cognitiveactions.com/actions/execute"

action_id = "c039a0a9-af1f-4cc4-a450-e982463a78c6" # Action ID for: Generate Images in Le Corbusier Style

# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
  "width": 512,
  "height": 512,
  "prompt": "a photo of a uniquely shaped house on a hill",
  "refine": "no_refiner",
  "loraScale": 0.8,
  "scheduler": "K_EULER",
  "guidanceScale": 7.5,
  "applyWatermark": false,
  "negativePrompt": "",
  "promptStrength": 0.8,
  "numberOfOutputs": 4,
  "highNoiseFraction": 0.8,
  "numberOfInferenceSteps": 50
}

headers = {
    "Authorization": f"Bearer {COGNITIVE_ACTIONS_API_KEY}",
    "Content-Type": "application/json",
    # Add any other required headers for the Cognitive Actions API
}

# Prepare the request body for the hypothetical execution endpoint
request_body = {
    "action_id": action_id,
    "inputs": payload
}

print(f"--- Calling Cognitive Action: {action.name or action_id} ---")
print(f"Endpoint: {COGNITIVE_ACTIONS_EXECUTE_URL}")
print(f"Action ID: {action_id}")
print("Payload being sent:")
print(json.dumps(request_body, indent=2))
print("------------------------------------------------")

try:
    response = requests.post(
        COGNITIVE_ACTIONS_EXECUTE_URL,
        headers=headers,
        json=request_body
    )
    response.raise_for_status() # Raise an exception for bad status codes (4xx or 5xx)

    result = response.json()
    print("Action executed successfully. Result:")
    print(json.dumps(result, indent=2))

except requests.exceptions.RequestException as e:
    print(f"Error executing action {action_id}: {e}")
    if e.response is not None:
        print(f"Response status: {e.response.status_code}")
        try:
            print(f"Response body: {e.response.json()}")
        except json.JSONDecodeError:
            print(f"Response body (non-JSON): {e.response.text}")
    print("------------------------------------------------")

Conclusion

By leveraging Corbu's capabilities, developers can easily create high-quality images that reflect the iconic style of Le Corbusier. The variety of customization options allows for a tailored approach to image generation, making it a valuable tool for various creative applications. Whether you are enhancing a project, exploring new artistic avenues, or creating marketing materials, Corbu empowers you to produce stunning visuals with ease. Start integrating Corbu into your applications today and unlock the potential of AI-driven image generation.