Edit Image

Edit an existing image using a text prompt to describe the desired changes.

Endpoint

POST
/api/v1/jobs

Create an edit_image job

Supported Models

ModelCreditsNotes
gemini-edit5Precise prompt-guided image editing

Input Parameters

Request Body

NameTypeDescription
workflowrequiredstring"edit_image"
input.imageUrlrequiredstringURL of the image to edit
input.promptrequiredstringText description of the edits to apply
input.modelstringDefault: gemini-editModel to use
webhookUrlstringURL to receive completion notification

Example Request

Create Edit Job

curl -X POST https://vydra.ai/api/v1/jobs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflow": "edit_image",
    "input": {
      "imageUrl": "https://example.com/photo.png",
      "prompt": "Add a rainbow in the sky and make the grass greener"
    }
  }'

Example Response

Response (201 Created)json
{
  "id": "bb0e8400-e29b-41d4-a716-446655440006",
  "status": "running",
  "workflow": "edit_image",
  "creditsCharged": 5,
  "createdAt": "2026-01-26T12:00:00.000Z",
  "_links": {
    "self": "https://vydra.ai/api/v1/jobs/bb0e8400-e29b-41d4-a716-446655440006",
    "status": "https://vydra.ai/api/v1/jobs/bb0e8400-e29b-41d4-a716-446655440006"
  }
}

Editing Tips

Be specific in your prompt about what to change. The model preserves areas not mentioned in the prompt.