Use case · icons · 5 credits per vector mark

AI app icons and favicons: generate the mark, then every size from it

Generate the icon as vector, and every pixel size you need falls out of that one file. Not because vector is tidier, but because it is the only way to get an exact pixel size out of this API — nothing here resizes a raster image.

Every project ends the same way: a default globe in the browser tab, twenty icons pulled from three different libraries, and a manifest referencing files nobody generated. Half an hour of work that never has half an hour available.

By the imagemcpserver.com teamPublished Updated

one vector, every size

72px

48px

32px

24px

16px

Thick strokes and two colours are why it still reads at 16 pixels. That is a prompt decision, not an export setting.

Two different jobs that both get called “icons”

UI icon sets

text_to_svg · 5 cr each

Twenty-odd marks that appear next to labels, in buttons and in menus. They need to be vector, they need to share a stroke weight, and they need to survive being rendered at 20 pixels next to 14-pixel text.

{subject}, single mark, 2px uniform stroke, two colours only, rounded caps, no fill, centred in a 24px square, generous padding”

Vary only {subject} and generate them in one batch. Every constraint has to be in the words — there are no style presets to lean on.

App icon & favicon

text_to_svg → sized SVG → convert_format

One mark, rendered into whatever pixel dimensions the platforms insist on. The design constraint is brutal: it has to be recognisable at 16 pixels, which rules out detail, gradients and anything resembling a scene.

“Bold single-shape logomark, one accent colour on dark, high contrast, no text, no fine detail, readable at 16 pixels”

Check the 16px render first. If it works there it works everywhere.

The mechanism worth knowing

Why the mark has to be vector

The obvious plan is to generate one big square PNG and shrink it into the sizes you need. That plan cannot work here, because nothing in this API resizes a raster image. There is no width or height parameter on any endpoint. Conversion changes the container and leaves the dimensions alone. Compression re-encodes at the same pixel size. The upscaler only goes up, and does not take a target size either.

A vector has no such problem. An SVG is rasterised at whatever dimensions the file itself declares, so setting width and height before each conversion gives you an exact size — 512, 180, 32, 16 — from a single generated mark, each one with a clean alpha channel and each one genuinely tiny.

That is the whole trick, and it is why vector-first is not a matter of taste on this platform. It is the only route to a specific pixel dimension.

one mark → every size
// A vector rasterises at the size its own file declares, so the
// width/height attributes are the resize control this API lacks.
const sizes = [512, 192, 180, 32, 16];

for (const px of sizes) {
  const sized = svgCode.replace(
    /<svg /,
    `<svg width="${px}" height="${px}" `
  );

  await fetch("https://api.imagemcpserver.com/v1/convert-format", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.IMAGEMCP_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      image: "data:image/svg+xml;base64," +
        Buffer.from(sized).toString("base64"),
      targetFormat: "png",
    }),
  });
  // -> an exact px x px transparent PNG, 1 credit each
}

The files a site actually needs

Fewer than you have been told. The old guides listing twenty-plus sizes are a decade out of date; current advice converges on three or four files, with the SVG doing most of the work. Checked September 2026.

The icon files a modern site needs, with the size, purpose and which endpoint produces each.
FileSizeWhat it is forProduced by
icon.svgSVGModern browsers. Crisp at any density, and can carry a dark-mode rule inside the file.text_to_svg
apple-touch-icon.png180 × 180iOS home screen. The one PNG you definitely still need.convert_format
favicon.ico32 × 32Older browsers and some crawlers.not supported here
icon-192.png192 × 192Web manifest, Android install prompt.convert_format
icon-512.png512 × 512Web manifest, splash screens, store listings.convert_format

Two things this API will not do for you

Worth knowing before you plan a build step around it, because both are hard limits rather than settings you have not found yet.

no ICO output

It cannot write favicon.ico

The supported output formats are PNG, JPEG, WebP, GIF, TIFF and AVIF. ICO is not among them, and an ICO is a container holding several sizes at once rather than a plain image, so it is not a near miss.

no raster resize

It cannot shrink an existing image

No endpoint takes a width or a height. If your mark is already a PNG rather than a vector, this API cannot produce the smaller sizes from it — you will need to resize locally or use a dedicated tool.

The sensible division of labour

