Create Stunning Images with Projectil V3 Cognitive Actions

26 Apr 2025
Create Stunning Images with Projectil V3 Cognitive Actions

In today's digital landscape, the ability to generate high-quality images tailored to specific needs has become a game-changer for developers and creatives alike. The Projectil V3 service brings forth a powerful Cognitive Action that allows you to create detailed images from prompts, offering a blend of flexibility and precision. With its advanced capabilities, Projectil V3 not only saves time but also simplifies the creative process, enabling developers to focus on innovation rather than technical constraints.

Imagine a scenario where you need a unique image for a marketing campaign or a specific visual element for a game. Instead of relying on stock images or spending hours on graphic design, you can leverage Projectil V3's image generation capabilities. By simply providing a descriptive prompt, you can generate images that match your vision. This capability is especially valuable for industries such as gaming, advertising, and content creation, where visual content plays a crucial role.

Generate Detailed Image

The "Generate Detailed Image" action allows you to create high-quality images guided by a prompt, with options to refine and upscale them using the ProjectIL-v3 model. This action is designed to solve the problem of obtaining custom images that meet specific criteria without the need for extensive graphic design skills.

Input Requirements

To utilize this action effectively, you will need to provide an input schema that includes various parameters:

  • Seed: Defines the seed for generation (default: -1 for random).
  • Steps: Specifies the number of steps for generation (default: 30, range: 1-100).
  • Width: Sets the image width in pixels (default: 1024, range: 1-4096).
  • Height: Sets the image height in pixels (default: 1024, range: 1-4096).
  • Prompt: The textual prompt guiding the image content (default includes various visual attributes).
  • Additional options include refining capabilities, scaling, and specifying negative prompts to avoid unwanted features.

Expected Output

Upon successful execution, the output will be a high-quality image generated based on your input parameters. For example, an output may look like this:

  • https://assets.cognitiveactions.com/invocations/3590691f-b3d6-4505-a45a-9f335418f05c/9f717e27-f611-4066-af8c-2871d813ac13.png

Use Cases for this Action

This action is ideal for a variety of applications, such as:

  • Marketing Campaigns: Quickly generate unique visuals tailored to specific themes or products.
  • Game Development: Create character designs or environments that align with the game's narrative.
  • Content Creation: Produce custom images for blogs, social media, or presentations, enhancing engagement and visual appeal.

By integrating the "Generate Detailed Image" action into your projects, you can streamline your workflow and unlock new creative possibilities.


```python
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 = "01a4012e-4aff-4f94-b446-a7e305b81e99" # Action ID for: Generate Detailed Image

# Construct the exact input payload based on the action's requirements
# This example uses the predefined example_input for this action:
payload = {
  "seed": -1,
  "steps": 30,
  "width": 1024,
  "height": 1024,
  "prompt": "street, 1girl, dark-purple short hair, purple eyes, medium breasts, cleavage, casual clothes, smile",
  "refiner": false,
  "cfgScale": 5,
  "clipSkip": 0,
  "pagScale": 0,
  "modelType": "ProjectIL-v3",
  "scheduler": "DPM++ 2M SDE Karras",
  "adetailerFace": false,
  "adetailerHand": false,
  "refinerPrompt": "",
  "upscaleFactor": "Original",
  "negativePrompt": "nsfw, naked",
  "adetailerPerson": false,
  "guidanceRescale": 0,
  "refinerStrength": 0.4,
  "prependPreprompt": true,
  "promptConjunction": false,
  "adetailerFacePrompt": "",
  "adetailerHandPrompt": "",
  "variationAutoencoder": "default",
  "adetailerPersonPrompt": "",
  "negativePromptConjunction": false,
  "adetailerFaceNegativePrompt": "",
  "adetailerHandNegativePrompt": "",
  "adetailerPersonNegativePrompt": ""
}

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("------------------------------------------------")


In conclusion, Projectil V3's Cognitive Actions offer developers an innovative way to generate custom images that fit their specific needs. With the ability to refine and upscale images, the potential applications are vast, making it an indispensable tool for anyone working in content-heavy industries. To get started, ensure you have your Cognitive Actions API key ready, and explore how these powerful tools can elevate your projects to new heights.