cURL
curl --request POST \ --url https://api.spikelabs.com/v1/image/edits \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form image='@example-file' \ --form 'prompt=<string>' \ --form mask='@example-file' \ --form size=1024x1024
{ "created": 123, "data": [ { "url": "<string>", "b64_json": "<string>", "revised_prompt": "<string>" } ] }
Edit an existing image based on a prompt.
API key authentication. Use your secret key (starts with sk_) as a Bearer token.
sk_
Source image to edit
Description of the edit
Mask indicating areas to edit
256x256
512x512
1024x1024
Edited image
Unix timestamp
Show child attributes
Base64 encoded image