Image generation and edits
Generate or edit images with GetRun image models.
These commands use a macOS / Linux shell. Set the GETRUN_API_KEY environment variable to your Key and replace YOUR_IMAGE_MODEL with an available image model ID from the model catalog.
Generate an image
POST /v1/images/generations accepts JSON and a public image model name.
curl "https://api.get-apikey.com/v1/images/generations" \
-H "Authorization: Bearer $GETRUN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"YOUR_IMAGE_MODEL","prompt":"A lighthouse at dawn"}'Edit an image
POST /v1/images/edits accepts multipart/form-data. Let the HTTP client generate the multipart boundary; setting it manually can produce a body the server cannot parse.
curl "https://api.get-apikey.com/v1/images/edits" \
-H "Authorization: Bearer $GETRUN_API_KEY" \
-F "model=YOUR_IMAGE_MODEL" \
-F "prompt=Replace the background with a white studio" \
-F "image=@product.png"Available fields and output formats depend on the selected image model. Save the returned image or URL after receiving the result.