Image to SVG
Connect Claude, Cursor, VS Code, or Codex to Layer’s MCP server and Image to SVG becomes a tool your agent can reach for — it picks the parameters, runs the generation, and shows you the result in the conversation.
https://mcp.app.layer.ai/mcpAsk your agent
“Use Image to SVG to generate 4 variations of a crystal sword icon on a transparent background.”
execute_forge({
"base_model_id": "fal-image-to-svg",
"prompt": "A crystal sword icon on a transparent background, game UI art",
"batch_size": 4,
"width": 1024,
"height": 1024
})Authenticate with a personal access token, post the model’s own form, and poll the inference until it completes. Every field below is accepted by this endpoint.
# Start the generation — returns an inference id straight away.
curl -X POST https://api.app.layer.ai/api/v2/workspaces/$WORKSPACE_ID/base-models/fal-image-to-svg/inferences \
-H "Authorization: Bearer $LAYER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"guidance_file_init_image": [
{
"url": "https://example.com/input.png"
}
]
}'
# Poll until status is "complete" — the response then carries the asset URLs.
curl https://api.app.layer.ai/api/v2/workspaces/$WORKSPACE_ID/inferences/$INFERENCE_ID \
-H "Authorization: Bearer $LAYER_TOKEN"- vectorization_color_mode enumdefault COLORCOLOR, BINARY
- Full color, or black and white only.
- vectorization_mode enumdefault SPLINESPLINE, POLYGON
- Smooth curves, or straight-edged polygons.
- vectorization_layering enumdefault STACKEDSTACKED, CUTOUT
- Stacked shapes overlap the ones beneath. Cutout shapes leave holes where others sit, so no two overlap. Color output only.
- vectorization_filter_speckle integerdefault 40–20
- Drops specks smaller than this many pixels. Higher cleans up noise but loses fine detail.
- vectorization_color_precision integerdefault 61–10
- How finely colors are told apart. Lower merges similar colors into fewer flat regions. Color output only.
- vectorization_layer_difference integerdefault 161–32
- How different two colors must be to become separate layers. Lower keeps more gradient bands. Color output only.
- vectorization_corner_threshold integerdefault 600–180
- The angle, in degrees, a turn must reach to stay a sharp corner. Higher rounds more corners into curves. Curves only.
- vectorization_length_threshold numberdefault 40–10
- The longest a curve segment may run before it is subdivided. Lower follows the outline more closely, with more points. Curves only.
- vectorization_splice_threshold integerdefault 450–90
- The angle, in degrees, at which a curve is split into separate segments. Lower splits more often. Curves only.
- vectorization_max_iterations integerdefault 101–20
- How many passes the curve fitting makes. More can tidy curves, at the cost of time.
- vectorization_path_precision integerdefault 31–10
- Decimal places kept in path coordinates. Lower makes a smaller file, higher keeps shapes exact.
- guidance_file_init_image file[]required
- The image to modify
- output_fit any
- Trim the transparent margin, and place the image on a canvas of a fixed size.
Why use Image to SVG for image?
High-quality image generation
Image to SVG delivers production-ready outputs with clean structure, sharp detail, and strong prompt adherence. Ideal for character art, environments, and marketing assets.
Strong prompt control
The model interprets creative instructions with high accuracy, even when switching between different styles, lighting setups, or character directions.
Clean compositions for UA
Maintains stable framing, clear silhouettes, and high focal clarity. Assets read well at mobile sizes, making it strong for UA experiments and ad creatives.
Rapid character and cosmetic ideation with strong structure
Quickly explore character poses, cosmetic ideas, and early art directions. Clean silhouettes and expressive results help teams evaluate concepts before moving to heavier models.
Fast UA creative exploration and thumbnail testing
Generate clear, high-readability frames that work well for quick A/B testing across networks. Test multiple creative angles and iterate quickly based on results.
Lightweight environment and item exploration for LiveOps
Draft environments, themed content, shop items, and event visuals in a rapid loop. Ideal for early-stage direction setting before committing to final polish.
FAQ
How much does Image to SVG cost? Is it free?+
How does Layer's pricing work?+
There are no seat fees, feature gates, or plans on Layer. Instead, our platform uses a consumption based system with Creative Units (CUs) with a flexible monthly subscription. Every generation on Layer (image, video, 3D, or audio) consumes a Creative Unit, and you only pay for what you create.
Other image models on Layer
Text Removal 1.0
fal
Remove all the text from an image.
Object Removal
fal
Low-cost object removal by name or by painted area.
Expression Edit 1.0
fal
Change a face's expression to the one you describe.
Pixelcut Background Removal
Pixelcut
High-quality image background removal from Pixelcut.
Recraft V4.1 Pro Vector
Recraft
Recraft's V4.1 Pro text-to-vector model. Generates scalable vector art (SVG) directly from a prompt.
Recraft V4.1
Recraft
Professional design model with extended prompt support (10,000 characters) and advanced style customization.