Dataczar
Browse helpers

Apply AI-driven edits to an image.

Uploads or references an existing image plus an edit prompt (and optional mask) to let the configured provider redraw specific regions. Works for foreground swaps, cleanup, background replacements, etc.

GETPOST/ai/edit

Where this helper shines

Apply AI-driven edits to an image. keeps ai helpers on autopilot. Use it whenever you need to apply AI-driven edits to an image without pausing a sprint or asking design/dev to jump in.

  • Trigger this helper whenever you need to apply AI-driven edits to an image without waiting on a full deploy.
  • Drop it into automations (Zapier, Make, workers) to apply AI-driven edits to an image as part of your workflow.
  • Share the GET URL so support and success can apply AI-driven edits to an image safely using their Dataczar API key.

Copy & ship snippets

GET

Instant link

GET https://api.dataczar.app/ai/edit?image_url=https%3A%2F%2Fexample.com%2Fdemo.png&mask_url=https%3A%2F%2Fexample.com%2Fdemo.png&prompt=sample-prompt&size=sample-size&ak=demo

Open directly in any browser, webhook, or low-code workflow.

curl

curl GET

curl "https://api.dataczar.app/ai/edit?image_url=https%3A%2F%2Fexample.com%2Fdemo.png&mask_url=https%3A%2F%2Fexample.com%2Fdemo.png&prompt=sample-prompt&size=sample-size&ak=demo"

Swap ak=demo with your Dataczar API key.

curl

curl POST

curl -X POST "https://api.dataczar.app/ai/edit?ak=demo" \
  -H 'Content-Type: application/json' \
  -d '{
  "prompt": "sample_prompt",
  "image_base64": "sample_image_base64",
  "image_url": "https://example.com/demo.png",
  "image_mime_type": "sample_image_mime_type",
  "mask_base64": "sample_mask_base64",
  "mask_url": "https://example.com/demo.png",
  "mask_mime_type": "sample_mask_mime_type",
  "model": "sample_model",
  "size": "sample_size",
  "style": "sample_style",
  "quality": "sample_quality",
  "background": "sample_background",
  "negative_prompt": "sample_negative_prompt",
  "guidance_scale": 140,
  "steps": 150,
  "mask_prompt": "sample_mask_prompt",
  "strength": 170,
  "seed": 180,
  "options": "sample_options"
}'

Send JSON payloads from back-end jobs, queues, or workers.

Parameters

Query Parameters

NameTypeDescription
image_urlstringPublic URL of the image to edit.
mask_urlstringOptional mask URL (white = keep, transparent = repaint).
promptstring · requiredDescribe what should change.
sizestringCanvas size such as `1024x1024` (defaults to env).

All helper calls accept your Dataczar key via the ak query parameter. Need one? Create or copy a key on Dataczar Connect and drop it into each request.

Responses

Status 200

Image edited successfully.

{
  "ok": true,
  "status": 200,
  "prompt": "Replace the whiteboard with a product screenshot",
  "model": "dall-e-3",
  "size": "1024x1024",
  "result": {
    "provider": "openai",
    "mime_type": "image/png",
    "image_base64": "iVBORw0KGgoAAAANSUhEUgA...",
    "data_uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA...",
    "id": 1700000000
  }
}

Examples

Request

"GET /ai/edit?image_url=https%3A%2F%2Fdataczar-public.s3.amazonaws.com%2Fphotos%2Fstudio.png&mask_url=https%3A%2F%2Fdataczar-public.s3.amazonaws.com%2Fphotos%2Fstudio_mask.png&prompt=Add%20neon%20lights&ak=demo"

Response

{
  "ok": true,
  "prompt": "Add neon lights",
  "model": "dall-e-3",
  "size": "1024x1024",
  "result": {
    "provider": "mock",
    "mime_type": "image/png",
    "image_base64": "iVBORw0K...",
    "data_uri": "data:image/png;base64,iVBORw0K..."
  },
  "status": 200
}

Request

"POST /ai/edit {\"prompt\":\"Swap the product screenshot\",\"image_base64\":\"iVBORw0K...\",\"mask_base64\":\"AAAABBBB...\",\"size\":\"1024x576\"}"

Response

{
  "ok": true,
  "prompt": "Swap the product screenshot",
  "model": "dall-e-3",
  "size": "1024x576",
  "result": {
    "provider": "mock",
    "mime_type": "image/png",
    "image_base64": "iVBORw0K...",
    "data_uri": "data:image/png;base64,iVBORw0K..."
  },
  "status": 200
}

Test Contracts

[
  {
    "name": "edit_with_mask",
    "method": "GET",
    "params": {
      "image_url": "https://dataczar-public.s3.amazonaws.com/examples/edit.png",
      "prompt": "Add Dataczar logo"
    },
    "expect": {
      "ok": true
    }
  }
]

Query parameters

Body parameters

We'll send these as JSON for POST/PUT/PATCH requests and as query params for GET.

Equivalent curl

Grab your Dataczar API key

Every helper runs with the same simple API key. Sign in (or create a free Dataczar account) at Dataczar Connect to issue keys in seconds, then drop the key into any `ak=` parameter and start shipping.

Tip: reuse the same key across these helpers, or rotate keys per project from the Connect dashboard.