Skip to content
LLM-friendly formats:

Quick Start

Get your first image generated in under 5 minutes.

1. Request API Access

Request access to the Weyl API by filling out our access request form. Once approved, you’ll receive your API key via email within 24 hours.

Terminal window
export WEYL_API_KEY=wyl_sk_prod_1234567890abcdef

2. Generate Your First Image

Terminal window
curl -X POST "https://sync.render.weyl.ai/image/flux/schnell/t2i?format=1024" \
-H "Authorization: Bearer $WEYL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"cyberpunk street at night, neon rain"}' \
-o output.webp

The response body contains the image bytes. The Content-Location header points to the permanent CDN URL.

3. Try Different Models

FLUX.2 Dev (32B, highest quality)

Terminal window
curl -X POST "https://sync.render.weyl.ai/image/flux/dev2/t2i?format=1024" \
-H "Authorization: Bearer $WEYL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"portrait of a woman, rembrandt lighting"}' \
-o portrait.webp

Z-Image Turbo (sub-second generation)

Terminal window
curl -X POST "https://sync.render.weyl.ai/image/zimage/turbo/t2i?format=1024" \
-H "Authorization: Bearer $WEYL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"mountain landscape, golden hour"}' \
-o landscape.webp

4. Use with Python

import requests
import os
def generate_image(prompt: str) -> bytes:
url = "https://sync.render.weyl.ai/image/flux/schnell/t2i?format=1024"
headers = {
"Authorization": f"Bearer {os.environ['WEYL_API_KEY']}",
"Content-Type": "application/json"
}
payload = {"prompt": prompt}
resp = requests.post(url, headers=headers, json=payload)
resp.raise_for_status()
# Get permanent CDN URL
cdn_url = resp.headers.get('Content-Location')
print(f"Permanent URL: {cdn_url}")
return resp.content
# Generate
image_bytes = generate_image("neon city at night")
with open("output.webp", "wb") as f:
f.write(image_bytes)

Next Steps