To edit a local image, upload it as multipart/form-data form data:
curl --location --request POST 'https://geekai.co/api/v1/images/edits' \--header 'Authorization: Bearer $GEEKAI_API_KEY' \--form 'model="gpt-image-2"' \--form 'prompt="Restore this damaged photo"' \--form 'image=@/path/to/your/local/image.jpg'
To upload multiple images in a form:
curl --location --request POST 'https://geekai.co/api/v1/images/edits' \--header 'Authorization: Bearer $GEEKAI_API_KEY' \--form 'model="gpt-image-2"' \--form 'prompt="Apply the fabric from the first image to the clothing in the second. Use the aspect ratio of the second image."' \--form 'images[]=@/path/to/your/local/image1.jpg' \--form 'images[]=@/path/to/your/local/image2.jpg'