Create Stunning High-Resolution Images with Flux 1.1 Pro Ultra

25 Apr 2025
Create Stunning High-Resolution Images with Flux 1.1 Pro Ultra

In the realm of digital creativity, the ability to generate high-resolution images quickly and efficiently is paramount. The Flux 1.1 Pro Ultra service offers developers a powerful toolset through its Cognitive Actions, specifically designed for image generation. With the capability to produce images up to 4 megapixels in just 10 seconds, this service stands out for its speed and quality. Whether you're working on applications for marketing, gaming, or visual storytelling, the Flux 1.1 Pro Ultra enables you to create captivating visuals that resonate with your audience.

Imagine needing a striking image of a serene landscape or a vibrant cityscape for your project. The Flux 1.1 Pro Ultra can produce these images with remarkable detail, allowing for a swift turnaround in your creative process. It simplifies the image creation workflow, providing developers with a straightforward API to generate unique visuals tailored to specific needs.

Prerequisites

To get started with the Flux 1.1 Pro Ultra, you'll need an API key for the Cognitive Actions service. Familiarity with making API calls is also essential to integrate these actions effectively into your applications.

Generate High-Resolution Images with FLUX1.1 Pro

This action allows you to create high-resolution images using either the ultra or raw modes of the Flux 1.1 Pro. The ultra mode delivers images at four times the standard resolution, ensuring you maintain quality while benefiting from faster processing times. On the other hand, the raw mode is perfect for those seeking a more natural appearance in their imagery, especially for nature and human photography.

Input Requirements:

  • textPrompt: A string that describes the image you wish to generate (e.g., "a majestic snow-capped mountain peak bathed in a warm glow of the setting sun").
  • generateRawImage: A boolean indicating whether to generate a raw image (default is false).
  • imageAspectRatio: Specifies the width-to-height ratio of the image (e.g., "3:2").
  • imageOutputFormat: Determines the format of the output image, either "jpg" or "png" (default is "jpg").
  • referenceImageUri: A URI pointing to a reference image, which can guide the stylistic aspects of the generated image.
  • contentSafetyTolerance: An integer that sets the level of content safety, ranging from 1 (most strict) to 6 (most permissive).
  • referenceImageInfluence: A number that indicates how much the reference image influences the final output, ranging from 0 (no influence) to 1 (full influence).

Expected Output: The output will be a URL link to the generated high-resolution image, such as:

https://assets.cognitiveactions.com/invocations/91fac5e2-51bd-4f8d-b49e-a9f6acf6a8e8/ebad11a2-fbc2-4a71-a979-a952fdf7b6ea.jpg

Use Cases for this Action:

  • Marketing Campaigns: Quickly generate visually appealing images to enhance promotional materials.
  • Content Creation: For bloggers and social media managers, create tailored images that align with written content.
  • Game Development: Render high-quality backgrounds or assets that bring virtual worlds to life.
  • E-commerce: Generate product images that are visually striking and help in showcasing items effectively.
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 = "c664a25c-0e54-4612-b86c-0d4097f5aa4e" # Action ID for: Generate High-Resolution Images with FLUX1.1 Pro

# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
  "textPrompt": "a majestic snow-capped mountain peak bathed in a warm glow of the setting sun",
  "generateRawImage": false,
  "imageAspectRatio": "3:2",
  "imageOutputFormat": "jpg",
  "contentSafetyTolerance": 2,
  "referenceImageInfluence": 0.1
}

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

The Flux 1.1 Pro Ultra offers developers a remarkable opportunity to generate stunning high-resolution images quickly and efficiently. With its versatile options and high-quality outputs, this service can significantly enhance your projects, whether in marketing, content creation, or digital art. By integrating these Cognitive Actions, you can streamline your creative process and produce captivating visuals that engage your audience. To explore further, consider experimenting with different input parameters to see how they influence your generated images.