1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import requests
api_key = "YOUR_API_KEY"
url = "https://api.segmind.com/v1/recraft-v3"
# Prepare data and files
data = {}
files = {}
data['size'] = "1024x1024"
data['style'] = "any"
data['prompt'] = "a cute red panda cartoon character, holding a prize cup with one hand and a sign with another hand saying 'recraft FTW', happy and joyful"
headers = {'x-api-key': api_key}
response = requests.post(url, data=data, files=files, headers=headers)
print(response.content) # The response is the generated image
Width and height of the generated image
Allowed values:
Style of the generated image.
Allowed values:
Text prompt for image generation
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.
Recraft V3, the latest iteration of Recraft AI, offers a significant advancement in AI-driven image generation. This state-of-the-art model is designed to produce high-quality, detailed vector graphics, catering to the needs of designers, artists, and content creators alike.
Advanced Text Integration: Seamlessly integrates text into images, ensuring both legibility and aesthetic harmony.
Anatomical Precision: Generates accurate and realistic human figures and other anatomical structures.
Aesthetic Excellence: Adheres to fundamental design principles, producing visually appealing and impactful graphics.
Extensive Customization: Offers granular control over various design elements, such as text size, position, and style.
Logo Design: Create scalable, high-quality logos for various applications.
Infographic Creation: Generate informative and visually appealing infographics.
Illustration: Produce detailed and anatomically correct illustrations.
Promotional Material: Design eye-catching flyers, posters, and social media graphics.