POST
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
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


sizeenum:str ( default: 1024x1024 )

Width and height of the generated image

Allowed values:


styleenum:str ( default: any )

Style of the generated image.

Allowed values:


promptstr *

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

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.

Key Features of Recraft V3

  • 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.

Use cases

  • 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.