Guide · LinkedIn ad creative API

How to generate LinkedIn ad creative with an API

A LinkedIn ad creative API that produces pixel-perfect 1200×628 images with readable text, headlines and CTAs — pre-sized for Campaign Manager. No Photoshop, no retyping.

Running paid LinkedIn campaigns at any volume means you need a LinkedIn ad creative API, not a design tool. The catch: most text-to-image models produce unreadable text and generic 1024×1024 squares you have to crop, retouch, and retype in Photoshop before uploading to Campaign Manager.

This guide walks through a different approach: describe the ad in natural language, get back a 1200×628 PNG at the exact sponsored-post format with headlines and CTAs rendered as real text — not diffusion pixels. One API call, one file, ready for upload.

Step by step

  1. 01

    Describe the ad, not the picture

    Focus your prompt on the ad brief: brand, audience, key message, tone, CTA. Skip visual directions ('cyberpunk cityscape') — the art director handles composition. A solid prompt is one sentence of context plus headline, stat, and CTA copy.

  2. 02

    Pick the LinkedIn format

    LinkedIn sponsored content uses 1200×628 (landscape). For event ads in personal feed, 1080×1080 square is also supported. The API returns one file at the exact pixel dimensions — no client-side cropping, no letterboxing.

  3. 03

    POST and ship

    Send a POST with your prompt and format, get back a URL to the PNG. The whole round-trip lands under 60 seconds. From there, upload via Campaign Manager API or download and attach manually.

Example prompts

Copy, click, tweak — the CTA opens the terminal with the prompt pre-loaded.

SaaS product launch LinkedIn sponsored post for a B2B observability SaaS. Headline: "See your p99 before your customers do". Stat: "3× faster root-cause". CTA: "Start free". Target: engineering leaders. Tone: confident, technical. Try →
Recruitment / employer branding LinkedIn ad for a climate-tech startup hiring 20 engineers in Milan. Headline: "Build what the planet needs". CTA: "See open roles". Tone: inspiring, human, optimistic. Brand colour: forest green. Try →
Enterprise case study LinkedIn sponsored post featuring Acme Corp as a customer. Headline: "How Acme cut reporting time by 78%". CTA: "Read the case study". Target: VP Finance. Tone: authoritative, data-driven. Try →

API call

Standard REST. Bearer token, JSON body, URL response. Works in any HTTP client, n8n, Make, Zapier, or MCP agent.

curl -X POST https://api.42rows.com/v1/image-creative \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "LinkedIn sponsored post for a B2B observability SaaS...",
    "format": "1200x628"
  }'

Pricing

From $0.18 per ad image. Pay-per-call, no subscription required.

FAQ

Is the text in the image really readable?

Yes. Headlines, stats, and CTA labels are rendered via HTML/CSS over the generated visual — pixel-perfect typography. No diffusion blur, no garbled letters. This is the core difference versus Midjourney, DALL·E, or Ideogram for ad creative.

What LinkedIn ad formats are supported?

1200×628 (landscape sponsored content), 1080×1080 (square feed), and 1080×1920 (Stories). These cover every paid placement except video ads — for those, see the video creative actor.

Can I bring my brand palette and logo?

Mention brand name, hex colours, and tone in the prompt and the art director honours them. Dedicated brand-kit pinning and logo upload ship in the next release.

How fast is a single generation?

Median time is about 45 seconds end-to-end. Under peak load it can extend to ~90s. Still well under the time a designer would spend iterating in Figma.

Does this work inside n8n, Make, or Zapier?

Yes — it is a standard REST endpoint. Any workflow tool that can do an HTTP POST plugs in. There is also an official MCP server for agent-based workflows.

Ship it

Use the first example prompt as a starter — the button opens the public terminal with it pre-filled.