If you're looking for an API, here is a sample code in NodeJS to help you out.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const axios = require('axios');
const api_key = "YOUR API KEY";
const url = "https://api.segmind.com/workflows/66cec9a38aeef98f887211f1-v1";
const data = {
input_image: "publicly accessible image link"
};
axios.post(url, data, {
headers: {
'x-api-key': api_key,
'Content-Type': 'application/json'
}
}).then((response) => {
console.log(response.data);
});
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.
1
2
3
{
"output_image": "image in URL Format"
}
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.
Unlock the full potential of generative AI with Segmind. Create stunning visuals and innovative designs with total creative control. Take advantage of powerful development tools to automate processes and models, elevating your creative workflow.
Run generative AI models with minimal latencies and setup costs, optimizing resource use and speed.
Run generative AI models with minimal latencies and setup costs, optimizing resource use and speed.
Run generative AI models with minimal latencies and setup costs, optimizing resource use and speed.
Run generative AI models with minimal latencies and setup costs, optimizing resource use and speed.
This workflow helps you in converting photos into artistic sketches, a technique that was previously reserved for skilled artists.
The InstantId model is a robust tool designed to transform images into beautifully crafted sketches. By accurately interpreting the features and details of a photo, it allows for seamless conversion, making it a great tool for artists and creative enthusiasts.
The AI sketch maker workflow employs a streamlined process. The illustrated workflow defines the sequence of processing stages that an image undergoes to achieve the desired sketch.
*Stage 1: The process starts by inputting an image of the subject to be sketched. The photo is uploaded into the Input Image node, which then proceeds to the next stage.
*Stage 2: The InstantId model conducts a comprehensive analysis of the uploaded image, identifying various features, edges, and textures within the photo. This crucial step lays the groundwork for an accurate and artistic sketch transformation.
*Stage 3: Users can add or change different reference styles to the node and change the prompt to get your desired sketch. You can use the desired gender image as reference and only input your image there
*Stage 4: Once the sketch style is selected, the InstantId model leverages its analysis to create the sketch while maintaining feature integrity. The AI draws outlines, adds shading, and refines details as per the chosen style. The final image, a beautifully crafted sketch, is generated and can be exported for personal projects, client presentations, or artistic displays.
Input a photo with your face.
Hit the "Run" button to generate the sketch.
Optionally, tweak the text prompt to customise the output.