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.
export WEYL_API_KEY=wyl_sk_prod_1234567890abcdef2. Generate Your First Image
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.webpThe 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)
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.webpZ-Image Turbo (sub-second generation)
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.webp4. Use with Python
import requestsimport 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
# Generateimage_bytes = generate_image("neon city at night")
with open("output.webp", "wb") as f: f.write(image_bytes)Next Steps
- Authentication - API keys and best practices
- Sync Tier - Real-time generation
- Async Tier - Queue-based workflows
- Models - Available models