1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 const axios = require('axios'); const api_key = "YOUR API KEY"; const url = "https://api.segmind.com/workflows/666cf792c7bbec16701778bd-v6"; const data = { face-image: "publicly accessible image link", pose_image: "publicly accessible image link", str_f1rlik: "the user input string" }; axios.post(url, data, { headers: { 'x-api-key': api_key, 'Content-Type': 'application/json' } }).then((response) => { console.log(response.data); });
Response
application/json
1 2 3 4 5 { "poll_url": "<base_url>/requests/<some_request_id>", "request_id": "some_request_id", "status": "QUEUED" }

You can poll the above link to get the status and output of your request.

Response
application/json
1 2 3 { "output_image": "image in URL Format" }

Attributes


face-imageimage*

pose_imageimage*

str_f1rlikstr*

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

Superhero Generator

The Superhero Generator offers an advanced image transformation workflow, allowing users to create personalized superhero representations. By utilizing Instadepth model technology, this tool transforms input images into dynamic superhero visuals based on specified text prompts.

How the Superhero Generator Works

The Superhero Generator employs a streamlined process involving key technological components:

  • Instadepth Model: The process begins with the Instadepth model, designed to handle and manipulate high-quality images. Users input a facial image of a person as the primary subject.

  • Reference Pose Integration: Alongside the facial input, a reference image is used to define the desired superhero pose, ensuring the final image reflects a dynamic and contextually accurate position.

  • Text Prompt Analysis: A text prompt is required to detail the superhero attributes or theme. This enables the AI to tailor the costume, setting, and other aesthetic details to fit the user's vision.

  • Image Synthesis: The workflow synthesizes the provided facial and pose data with the input text, generating an image of the person as a superhero character, complete with costume and relevant thematic elements.

How to Use the Superhero Generator

  1. Provide Facial Image: Start by uploading a clear image of the person you want to transform into a superhero. Ensure the image focuses on the face for optimal results.

  2. Select Reference Pose: Choose an image that best represents the superhero pose you desire. This will guide the pose of the final superhero creation.

  3. Enter a Text Prompt: Suggest themes or specific superhero attributes, such as "laser vision" or "vintage alter ego", to tailor the end design.

  4. Generate and Adjust: The workflow will generate the superhero image. Iterations can be made by altering the inputs or prompts for diverse variations.

##Use Cases

  • Personalized Gifts: Create unique superhero-themed gifts for friends or family by using their images and customizing details to reflect their personality or preferences.

  • Comic Enthusiasts: Develop custom superhero avatars for comic book enthusiasts, aligning with favorite themes or characters within the superhero genre.

  • Marketing and Promotions: Use personalized superhero imagery for promotional campaigns, capturing audience attention through unique visual storytelling.

  • Creative Projects: Ideal for artists or storytellers who want to visualize characters in a superhero context, supporting creative projects or ideas.