PopNowAPI
Get API key

by Recraft

SVG icons and illustrations in 21 vector styles

recraft/20b-svg/text-to-image
  • 5 aspect ratios
  • SVG Generator

About Recraft 20B SVG

SVG icons and illustrations in 21 vector styles.

Call it with the model name recraft/20b-svg/text-to-image on POST /jobs/createTask, from $0.0528.

Introduction

Instead of describing a style in words, you pick it from a list of 21 named looks.

Key features

21 named styles

Icon styles include outline, broken_line, colored_outline, colored_shapes, colored_shapes_gradient, doodle_fill, doodle_offset_fill, offset_fill, outline_gradient and uneven_fill.

Quick turnaround

Our runs took about 11 seconds each, which makes batch icon work practical.

Small files

Icons came back at 20–25 KB.

Request parameters

ParameterRequiredDescription
styleNoA preset look or genre. vector_illustration · vector_illustration/cartoon · vector_illustration/doodle_line_art · vector_illustration/engraving · vector_illustration/flat_2 · vector_illustration/kawaii · vector_illustration/line_art · vector_illustration/line_circuit · vector_illustration/linocut · vector_illustration/seamless · icon · icon/broken_line · icon/colored_outline · icon/colored_shapes · icon/colored_shapes_gradient · icon/doodle_fill · icon/doodle_offset_fill · icon/offset_fill · icon/outline · icon/outline_gradient · icon/uneven_fill · Default: vector_illustration
promptYesDescribe what you want to make.
aspect_ratioNoThe shape of the frame: wide, square or tall. 1:1 · 16:9 · 9:16 · 4:3 · 3:4 · Default: 1:1

Pricing

Prices are in USD. The API uses a separate USD balance. Website credits cannot be used or transferred to it, and API funds cannot be transferred to website credits. When a task is accepted, we reserve the maximum quoted amount from your API balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

OptionUSD per image
Standard$0.0528

Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.

Use cases

Product icon libraries

Generate a consistent set for navigation, settings and feature lists.

Stickers and stamps

Use linocut, engraving or line art for print and cutting machines.

Prompt guide & pro tips

One object per icon

Short prompts such as a mountain with a rising sun give cleaner icons than long scene descriptions.

Lock the style for a set

Use the same style value for every icon in a set.

Keep text out of icons

The model is weak at lettering; add labels in your design tool.

API quick start

Call the Recraft 20B SVG API in three steps

  1. Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls use your separate USD balance.
  2. Send the request. POST /jobs/createTask with model recraft/20b-svg/text-to-image and an input object that follows the parameter table. The response returns a task ID straight away.
  3. Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "model": "recraft/20b-svg/text-to-image",
  "input": {
    "prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
    "style": "vector_illustration",
    "aspect_ratio": "1:1"
  }
}'

# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.

Recraft 20B SVG API questions

How much does the Recraft 20B SVG API cost?

Recraft 20B SVG costs $0.0528 per image. The API uses a separate USD balance. Website credits cannot be used or transferred to it, and API funds cannot be transferred to website credits. When a task is accepted, we reserve the maximum quoted amount from your API balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

What is the model name for Recraft 20B SVG in the API?

Put recraft/20b-svg/text-to-image for SVG Generator in the model field of POST /jobs/createTask.

Which style should I use for UI icons?

icon/outline gives single-weight line icons, icon/colored_outline adds soft fills inside the lines, and icon/colored_shapes drops the outline for solid shapes. Use one style for a whole set so the icons match.

Are the files real vectors?

Yes. Our outputs held between 13 and 90 path elements and nothing else that draws, and any SVG that embeds a bitmap is rejected on delivery.

What are the limits of the Recraft 20B SVG API?

Aspect ratios: 1:1 · 16:9 · 9:16 · 4:3 · 3:4; Prompt length (characters): 1,000. Requests outside these limits are rejected before anything is charged.

Can I try Recraft 20B SVG without writing code?

Run Recraft 20B SVG in the Playground with your API USD balance, without an API key. Each run appears in your developer history with its matching code.

All Recraft models

More about Recraft 20B SVG