Developers
API & webhooks
Generate images & videos programmatically, then fetch results by polling or signed webhooks. API access starts on Pro; Studio adds push webhooks & higher limits.
…
…
…
…
Quickstart
Generate a key below, then this snippet fills in with your key.
curl -X POST https://api.genreach.app/v1/images \
-H "X-API-Key: gr_live_…" -H "Content-Type: application/json" \
-d '{"prompt":"a red apple, product photo","resolution":"standard"}'Your API keys
API access is included on the Pro and Studio plans (Studio adds webhooks & higher rate limits). Mint, copy and revoke keys here — usage draws from your monthly credits. Higher-volume / B2B? Contact us.
API access
Call POST api.genreach.app/v1/images with an X-API-Key header. Docs →
Webhooks (recommended)
Generation is async — instead of polling, point us at a URL and we'll push the result the moment it's ready. Add your endpoint (Studio — Pro polls instead). On a terminal state we POST a signed event:
We POST signed job.completed/job.failed events to this URL.
{ "id": "<event_id>", "type": "job.completed", // or job.failed
"created": 1718000000,
"data": { "job_id": "…", "status": "completed", "type": "image",
"result_url": "https://cdn…/x.webp", "error": null,
"metadata": { "my_ref": "post-123" } } }Verify the X-Genreach-Signature: t=<ts>,v1=<hmac> header — HMAC-SHA256 of "{t}.{raw_body}". Reject stale timestamps or HMAC mismatches:
import os, hmac, hashlib, time
from flask import Flask, request, abort
app = Flask(__name__)
SECRET = os.environ["GENREACH_WEBHOOK_SECRET"] # the whsec_… shown once
@app.post("/webhooks/genreach")
def genreach():
p = dict(kv.split("=", 1) for kv in request.headers["X-Genreach-Signature"].split(","))
if abs(time.time() - int(p["t"])) > 300: # reject stale
abort(400)
mac = hmac.new(SECRET.encode(), f'{p["t"]}.'.encode() + request.data, hashlib.sha256).hexdigest()
if not hmac.compare_digest(mac, p["v1"]): # reject forged
abort(401)
e = request.get_json()
if e["type"] == "job.completed":
url = e["data"]["result_url"] # → download / store / post
return "", 200 # ack fast; dedupe on e["id"] (delivery is at-least-once)Delivery is at-least-once with backoff retries (1m → 6h), so dedupe on event.id and respond 2xx quickly.
Recent deliveries
No webhook deliveries yet. Webhooks are set up per integration — contact us to enable a callback URL for your key, then deliveries (with retry status) show here.
Base URL & authentication
Send your key in the X-API-Key header on every request. The raw key (gr_live_…) is shown once when minted — store it securely.
Base URL: https://api.genreach.app
Header: X-API-Key: gr_live_…Generate an image
/v1/images→ 202 { id, status, type }curl -X POST https://api.genreach.app/v1/images \
-H "X-API-Key: gr_live_…" -H "Content-Type: application/json" \
-d '{
"prompt": "a serene mountain lake at dawn",
"platform": "tiktok", // youtube | tiktok | instagram_reel | instagram_post
"resolution": "ultra", // standard 1K · hd 2K · ultra 4K
"metadata": { "my_ref": "post-123" }
}'Generate a video
/v1/videos→ 202 { id, status, type }curl -X POST https://api.genreach.app/v1/videos \
-H "X-API-Key: gr_live_…" -H "Content-Type: application/json" \
-d '{
"prompt": "3 quick sleep tips",
"platform": "tiktok",
"scene_count": 5, // 2–12
"hd": false,
"caption_style": "word" // word | clean | bold-pop | none
}'Fetch the result
/v1/jobs/{id}status + result_url when done (tenant-scoped)/v1/usageyour job counts by status (metering)Poll /v1/jobs/{id} until status is completed (then read result_url), or register a webhook and we'll push the result. Full lifecycle:
KEY="gr_live_…"
# 1) submit a job → capture its id
JOB=$(curl -s -X POST https://api.genreach.app/v1/images \
-H "X-API-Key: $KEY" -H "Content-Type: application/json" \
-d '{"prompt":"a serene mountain lake at dawn","resolution":"hd"}' | jq -r .id)
# 2) poll until it's done (or register a webhook and skip this)
until [ "$(curl -s https://api.genreach.app/v1/jobs/$JOB -H "X-API-Key: $KEY" | jq -r .status)" = "completed" ]; do
sleep 3
done
# 3) grab the finished asset
curl -s https://api.genreach.app/v1/jobs/$JOB -H "X-API-Key: $KEY" | jq -r .result_urlRate limits & notes
- Rate limits: Pro 60/min images · 30/min videos; Studio 120/min · 60/min — back off on
429. - Idempotency: include an
idempotency_keyinmetadataand dedupe on your side. - Generate-only: the API returns assets; you publish to your own connected accounts (managed-publish is on the roadmap).
- Billing: usage draws from your plan's monthly credits (same costs as the app).
Questions? [email protected]