> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vidgo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

> [!TIP]
>
> 1. After submission, a `task_id` will be returned. If you provided a `callback_url`, when the task status becomes `finished` or `failed`, a POST request will be sent to the `callback_url`.
> 2. Regardless of whether `callback_url` is provided, you can retrieve the result through the unified [Query Task Status](https://docs.vidgo.ai/api-manual/task-management/status.md) endpoint.

Recraft V4.1 Text to Vector turns a text prompt into one SVG file. Recraft says the Vector models "deliver fully exportable vectors that you can reshape, recolor, and tweak until they're perfect." Use it for logos, icons, stickers and flat illustrations that stay sharp at any size.

Recraft V4.1 is Recraft's image model family, released on May 14, 2026. Vidgo exposes five model IDs with the same input fields: [V4.1 Flash Text to Image](https://docs.vidgo.ai/api-manual/image-series/recraft-v4-1-flash-text-to-image.md), [V4.1 Text to Image](https://docs.vidgo.ai/api-manual/image-series/recraft-v4-1-text-to-image.md), [V4.1 Pro Text to Image](https://docs.vidgo.ai/api-manual/image-series/recraft-v4-1-pro-text-to-image.md), [V4.1 Text to Vector](https://docs.vidgo.ai/api-manual/image-series/recraft-v4-1-text-to-vector.md) and [V4.1 Pro Text to Vector](https://docs.vidgo.ai/api-manual/image-series/recraft-v4-1-pro-text-to-vector.md).

## 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:9` or `9:16`. Default `1: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 integer `r`, `g` and `b` from 0 to 255.

## Output

The finished task returns one SVG file in the `files` array of [Query Task Status](https://docs.vidgo.ai/api-manual/task-management/status.md) 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:1` SVG.
* **Badge with palette and callback**: a hummingbird badge with three `colors`, a white `background_color` and a `callback_url`.

## Notes

* Each request returns exactly one SVG file. `input` accepts the fields listed above; other fields return 400. Put `model` and `callback_url` at the request root, next to `input`.
* Each RGB object uses exactly the keys `r`, `g` and `b`, each an integer from 0 to 255. Other color values, or more than 10 entries in `colors`, return 400.
* Each request is billed at a flat rate for this model ID; `size`, `colors` and `background_color` keep the price the same. Credits are reserved at submission, and a failed task is refunded in full. See the [pricing page](https://vidgo.ai/apis/api-pricing) for current rates.


## OpenAPI

````yaml api-manual/image-series/recraft-v4-1-text-to-vector.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Recraft V4.1 Text to Vector
  description: >-
    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.
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Recraft V4.1 Text to Vector
      summary: Submit Recraft V4.1 Text to Vector Task
      operationId: submitRecraftV41TextToVectorTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              basic:
                summary: Square icon set
                value:
                  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'
              palette:
                summary: Badge with palette and callback
                value:
                  model: recraft/v4.1/text-to-vector
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      Circular vector badge of a hummingbird sipping from a
                      hibiscus flower, bold simple shapes
                    size: '1:1'
                    colors:
                      - r: 0
                        g: 121
                        b: 107
                      - r: 233
                        g: 30
                        b: 99
                      - r: 255
                        g: 235
                        b: 59
                    background_color:
                      r: 255
                      g: 255
                      b: 255
      responses:
        '200':
          description: >-
            Task submission result. A task ID identifies asynchronous work;
            generation may still be running.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      additionalProperties: false
      properties:
        model:
          type: string
          example: recraft/v4.1/text-to-vector
        callback_url:
          type: string
          format: uri
          description: Optional webhook URL for completion or failure notifications.
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - prompt
          additionalProperties: false
          properties:
            prompt:
              type: string
              minLength: 1
              maxLength: 10000
              description: >-
                Text description of the vector artwork you want. 1–10,000
                characters, with at least one non-whitespace character.
            size:
              type: string
              enum:
                - '1:1'
                - '4:3'
                - '3:4'
                - '16:9'
                - '9:16'
              default: '1:1'
              description: Aspect ratio of the output.
            colors:
              type: array
              maxItems: 10
              items:
                $ref: '#/components/schemas/RGBColor'
              description: >-
                Preferred color palette: up to 10 RGB colors that steer the
                colors of the result. Each color is an object with integer `r`,
                `g` and `b` values from 0 to 255.
            background_color:
              allOf:
                - $ref: '#/components/schemas/RGBColor'
              description: >-
                Preferred background color as one RGB object with integer `r`,
                `g` and `b` values from 0 to 255.
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-example-001
            status:
              type: string
              example: not_started
            created_time:
              type: string
              format: date-time
              example: '2026-11-25T10:30:00'
    ErrorResponse:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: Error message. See [Error Codes](/api-manual/error-codes).
          example: prompt is required
    RGBColor:
      type: object
      required:
        - r
        - g
        - b
      additionalProperties: false
      description: RGB color.
      properties:
        r:
          type: integer
          minimum: 0
          maximum: 255
          description: Red value, 0–255.
        g:
          type: integer
          minimum: 0
          maximum: 255
          description: Green value, 0–255.
        b:
          type: integer
          minimum: 0
          maximum: 255
          description: Blue value, 0–255.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Use `Authorization: Bearer VIDGO_API_KEY`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.