EDNA MODEInteractive API referenceOpenAPICapabilities JSON

Generate ad creatives

Send a public website or an existing ad. Edna Mode queues the generation and serves the finished PNG files through your API key.

Choose an operation

OperationEndpointPurpose
Website to adsPOST /v1/url2adsBuild an evidence-based brief from a public page, generate a marketing image, and run visual review.
ReplicatePOST /v1/replicateCreate ads with distinct compositions around the input offer.
ImprovePOST /v1/improvePolish the ad's hierarchy, spacing and contrast while preserving the content.
ResizePOST /v1/resizeRecompose the ad for an exact pixel size.
Resize multiplePOST /v1/resize_multipleAdapt one ad to 2–5 sizes with one shared image generation.

Use with an MCP client

Connect a Streamable HTTP MCP client to https://ednamode.hao.vc/mcp with the header Authorization: Bearer YOUR_EDNA_KEY. Use transform_ad with mode for single-size transforms or resize_multiple with sizes for a shared generation. Poll with get_job and download with get_output. Your API key limits access to your own account.

Submit a job

Use the bearer key issued by your Edna Mode operator. Pick a unique idempotency key for each new job. Reuse that same key and body if a submission needs a retry.

BASE=https://ednamode.hao.vc

curl -fsS "$BASE/v1/url2ads" \
  -H "Authorization: Bearer $EDNA_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: spring-creative-001' \
  --data '{"url":"https://tanki.su/ru/game/","count":1,"width":1080,"height":1350}'

For existing ads, replace url with source_base64 and use a creative endpoint. Send plain base64 for a PNG, JPEG or WebP up to 6 MiB and 12 megapixels. Set required_text to a list of exact prices, claims or legal strings to preserve. Add instruction for direction such as the intended language.

base64 -w0 input.png | jq -Rs \
  '{source_base64:.,width:300,height:250,count:1,mode:"fast"}' | \
  curl -fsS "$BASE/v1/resize" -H "Authorization: Bearer $EDNA_KEY" \
    -H 'Content-Type: application/json' -H 'Idempotency-Key: spring-resize-001' --data-binary @-

Resize requires both output dimensions. Replicate and improve use the original dimensions within service limits when both are omitted. The creative default is auto. The API also exposes direct, guided, sheet and micro for controlled comparison. Call GET /v1/capabilities for the current options and limits.

For placements with an aspect ratio beyond 3:1, direct uses a geometry guide so the original layout can be adapted without a large crop. Read metadata.layout_strategy for the actual layout strategy.

Guided and sheet exports preserve the full recovered panel. If Edna adds edge padding to match the exact size, metadata.padding_fraction reports its share of the PNG. Padding above 2% is flagged as needs_review.

Choose a generation mode

For resize, replicate, and improve, set mode independently of the layout variant. In a resize batch, set mode on each item.

Review the output of both speed modes before publishing. Their results have no full visual QA.

Generate several sizes on one canvas

Send POST /v1/resize_multiple with source_base64 and sizes, an ordered list of 2–5 distinct width and height pairs. You can also send instruction and required_text.

base64 -w0 input.png | jq -Rs \
  '{source_base64:.,sizes:[{width:970,height:90},{width:300,height:250},{width:1080,height:1080}]}' | \
  curl -fsS "$BASE/v1/resize_multiple" -H "Authorization: Bearer $EDNA_KEY" \
    -H 'Content-Type: application/json' -H 'Idempotency-Key: spring-multisize-001' --data-binary @-

The worker generates one shared canvas and extracts one PNG per size in request order. Each output uses one credit. If a panel cannot be recovered, the job fails and refunds all its credits. Review results before publishing. Use the resize batch endpoint for independent generations.

Queue up to 100 resizes

Upload each distinct input once to POST /v1/sources. Reuse its id for any number of sizes. You can use a source for new jobs for 24 hours after uploading it. Jobs accepted before it expires keep their input until they finish.

SOURCE_ID=$(base64 -w0 input.png | jq -Rs '{source_base64:.}' | \
  curl -fsS "$BASE/v1/sources" -H "Authorization: Bearer $EDNA_KEY" \
    -H 'Content-Type: application/json' --data-binary @- | jq -er .id)

jq -n --arg source "$SOURCE_ID" '{
  items:[
    {custom_id:"ad-square",source_id:$source,width:1080,height:1080},
    {custom_id:"ad-story",source_id:$source,width:1080,height:1920}
  ]
}' | curl -fsS -i "$BASE/v1/resize/batches" \
  -H "Authorization: Bearer $EDNA_KEY" -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: spring-resize-batch-001' --data-binary @-

Use a unique custom_id per item to match it to a task in your project. The API accepts the whole batch in one transaction and returns HTTP 202. Reuse the same body and Idempotency-Key when retrying a submission. The account needs one available credit per requested output. Each account can have up to 100 batch items queued or running at a time.

Poll the returned Location, GET /v1/resize/batches/{batch_id}, every few seconds. The response gives progress counts, each item's custom_id, status, error and job_url. A batch is completed when all its items have succeeded or failed. Follow each successful item's job_url to get its PNG download links.

Poll and download

Submission returns HTTP 202 and a Location header. Poll that path every few seconds with your bearer key. On succeeded, download each relative outputs[].url with the same key. Read outputs[].qa_status and its detailed metadata before using an image. A creative with needs_review or unverified needs a human check. URL2Ads adds the Russian «Реклама» label and checks the candidate against the page evidence. Use URL2Ads variant draft to receive and inspect an explicitly flagged candidate when the visual review rejects both attempts. Review claims and any additional required legal disclosures before publishing.

curl -fsS "$BASE/v1/jobs/$JOB_ID" -H "Authorization: Bearer $EDNA_KEY"
curl -fsS "$BASE/v1/jobs/$JOB_ID/outputs/0" -H "Authorization: Bearer $EDNA_KEY" -o ad.png

Each requested output reserves one lifetime image credit. Failed jobs refund their reservation. Check GET /v1/quota and GET /v1/jobs to see your balance and history. A 409 means the idempotency key was used with different inputs. A 429 reports quota_exceeded or queue_full. Failed jobs include an error code. Ask the operator for help with that code and the job ID if a problem persists.