image_upscaling

Upscale an image

SDK Method

async def image_upscaling(image) -> bytes

Usage example

from VisionCraftAPI import VisionCraftClient

async def main():
    # Set your API key
    api_key = "YOUR_API_KEY"
    
    # Create a VisionCraftClient instance
    client = VisionCraftClient(api_key=api_key)
    
    # Upscale an image
    upscale = await client.image_upscaling(
        image='https://example.com/image.jpg',
        model="R-ESRGAN 4x+ Anime6B",
        resize=4
    )
    
    # Save the upscaled image
    with open('upscaled_image.png', 'wb') as file:
        file.write(upscale)
    
if __name__ == '__main__':
    import asyncio
    asyncio.run(main())

For further information go to API Docs

Last updated