Model ID
Use with the Workers AI binding, the AI Gateway REST API, or the Unified API.
Calling the provider directly? Use the provider's model name instead, including with provider-native endpoints or the provider's own SDK. For example, Anthropic's name for anthropic/claude-opus-4.8 is claude-opus-4-8.
- Third-party
Recraft Vectorize converts a raster image (PNG, JPG or WEBP) into a clean, editable SVG made of shapes. Use it to make logos, icons and illustrations scalable. V1 Pro produces higher-quality vectors.
| Model Info | |
|---|---|
| More information | link ↗ |
| Pricing |
|
const response = await env.AI.run(
'recraft/vectorize',
{
image: 'https://arkdocs-en.tos-ap-southeast-1.volces.com/images/image-generation/ocr-test3.png',
version: 'v1_pro',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "recraft/vectorize",
"input": {
"image": "https://arkdocs-en.tos-ap-southeast-1.volces.com/images/image-generation/ocr-test3.png",
"version": "v1_pro"
}
}'{
"state": "Completed",
"result": {
"image": "https://examples.aig.cloudflare.com/recraft/vectorize/sticker-art-to-svg-v1-pro.svg"
}
}Vectorize an Illustration — Turn a raster illustration into an editable SVG.
const response = await env.AI.run(
'recraft/vectorize',
{
image:
'https://cdn.prod.website-files.com/655727fe69827d9a402de12c/679b82f54ef9617939df9d8e_motorcycle--going-fast.png',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "recraft/vectorize",
"input": {
"image": "https://cdn.prod.website-files.com/655727fe69827d9a402de12c/679b82f54ef9617939df9d8e_motorcycle--going-fast.png"
}
}'{
"state": "Completed",
"result": {
"image": "https://examples.aig.cloudflare.com/recraft/vectorize/vectorize-an-illustration.svg"
}
}Cut-Out Shapes — Shapes that don't overlap, for vinyl cutters and screen printing.
const response = await env.AI.run(
'recraft/vectorize',
{
image:
'https://cdn.prod.website-files.com/655727fe69827d9a402de12c/679b82f54ef9617939df9d8e_motorcycle--going-fast.png',
shape_stacking: 'cut_out',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "recraft/vectorize",
"input": {
"image": "https://cdn.prod.website-files.com/655727fe69827d9a402de12c/679b82f54ef9617939df9d8e_motorcycle--going-fast.png",
"shape_stacking": "cut_out"
}
}'{
"state": "Completed",
"result": {
"image": "https://examples.aig.cloudflare.com/recraft/vectorize/cut-out-shapes.svg"
}
}image
stringrequiredminLength: 1URL or data URL of the input image: PNG, JPG or WEBP, under 20 MB, up to 16 MP, sides 256 to 4096 px.version
stringenum: v1, v1_pro"v1" ($0.01) or "v1_pro" (higher-quality vectors, $0.04). Defaults to "v1".shape_stacking
stringenum: hierarchical, cut_out"hierarchical" layers shapes; "cut_out" makes shapes that do not overlap (for cutters and printing). Defaults to "hierarchical".image
string