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

# Create Image

> Generate an image from a text prompt using Recraft V4.1, the latest
Recraft generation.

**Key Features:**
- Improved text rendering and design over V4
- `tier` selects price and output size: `mid` matches V4, `pro` matches V4 Pro
- `variant` selects how literally the model follows the prompt:
  `standard` applies its own art direction, `utility` renders neutrally

**Best for:**
- `standard`: finished design pieces
- `utility`: diagrams, wireframes, UI mockups and any asset that must
  follow the prompt exactly

**Output:** one image per request, delivered as a URL in the task's
`generated` array. Exact sizes are listed under `aspect_ratio`.

**Credits:** `tier: mid` is billed as Recraft V4 and `tier: pro` as
Recraft V4 Pro. `variant` does not affect the price.

The request is processed asynchronously: the endpoint returns a task id
immediately. Retrieve the result by polling the task endpoint or by
providing an optional `webhook_url`.




## OpenAPI

````yaml POST /v1/ai/text-to-image/recraft-v4-1
openapi: 3.0.0
info:
  description: >-
    The Magnific API is your gateway to a vast collection of high-quality
    digital resources for your applications and projects. As a leading platform,
    it offers a wide range of graphics, including vectors, photos,
    illustrations, icons, PSD templates, and more, all curated by talented
    designers from around the world.
  title: Magnific API
  version: 1.0.0
servers:
  - description: B2B API Production V1
    url: https://api.magnific.com
security:
  - magnificApiKey: []
paths:
  /v1/ai/text-to-image/recraft-v4-1:
    post:
      tags:
        - text-to-image
      summary: Create image from text - Recraft V4.1
      description: >
        Generate an image from a text prompt using Recraft V4.1, the latest

        Recraft generation.


        **Key Features:**

        - Improved text rendering and design over V4

        - `tier` selects price and output size: `mid` matches V4, `pro` matches
        V4 Pro

        - `variant` selects how literally the model follows the prompt:
          `standard` applies its own art direction, `utility` renders neutrally

        **Best for:**

        - `standard`: finished design pieces

        - `utility`: diagrams, wireframes, UI mockups and any asset that must
          follow the prompt exactly

        **Output:** one image per request, delivered as a URL in the task's

        `generated` array. Exact sizes are listed under `aspect_ratio`.


        **Credits:** `tier: mid` is billed as Recraft V4 and `tier: pro` as

        Recraft V4 Pro. `variant` does not affect the price.


        The request is processed asynchronously: the endpoint returns a task id

        immediately. Retrieve the result by polling the task endpoint or by

        providing an optional `webhook_url`.
      operationId: create_image_from_text_recraft_v4_1
      requestBody:
        content:
          application/json:
            examples:
              required-params:
                $ref: '#/components/examples/request-recraft-v4-1-required-params'
              all-params:
                $ref: '#/components/examples/request-recraft-v4-1-all-params'
            schema:
              $ref: '#/components/schemas/ttirecraft-v41-request-content'
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                success - in progress task:
                  $ref: '#/components/examples/200-task-in-progress'
              schema:
                $ref: >-
                  #/components/schemas/get_style_transfer_task_status_200_response
          description: >-
            OK - The request has succeeded and the Recraft V4.1 process has
            started.
        '400':
          $ref: '#/components/responses/400-bad-request'
        '401':
          $ref: '#/components/responses/401-unauthorized'
        '500':
          $ref: '#/components/responses/500-internal-server-error'
        '503':
          $ref: '#/components/responses/503-service-unavailable'
