text-to-image

Create image from text - Recraft V4 Pro

Generate an image from a text prompt using Recraft V4 Pro.

Key Features:

  • The same design and text-rendering strengths as Recraft V4
  • Twice the linear dimensions of V4 — four times the pixels
  • Eleven fixed aspect ratios, from 1536x2688 to 3072x1536

Best for:

  • Print-bound or large-format designs
  • Assets that will be cropped or scaled down after generation

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

Credits: a flat price per image, higher than Recraft V4.

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.

post/v1/ai/text-to-image/recraft-v4-pro

Request

  • Base URL: https://api.magnific.com
  • URL: https://api.magnific.com/v1/ai/text-to-image/recraft-v4-pro
  • Auth: API key in header x-magnific-api-key

Request body

promptstring required

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"
aspect_ratio'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'

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_ratioV4 / V4.1 midV4 Pro / V4.1 pro
square_1_11024x10242048x2048
horizontal_2_11536x7683072x1536
vertical_1_2768x15361536x3072
standard_3_21280x8322560x1664
portrait_2_3832x12801664x2560
classic_4_31216x8962432x1792
traditional_3_4896x12161792x2432
social_5_41152x8962304x1792
social_post_4_5896x11521792x2304
widescreen_16_91344x7682688x1536
social_story_9_16768x13441536x2688
enhance_promptboolean

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.

webhook_urlstring uri

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 request

{
  "prompt": "A storefront sign that reads OPEN DAILY 9AM, flat vector poster style",
  "aspect_ratio": "square_1_1",
  "enhance_prompt": true,
  "webhook_url": "https://www.example.com/webhook"
}

Response

OK - The request has succeeded and the Recraft V4 Pro process has started.

Example response

{
  "data": {
    "generated": [
      "https://openapi-generator.tech",
      "https://openapi-generator.tech"
    ],
    "task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "status": "CREATED"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.