Dataczar
Browse helpers

Generate branded images from a short brief.

Turns a text prompt into a rendered image using the configured AI provider (OpenAI when `AI_PROVIDER=openai`, deterministic mock otherwise). Size and style defaults follow the Lambda env vars (`AI_IMAGE_MODEL`, `AI_IMAGE_SIZE`) but you can override them per request.

GETPOST/ai/image

Where this helper shines

Generate branded images from a short brief. keeps ai helpers on autopilot. Use it whenever you need to generate branded images from a short brief without pausing a sprint or asking design/dev to jump in.

  • Trigger this helper whenever you need to generate branded images from a short brief without waiting on a full deploy.
  • Drop it into automations (Zapier, Make, workers) to generate branded images from a short brief as part of your workflow.
  • Share the GET URL so support and success can generate branded images from a short brief safely using their Dataczar API key.

Copy & ship snippets

GET

Instant link

GET https://api.dataczar.app/ai/image?prompt=sample-prompt&model=sample-model&size=sample-size&style=sample-style&ak=demo

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

curl

curl GET

curl "https://api.dataczar.app/ai/image?prompt=sample-prompt&model=sample-model&size=sample-size&style=sample-style&ak=demo"

Swap ak=demo with your Dataczar API key.

curl

curl POST

curl -X POST "https://api.dataczar.app/ai/image?ak=demo" \
  -H 'Content-Type: application/json' \
  -d '{
  "prompt": "sample_prompt",
  "model": "sample_model",
  "size": "sample_size",
  "style": "sample_style",
  "quality": "sample_quality",
  "background": "sample_background",
  "negative_prompt": "sample_negative_prompt",
  "response_format": "sample_response_format",
  "format": "png",
  "guidance_scale": 100,
  "steps": 110,
  "seed": 120,
  "n": 130,
  "options": "sample_options"
}'

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

Parameters

Query Parameters

NameTypeDescription
promptstring · requiredShort description of the visual you want to render.
modelstringOverride the default image model (for example, `dall-e-3`).
sizestringCanvas dimensions such as `1024x1024`, `1024x576`, etc.
stylestringHint (vivid, natural, photographic, etc.).
backgroundstringSome providers allow background keywords when generating transparent PNGs.

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 generated successfully.

{
  "ok": true,
  "status": 200,
  "prompt": "Sunset over Dataczar HQ, cinematic lighting",
  "model": "dall-e-3",
  "size": "1024x1024",
  "result": {
    "provider": "openai",
    "mime_type": "image/png",
    "image_base64": "iVBORw0KGgoAAAANSUhEUgAA...",
    "data_uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
    "id": 1234567890
  }
}

Examples

Request

"GET /ai/image?prompt=Generate%20a%20hero%20image%20for%20Dataczar&size=1024x576&ak=demo"

Response

{
  "ok": true,
  "prompt": "Generate a hero image for Dataczar",
  "model": "dall-e-3",
  "size": "1024x576",
  "result": {
    "provider": "mock",
    "mime_type": "image/png",
    "image_base64": "iVBORw0K...",
    "data_uri": "data:image/png;base64,iVBORw0K...",
    "id": 1716422400
  },
  "status": 200
}

Request

"POST /ai/image {\"prompt\":\"Abstract background in Dataczar colors\",\"style\":\"vivid\",\"size\":\"1024x1024\"}"

Response

{
  "ok": true,
  "prompt": "Abstract background in Dataczar colors",
  "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
}

Test Contracts

[
  {
    "name": "basic_image_prompt",
    "method": "GET",
    "params": {
      "prompt": "Generate a Dataczar postcard",
      "size": "512x512"
    },
    "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.