Skip to content
VoiceMint Developers

Image

Generate images from a prompt and edit them with tools such as upscaling and background removal.

Keys need media.write.

Generate#

curl -X POST https://api.voicemint.io/api/v1/generate/image \
  -H "Authorization: Bearer $VOICEMINT_API_KEY" -H "Content-Type: application/json" \
  -d '{"prompt": "a fox in a misty forest, watercolour", "width": 1024, "height": 1024}'
# -> {"generation_id": "..."}; poll GET /generate/GENERATION_ID/status

negative_prompt, num_outputs, model_id (GET /ai-models/image) and enhance_prompt are optional.

Edit#

POST /generate/image-tool runs a tool on a generation or an uploaded asset: upscale_2x, remove_bg and more.

curl -X POST https://api.voicemint.io/api/v1/generate/image-tool \
  -H "Authorization: Bearer $VOICEMINT_API_KEY" -H "Content-Type: application/json" \
  -d '{"tool": "upscale_2x", "generation_id": "GENERATION_ID"}'