1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const axios = require('axios');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/text-overlay";
const data = {
"align": "right",
"base64": false,
"blend_mode": "normal",
"color": "#FFF",
"font": "JosefinSans-Bold",
"font_size": 150,
"graphspace": 0,
"image": "https://segmind-sd-models.s3.amazonaws.com/display_images/txt_overlay_in.png.jpeg",
"image_format": "jpeg",
"image_quality": 90,
"linespace": 10,
"margin_x": 97,
"margin_y": 300,
"outline_color": "#11ff00",
"outline_size": 0,
"text": "TRAVEL\n TODAY",
"text_underlay": true,
"wrap": 50
};
(async function() {
try {
const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
})();
Text alignment
Allowed values:
Output image as base64 format
Blend mode for text overlay
Allowed values:
Text color
Font style for the text
Allowed values:
Font size for the text
min : 1,
max : 2500
Controls spacing between text and surrounding elements.
min : 0,
max : 2048
URL of the image
Output image format.
Allowed values:
Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality
min : 0,
max : 100
Space between lines
min : 0,
max : 2048
Margin X for positioning text
min : 0,
max : 2048
Margin Y for positioning text
min : 0,
max : 2048
Outline color for text
Outline size for text
min : 0,
max : 2048
Text to be displayed on the image
Specifies whether the text should be rendered behind an object or remain in front of it
Wrap width for text
min : 0,
max : 2048
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.
Enhance the visual appeal of your images effortlessly with our Text Overlay Model. With this tool, you can seamlessly add customized text to any image, making it ideal for social media posts, marketing materials, blog images, and more. Our model provides a user-friendly interface and powerful customization options to suit your creative needs.
Text Input: Simply type the text you want to overlay on your image.
Font Options: Choose from a vast array of fonts to match your style. The Altura-Regular
font is one of many available for your convenience.
Alignment: Adjust text alignment to left
, center
, or right
to suit your image layout.
Text Color: Select any hex color code to perfectly match your text with the image. For example, use #0000FF
for blue text.
Outline Color: Add an outline to your text with customizable colors. For example, use hex code #11FF00
for a green outline.
Blend Mode: Choose from several blend modes such as normal
, multiply
, and more to achieve the desired text and image integration.
Text Underlay: Enable or disable underlay to make sure your text stands out.
Marginal Adjustments: Fine-tune the position of your text with Margin X
and Margin Y
settings. For example, use 150
for Margin X and 350
for Margin Y.
Wrap and Graphspace: Control text wrapping and spacing with settings like Wrap
(set to 50
) and Graphspace
.
Line Spacing: Customize the spacing between lines of text, set to 10
for optimal readability.
Font Size: Adjust the size of the text to match your design requirements, with a flexible range (Example: 170
for a bold statement).
Outline Size: Define the thickness of your text outline to create a standout effect.
Upload Your Image: Provide the image URL or upload directly from your device.
Customize Your Text: Input your desired text and tweak the style options to match your vision.
Adjust Position and Size: Use margin, wrap, and size settings to place the text perfectly.
Generate: Click the generate button to see your customized text overlay seamlessly integrated onto your image.
Get creative and elevate your visuals with our intuitive Text Overlay Model. Perfect for digital marketers, graphic designers, and social media enthusiasts looking to add a personal touch to their images.