curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "recraft/v4.1/text-to-vector",
"input": {
"prompt": "Flat vector icon set of a hot air balloon, a brass compass and a mountain tent, rounded shapes, consistent stroke weight",
"size": "1:1"
}
}
'{
"code": 200,
"data": {
"task_id": "task-example-001",
"status": "not_started",
"created_time": "2026-11-25T10:30:00"
}
}{
"detail": "prompt is required"
}{
"detail": "prompt is required"
}Recraft
Recraft V4.1 Text to Vector
The Recraft V4.1 Text to Vector API turns a prompt into one editable SVG file, with 5 aspect ratios, up to 10 preferred colors and a background color.
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "recraft/v4.1/text-to-vector",
"input": {
"prompt": "Flat vector icon set of a hot air balloon, a brass compass and a mountain tent, rounded shapes, consistent stroke weight",
"size": "1:1"
}
}
'{
"code": 200,
"data": {
"task_id": "task-example-001",
"status": "not_started",
"created_time": "2026-11-25T10:30:00"
}
}{
"detail": "prompt is required"
}{
"detail": "prompt is required"
}- After submission, a
task_idwill be returned. If you provided acallback_url, when the task status becomesfinishedorfailed, a POST request will be sent to thecallback_url. - Regardless of whether
callback_urlis provided, you can retrieve the result through the unified Query Task Status endpoint.
Models
- recraft/v4.1/text-to-vector — Text to SVG with Recraft V4.1 Vector, one SVG file per request.
Features
- Text-to-SVG from prompts up to 10,000 characters.
- Editable vector shapes that you can reshape and recolor in any vector editor.
- Five aspect ratios:
1:1,4:3,3:4,16:9,9:16. - A preferred color palette of up to 10 RGB colors, plus a preferred background color.
- One SVG file per request at a flat per-request rate.
Required parameters
prompt(string): Description of the vector artwork. 1–10,000 characters, with at least one non-whitespace character.
Optional parameters
size(string): Aspect ratio:1:1,4:3,3:4,16:9or9:16. Default1:1.colors(object[]): Preferred color palette, up to 10 colors. Each color is an object such as{"r": 18, "g": 52, "b": 86}with integers from 0 to 255.background_color(object): Preferred background color as one RGB object with integerr,gandbfrom 0 to 255.
Output
The finished task returns one SVG file in thefiles array of Query Task Status and the callback payload. Open it in any vector editor to reshape or recolor it, or embed it directly in a web page.
Examples
- Square icon set: three travel icons in one
1:1SVG. - Badge with palette and callback: a hummingbird badge with three
colors, a whitebackground_colorand acallback_url.
Notes
- Each request returns exactly one SVG file.
inputaccepts the fields listed above; other fields return 400. Putmodelandcallback_urlat the request root, next toinput. - Each RGB object uses exactly the keys
r,gandb, each an integer from 0 to 255. Other color values, or more than 10 entries incolors, return 400. - Each request is billed at a flat rate for this model ID;
size,colorsandbackground_colorkeep the price the same. Credits are reserved at submission, and a failed task is refunded in full. See the pricing page for current rates.
Body
application/json