Skip to content

Developers · API reference

Crisp Vector API

This is the exact same model that powers the website, hosted on Replicate. Send it a single logo, a list of files or a zip archive from Node, Python or plain HTTP, and get clean SVGs back, billed straight to your own Replicate account.

Model
gregpriday/crisp-vector
Version
f74491378327… pinned
Runs on
Replicate, CPU
Price
$0.25 per 1,000 logos about 2.5 s billed per logo
Input
One image, a list or a zip PNG, JPEG, WebP, GIF, BMP, TIFF · up to 10 MB and 16 MP each
Output
One SVG for every image
Clients
Node, Python, HTTP
The PNG that went in: the Tidewater Brewing Co. logo as ChatGPT drew it, on a white background

TideWater.png.png

1536×15361.7 MB

POST /v1/predictions

replicate.run(
  'gregpriday/crisp-vector:f744…',
  { input: { images: [logo] } }
)

● succeeded1 imagedefault settings

The SVG that came back: the same Tidewater Brewing Co. logo as 2 paths with the background removed, its anchor points traced over it

000.svg.svg

2 paths759 points11.5 KB

Real calls on default settings, with logos from the AI logos guide: each PNG as ChatGPT made it, and the SVG the model sent back.
Example logo

Quickstart

All you need is a Replicate account. Replicate runs the model and bills you for the time it uses, so there’s nothing to sign up for here. Pick your language once and every example on this page will follow it.

Your language
  1. Get a Replicate token

    Sign in to Replicate and create an API token. Calls are billed to that account by the second.

    Create a token
  2. Set it, and install the client

    The official client reads the token from the environment.

    Terminal

    export REPLICATE_API_TOKEN=r8_…
    npm install replicate
  3. Convert a logo

    Save the code as convert.mjs next to logo.png, then run node convert.mjs. The SVG is saved next to them with the background removed, using the same settings as the website. The code is below.

Convert one logo · convert.mjs

import Replicate from 'replicate';
import fs from 'node:fs/promises';

// Reads REPLICATE_API_TOKEN.
const replicate = new Replicate();
const png = await fs.readFile('logo.png');

const [svg] = await replicate.run(
  'gregpriday/crisp-vector:f74491378327e1454dd5f8c55efdd845d0ed69931240e2c681fa6d1b5aa52b93',
  { input: { images: [png] } }
);

await fs.writeFile('logo.svg', svg);

Inputs

Only images is required. Everything else defaults to what the website uses, so leaving the options alone gets you the website’s settings, with Background on Remove.

images array of files or URLs Required

The logos to convert, or a .zip of them. Each one becomes an SVG, and they’re converted in parallel.

Pass public URLs or local files. The Node and Python clients upload local files for you. With plain HTTP, a small file can go inline as a data URL.

Formats
PNG, JPEG, WebP, GIF, BMP, TIFF, or a .zip of them
Size
Up to 10 MB and 16 megapixels each
Large images
Processed at 2048 px on the long side
Output
One SVG per image, named by its position
  • quality string

    How much work goes into each shape.

    • refined Default The best result. What the website uses.
    • balanced Skips the vertex network and stroke rebuild. About 25 to 40% faster.
    • fast The quickest and roughest.
  • background string

    What happens to the colour behind the logo.

    • remove Default A transparent background.
    • keep The estimated solid background, added as a rectangle.
  • gradients boolean

    Whether smooth gradients are kept as gradients.

    • true Default Smooth colour gradients come out as SVG gradients.
    • false No gradients in the file: every shape gets a solid fill.
  • enclosed string

    Background-coloured shapes inside the mark, like the middle of an O.

    • hole Default Cut out, so the page shows through.
    • fill Painted in the background colour.

Output

You get back a list of file URLs, one for each image. The Node and Python clients give you files you can save straight to disk. Plain HTTP gives you the URLs.

A real response, trimmed · response.json

{
  "id": "…",
  "status": "succeeded",
  "output": [
    "https://replicate.delivery/xezq/…/000.svg"
  ],
  "logs": "input 1 -> 000.svg (0.11 s)\n1 image(s) in 0.11 s",
  "metrics": {
    "images": 1,
    "paths": 3,
    "predict_time": 0.218
  }
}

When an input fails · response.json

"error": "… input 2: not a PNG, JPEG, WebP, GIF, BMP or TIFF image"
  • Named by position

    000.svg is the first image, 001.svg the second, and so on. Images from a zip go in name order and keep their names, like 003-acme.svg.

  • Not sorted

    The output list comes back in any order, so match each SVG to its input by file name, not by where it sits in the list.

  • Deleted after an hour

    Replicate deletes a call’s inputs, outputs and logs after an hour, so download the SVGs rather than storing the links.

  • Errors say which file

    A bad file fails the call, and the error gives its position (counting from 1) so you know which one to take out.

Converting a batch

If you’ve got a folder of logos, zip it and send the one file. This example also keeps the background as a shape and trades a little polish for speed.

Convert a batch · batch.mjs

Language
import Replicate from 'replicate';
import fs from 'node:fs/promises';

const replicate = new Replicate();
const zip = await fs.readFile('logos.zip');

const output = await replicate.run(
  'gregpriday/crisp-vector:f74491378327e1454dd5f8c55efdd845d0ed69931240e2c681fa6d1b5aa52b93',
  {
    input: {
      images: [zip],
      quality: 'balanced',
      background: 'keep'
    }
  }
);

// The list isn't in input order.
// The file names are: 000-acme.svg, …
for (const svg of output) {
  const { pathname } = svg.url();
  const name = pathname.split('/').pop();
  await fs.writeFile(name, svg);
}

Price and limits

Replicate bills your account for the CPU time each call uses, with no plan and no minimum. Logos are small, so 1,000 of them come to about $0.25.

per 1,000 logos at the measured pace
$0.25
billed per logo, on average
2.5 s
seconds a cold start can add, after the model has been idle
10 to 80
and 16 megapixels, per image
10 MB
  • owner/model:version

    Pin the version

    Every example here names version f7449137, so an update to the model can’t change your output. The newest version is on the Versions tab.

  • Prefer: wait

    Wait, or get called back

    Prefer: wait holds the request open for up to 60 seconds and returns the SVGs if they’re done by then. For anything longer, pass a webhook and Replicate posts the finished call to it.

  • Cancel-After: 10m

    Set a deadline

    Cancel-After stops a call that runs too long, so a stuck batch can’t bill you for hours. The website uses ten minutes.

  • 2048 px

    Send what it will use

    Anything over 2048 px is processed at 2048 px anyway, so resize big images first and upload less.

How I worked out the price · Replicate CPU (4 vCPU, 8 GB) at $0.0001/s × about 2.5 s per logo × 1,000 = about $0.25. Measured 2 Oct 2026: ten logos in one batch billed 24.6 s. Bigger, busier logos take longer. Sources: Replicate pricing, the model.

Common questions

Price, cold starts, batches and what happens to your images.