Execute ai.generate through the canonical POST /v1/task/ endpoint using strongly typed parameters.
Loading the deployed operation schema…
Task API · ai.generate
# Upload a file using /v1/assets/uploads/ first; replace the example asset IDs.
curl -X POST 'https://api.imagehq.io/v1/task/' \
-H "X-API-Key: $IMAGEHQ_API_KEY" \
-H 'Content-Type: application/json' \
-H "Idempotency-Key: $(uuidgen)" \
--data-binary '{"operation":"ai.generate","inputs":[],"parameters":{"model":"ENABLED_MODEL_ID","prompt":"A studio product image","width":1024,"height":1024},"outputs":[{"type":"managed"}]}'Illustrative server-side examples. Upload source bytes to a presigned S3 URL first; substitute your ready asset IDs and an enabled model.