If you're looking for an API, you can choose from your desired programming language.
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
36
37
38
39
40
41
42
43
44
import requests
import base64
# Use this function to convert an image file from the filesystem to base64
def image_file_to_base64(image_path):
with open(image_path, 'rb') as f:
image_data = f.read()
return base64.b64encode(image_data).decode('utf-8')
# Use this function to fetch an image from a URL and convert it to base64
def image_url_to_base64(image_url):
response = requests.get(image_url)
image_data = response.content
return base64.b64encode(image_data).decode('utf-8')
api_key = "YOUR_API_KEY"
url = "https://api.segmind.com/v1/text-overlay"
# Request payload
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
}
headers = {'x-api-key': api_key}
response = requests.post(url, json=data, headers=headers)
print(response.content) # The response is the generated image
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.
InstantID aims to generate customized images with various poses or styles from only a single reference ID image while ensuring high fidelity
This model is capable of generating photo-realistic images given any text input, with the extra capability of inpainting the pictures by using a mask
CodeFormer is a robust face restoration algorithm for old photos or AI-generated faces.
Take a picture/gif and replace the face in it with a face of your choice. You only need one image of the desired face. No dataset, no training