components:
  examples:
    request-recraft-v4-1-required-params:
      description: >
        The minimum request. Defaults to `tier: mid` and `variant: standard`, so
        it

        renders a 1024x1024 image and is billed as Recraft V4.
      summary: Only the required parameter
      value:
        prompt: A storefront sign that reads OPEN DAILY 9AM, flat vector poster style
    request-recraft-v4-1-all-params:
      description: >
        A utility render at the pro tier: 2688x1536, no invented colour or
        ornament,

        prompt sent verbatim. Billed as Recraft V4 Pro, since `tier` is what
        sets the

        price — `variant` does not.
      summary: Every parameter
      value:
        prompt: >-
          A mobile app settings screen with a title Settings and three rows:
          Notifications, Privacy, About
        aspect_ratio: widescreen_16_9
        tier: pro
        variant: utility
        enhance_prompt: false
        webhook_url: https://www.example.com/webhook
    200-task-in-progress:
      summary: Success - Task in progress
      value:
        data:
          generated: []
          task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          status: IN_PROGRESS
  schemas:
    ttirecraft-v41-request-content:
      properties:
        prompt:
          description: >
            Text description of the image you want to generate.


            **Tips:**

            - Recraft's strength is rendering legible text inside the image, so
            spell
              out any wording the design must contain
            - Describe layout, palette and typography, not just the subject


            **Examples:**

            - Simple: "A storefront sign that reads OPEN DAILY 9AM"

            - Detailed: "A storefront sign that reads OPEN DAILY 9AM, flat
            vector poster style, cream and navy palette, bold rounded display
            type"
          example: >-
            A storefront sign that reads OPEN DAILY 9AM, flat vector poster
            style
          maxLength: 10000
          minLength: 1
          type: string
        aspect_ratio:
          default: square_1_1
          description: >
            Aspect ratio of the generated image, expressed as *_width_height.


            Recraft renders from a fixed set of sizes, so the output dimensions
            are the

            ones listed below and are **not always the exact mathematical ratio
            the

            name suggests** — `widescreen_16_9` renders 1344x768, which is 7:4.


            | `aspect_ratio` | V4 / V4.1 `mid` | V4 Pro / V4.1 `pro` |

            |---|---|---|

            | `square_1_1` | 1024x1024 | 2048x2048 |

            | `horizontal_2_1` | 1536x768 | 3072x1536 |

            | `vertical_1_2` | 768x1536 | 1536x3072 |

            | `standard_3_2` | 1280x832 | 2560x1664 |

            | `portrait_2_3` | 832x1280 | 1664x2560 |

            | `classic_4_3` | 1216x896 | 2432x1792 |

            | `traditional_3_4` | 896x1216 | 1792x2432 |

            | `social_5_4` | 1152x896 | 2304x1792 |

            | `social_post_4_5` | 896x1152 | 1792x2304 |

            | `widescreen_16_9` | 1344x768 | 2688x1536 |

            | `social_story_9_16` | 768x1344 | 1536x2688 |
          enum:
            - square_1_1
            - horizontal_2_1
            - vertical_1_2
            - standard_3_2
            - portrait_2_3
            - classic_4_3
            - traditional_3_4
            - social_5_4
            - social_post_4_5
            - widescreen_16_9
            - social_story_9_16
          example: square_1_1
          type: string
        tier:
          default: mid
          description: >
            Quality tier, which selects both the price and the output size.

            - `mid`: the V4 sizes listed under `aspect_ratio` (default)

            - `pro`: twice the linear dimensions, four times the pixels


            **Credits:** `mid` is billed as Recraft V4 and `pro` as Recraft V4
            Pro.
          enum:
            - mid
            - pro
          example: mid
          type: string
        variant:
          default: standard
          description: |
            How much art direction the model applies on top of the prompt.
            - `standard`: the model adds its own visual judgement — palette,
              decoration, display typography (default)
            - `utility`: a literal, neutral render with no invented colour or
              ornament. Use it for diagrams, wireframes, UI mockups and any asset
              that must follow the prompt exactly

            Does not affect the price.
          enum:
            - standard
            - utility
          example: standard
          type: string
        enhance_prompt:
          default: true
          description: >
            Rewrite the prompt with an LLM before generating, which generally
            produces

            a richer design. Any text the image must render is preserved
            verbatim.


            Set it to `false` to send the prompt exactly as written, which is
            what you

            want when you need a deterministic input.
          example: true
          type: boolean
        webhook_url:
          description: >
            Optional callback URL that will receive asynchronous notifications
            whenever the task changes status. The payload sent to this URL is
            the same as the corresponding GET endpoint response, but without the
            data field.
          example: https://www.example.com/webhook
          format: uri
          type: string
      required:
        - prompt
      type: object
    get_style_transfer_task_status_200_response:
      example:
        data:
          generated:
            - https://openapi-generator.tech
            - https://openapi-generator.tech
          task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          status: CREATED
      properties:
        data:
          $ref: '#/components/schemas/task-detail'
      required:
        - data
      type: object
    task-detail:
      allOf:
        - $ref: '#/components/schemas/task'
        - properties:
            generated:
              items:
                description: URL of the generated image
                format: uri
                type: string
              type: array
          required:
            - generated
          type: object
      example:
        generated:
          - https://openapi-generator.tech
          - https://openapi-generator.tech
        task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        status: CREATED
    inline_object:
      example:
        message: message
      properties:
        message:
          type: string
      type: object
    inline_object_1:
      properties:
        problem:
          $ref: '#/components/schemas/inline_object_1_problem'
      type: object
    inline_object_2:
      example:
        message: Internal Server Error
      properties:
        message:
          example: Internal Server Error
          type: string
      type: object
    inline_object_3:
      example:
        message: Service Unavailable. Please try again later.
      properties:
        message:
          example: Service Unavailable. Please try again later.
          type: string
      type: object
    task:
      example:
        task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        status: CREATED
      properties:
        task_id:
          description: Task identifier
          format: uuid
          type: string
        status:
          description: Task status
          enum:
            - CREATED
            - IN_PROGRESS
            - COMPLETED
            - FAILED
          type: string
      required:
        - status
        - task_id
      type: object
    inline_object_1_problem:
      properties:
        message:
          example: Validation error
          type: string
        invalid_params:
          items:
            $ref: '#/components/schemas/inline_object_1_problem_invalid_params_inner'
          type: array
      required:
        - invalid_params
        - message
      type: object
    inline_object_1_problem_invalid_params_inner:
      properties:
        name:
          description: Name of the invalid parameter.
          example: page
          type: string
        field:
          description: Field of the invalid parameter. Mirrors `name`.
          example: page
          type: string
        reason:
          example: Parameter 'page' must be greater than 0
          type: string
      required:
        - field
        - name
        - reason
      type: object
  responses:
    400-bad-request:
      content:
        application/json:
          examples:
            invalid_page:
              summary: Parameter 'page' is not valid
              value:
                message: Parameter 'page' must be greater than 0
            invalid_query:
              summary: Parameter 'query' is not valid
              value:
                message: Parameter 'query' must not be empty
            invalid_filter:
              summary: Parameter 'filter' is not valid
              value:
                message: Parameter 'filter' is not valid
            generic_bad_request:
              summary: Bad Request
              value:
                message: Parameter ':attribute' is not valid
          schema:
            $ref: '#/components/schemas/inline_object'
        application/problem+json:
          examples:
            invalid_page:
              summary: Parameter 'page' is not valid
              value:
                message: Validation error
                invalid_params:
                  - field: page
                    reason: Parameter 'page' must be greater than 0
                  - field: per_page
                    reason: Parameter 'per_page' must be greater than 0
          schema:
            $ref: '#/components/schemas/inline_object_1'
      description: >-
        Bad Request - The server could not understand the request due to invalid
        syntax.
    401-unauthorized:
      content:
        application/json:
          examples:
            invalid_api_key:
              summary: API key is not valid
              value:
                message: Invalid API key
            missing_api_key:
              summary: API key is not provided
              value:
                message: Missing API key
          schema:
            $ref: '#/components/schemas/inline_object'
      description: >-
        Unauthorized - The client must authenticate itself to get the requested
        response.
    500-internal-server-error:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/inline_object_2'
      description: >-
        Internal Server Error - The server has encountered a situation it
        doesn't know how to handle.
    503-service-unavailable:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/inline_object_3'
      description: Service Unavailable
  securitySchemes:
    magnificApiKey:
      description: >
        Your Magnific API key. Required for authentication. [Learn how to obtain
        an API key](https://docs.magnific.com/quickstart)
      in: header
      name: x-magnific-api-key
      type: apiKey

````

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