And use it in the following codes.
import os from leptonai.client import Client api_token = os.environ.get('LEPTON_API_TOKEN') c = Client("https://sdxl.lepton.run", token=api_token) image = c.inpaint( prompt="Astronaut on Mars During sunset", image="<url_or_base64>", mask_image="<url_or_base64>", height=1024, width=1024, guidance_scale=5, high_noise_frac=0.75, seed=1809774958, steps=30, use_refiner=False ) with open('output_image.png', 'wb') as f: f.write(image) print("Image saved as output_image.png")
The rate limit for the Model APIs is 10 requests per minute across all models under Basic Plan. If you need a higher rate limit with SLA please upgrade to standard plan, or use dedicated deployment.