Create Stunning LinkedIn Profiles with medwinrumo Cognitive Actions

22 Apr 2025
Create Stunning LinkedIn Profiles with medwinrumo Cognitive Actions

In today's digital world, having an attractive LinkedIn profile image is crucial for making a great first impression. The medwinrumo/photos_med_profil_lkd Cognitive Actions provide a powerful image generation capability that can help you create customized LinkedIn profile images using advanced image inpainting and generation techniques. With the flexibility to choose between detailed and rapid generation models, developers can easily integrate these actions into their applications, enhancing user engagement and personalization.

Prerequisites

Before you start using the Cognitive Actions, ensure you have the following:

  • An API key for the Cognitive Actions platform, which is necessary for authentication.
  • Familiarity with making API requests, particularly using JSON for input and output.

When making requests, you will typically pass the API key in the request headers for authentication.

Cognitive Actions Overview

Generate Profile Image

The Generate Profile Image action enables users to create a customized LinkedIn profile image by utilizing advanced image generation techniques. You can select between two models: dev for detailed creation or schnell for faster generation. The action allows you to adjust parameters such as image size, quality, and aspect ratio to tailor the output to your needs.

Input

The input for this action requires a JSON object with the following fields:

  • prompt (required): A descriptive string that outlines the desired characteristics of the profile image. Example:
    "Créer une photo de profil LinkedIn pour medwin , c'est un homme. sourire léger et confiant regard direct. posture : face camera, le haut du corps vers l'avant.tenue: gothique apocalyptique fond: exterieur nature lumineux éclairage doux et naturel. cadrage centré au niveau des épaules format carré 400x400 pixels Style moderne et chaleureux ambiance accueillante haute résolution avec détails réalistes"
    
  • mainLoraScale: Determines the strength of the main LoRA application (default: 1).
  • enableFastMode: Boolean to enable faster predictions (default: false).
  • inferenceModel: Specifies the model to use ("dev" or "schnell", default: "dev").
  • numberOfOutputs: Number of images to generate (default: 1).
  • imageAspectRatio: Aspect ratio for the generated image (default: "1:1").
  • imageOutputFormat: Format of the output image (default: "webp").
  • imageOutputQuality: Quality of the output image (default: 80).
  • additionalLoraScale: Extra LoRA strength (default: 1).
  • imagePromptStrength: Strength of the prompt when using img2img (default: 0.8).
  • inferenceStepsCount: Number of denoising steps (default: 28).
  • approximateMegapixels: Approximate number of megapixels for the generated image (default: "1").
  • diffusionGuidanceScale: Guidance scale for the diffusion process (default: 3).

Example Input

{
  "prompt": "\"Créer une photo de profil LinkedIn pour medwin , c'est un homme. sourire léger et confiant regard direct. posture : face camera, le haut du corps vers l'avant.tenue: gothique apocalyptique fond: exterieur nature lumineux éclairage doux et naturel. cadrage centré au niveau des épaules format carré 400x400 pixels Style moderne et chaleureux ambiance accueillante haute résolution avec détails réalistes\"",
  "mainLoraScale": 1,
  "enableFastMode": false,
  "inferenceModel": "dev",
  "numberOfOutputs": 3,
  "imageAspectRatio": "1:1",
  "imageOutputFormat": "png",
  "imageOutputQuality": 80,
  "additionalLoraScale": 1,
  "imagePromptStrength": 0.8,
  "inferenceStepsCount": 50,
  "approximateMegapixels": "1",
  "diffusionGuidanceScale": 2.5
}

Output

The action returns an array of URLs pointing to the generated profile images. Example output might look like this:

[
  "https://assets.cognitiveactions.com/invocations/a3a665da-f587-4449-a80d-5eae631d2d3c/849aac4a-9409-42f2-a3c6-7e3978cc0176.png",
  "https://assets.cognitiveactions.com/invocations/a3a665da-f587-4449-a80d-5eae631d2d3c/2ec2fd32-9430-4e80-93aa-3b0410183972.png",
  "https://assets.cognitiveactions.com/invocations/a3a665da-f587-4449-a80d-5eae631d2d3c/8640d91a-b529-42c9-b956-097214c4df24.png"
]

Conceptual Usage Example (Python)

Here's a conceptual example of how you might call the Generate Profile Image action using Python:

import requests
import json

# Replace with your Cognitive Actions API key and endpoint
COGNITIVE_ACTIONS_API_KEY = "YOUR_COGNITIVE_ACTIONS_API_KEY"
COGNITIVE_ACTIONS_EXECUTE_URL = "https://api.cognitiveactions.com/actions/execute" # Hypothetical endpoint

action_id = "abed89a9-8e78-4cce-b075-cbe65019dde6" # Action ID for Generate Profile Image

# Construct the input payload based on the action's requirements
payload = {
    "prompt": "\"Créer une photo de profil LinkedIn pour medwin , c'est un homme. sourire léger et confiant regard direct. posture : face camera, le haut du corps vers l'avant.tenue: gothique apocalyptique fond: exterieur nature lumineux éclairage doux et naturel. cadrage centré au niveau des épaules format carré 400x400 pixels Style moderne et chaleureux ambiance accueillante haute résolution avec détails réalistes\"",
    "mainLoraScale": 1,
    "enableFastMode": False,
    "inferenceModel": "dev",
    "numberOfOutputs": 3,
    "imageAspectRatio": "1:1",
    "imageOutputFormat": "png",
    "imageOutputQuality": 80,
    "additionalLoraScale": 1,
    "imagePromptStrength": 0.8,
    "inferenceStepsCount": 50,
    "approximateMegapixels": "1",
    "diffusionGuidanceScale": 2.5
}

headers = {
    "Authorization": f"Bearer {COGNITIVE_ACTIONS_API_KEY}",
    "Content-Type": "application/json"
}

try:
    response = requests.post(
        COGNITIVE_ACTIONS_EXECUTE_URL,
        headers=headers,
        json={"action_id": action_id, "inputs": payload} # Hypothetical structure
    )
    response.raise_for_status() # Raise an exception for bad status codes (4xx or 5xx)

    result = response.json()
    print("Action executed successfully:")
    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: {e.response.text}")

In this code snippet, you'll need to replace "YOUR_COGNITIVE_ACTIONS_API_KEY" with your actual API key. The action_id corresponds to the Generate Profile Image action, and the payload is structured based on the required input fields.

Conclusion

The medwinrumo/photos_med_profil_lkd Cognitive Actions offer a powerful solution for generating customized LinkedIn profile images. With the flexibility to adjust various parameters and choose between different inference models, developers can easily implement this functionality into their applications. Start enhancing your user experience today by integrating these Cognitive Actions into your projects!