Free favicon generators are excellent at the mechanical half — they will take one image and emit the ICO, every PNG size and the HTML snippet in a ZIP. What none of them will do is invent the mark, because they expect you to arrive with artwork or a piece of typed text. So use this to make the mark, and hand the SVG to one of them if you want the complete pack without writing the loop yourself. That is a better answer than pretending we cover ground we do not.

What an icon set costs

Credit cost of producing a complete app icon and favicon set from a single generated mark.
StepCallsCredits
Generate the mark as vector1 × text_to_svg5
Render four PNG sizes from it4 × convert_format4
Allow for a retry on the mark1 × text_to_svg5
A complete icon set14

A twenty-icon UI set is 100 credits at 5 each. And if you already hold the SVG locally you can rasterise it for nothing — the conversion calls exist for agents that only have a URL. See plans →

Icon generation questions

Should the favicon be SVG or PNG?

SVG first. Modern browsers take an SVG favicon, it stays crisp at every density, it is one file instead of a folder of them, and it can respond to dark mode with a media query inside the file. You still want a PNG apple-touch-icon for iOS and PNGs in the web manifest, but those are derived from the vector rather than drawn separately. Guidance checked September 2026.

What favicon sizes do I actually need?

Far fewer than the old twenty-two-size lists suggest. The current consensus is roughly three or four files: an SVG for modern browsers, a 180×180 apple-touch-icon PNG, a favicon.ico at 32×32 for older browsers, and 192×192 plus 512×512 PNGs if you ship a web manifest. Generating twenty sizes was cargo-culted advice years ago and is mostly dead weight now. Checked September 2026 — verify against current browser guidance before you commit a build step to it.

Can this API produce the whole favicon pack?

Partly, and it is worth being precise. It generates the mark, which is the part that needs judgement. It can render that vector into exact pixel sizes, because a vector is rasterised at whatever dimensions the file declares. What it cannot do is write a favicon.ico — ICO is not a supported output format — and it cannot resize an existing raster image at all. If you want a complete pack with the ICO and the HTML snippet, generate the mark here and hand the SVG to a dedicated favicon generator; several are free and very good at exactly that.

Why can’t I generate a big PNG and shrink it?

Because nothing in this API resizes a raster. There is no width or height parameter on any endpoint, conversion changes the container without touching dimensions, and compression re-encodes at the same pixel size. The upscaler only enlarges, and it does not take a scale factor either. Working from a vector is not a stylistic preference here — it is the only route to an exact pixel size.

How do I get a set of UI icons that look like a set?

Fix the constraints in every prompt — stroke weight, colour count, corner radius, filled or outlined, the padding inside the square — and vary only the subject. Then generate them together in one batch rather than one at a time over several weeks, which is when sets drift. The prompt is the only control the vector endpoint offers, so the constraints have to live in the words.

Are there style presets like "icon" or "logo"?

No. Vector generation takes a prompt and nothing else — there are no style presets, and any you may have seen documented do not reach the model. Describe the style in the prompt itself: "single mark, uniform 2px stroke, two colours, rounded caps, no fill" does the work that a preset would pretend to.

Can it make a logo, not just an icon?

It can produce a credible logomark, which is genuinely useful for a prototype, an internal tool or a project that needs to look finished this week. A brand identity a company will live with for a decade is a different exercise and worth a human designer. Treat what comes back as a strong starting point rather than a finished identity.

How much does an icon set cost?

Vector generation is 5 credits, the cheapest creative call here. Rendering that mark into five pixel sizes is 1 credit per conversion, so a complete icon set from one mark is about 10 credits including a retry or two. A twenty-icon UI set is 100 credits. If you already hold the SVG locally you can rasterise it for nothing, so the conversion calls are really for agents that only have a URL.

What if the vector generation fails?

It fails quietly, which matters if you are scripting this. When the endpoint cannot produce usable vector output it returns a fixed placeholder — a card with a circle, a star and your prompt printed across the bottom — with a 200 status, success: true, and the full 5 credits deducted. The placeholder is identical every time, so check the returned SVG for its signature before you write it to disk.

Reference

Supported formats, credit costs and the absence of any resize parameter were read from the request handlers. The vector-sizing behaviour was reproduced against the encoder this API runs. Favicon guidance is third-party and has changed materially in recent years — checked September 2026.