Copy
// python3 example
impot os
from siray.client import Client
client = Client({
"auth": os.getenv("SIRAY_API_TOKEN"),
})
result = client.run(
"black-forest-labs/flux-kontext-i2i-pro",
input={
"prompt": "<prompt>",
"image": client.load_from_local("path/to/image.jpg")
}
)
# To access the file URL:
output = result.outputs()[0]
print(output.url())
# To write the file to disk:
with open("my-image.jpg", "wb") as file:
file.write(output.read())
