Skip to main content
recraft avatar

Recraft V3 API

recraft/v3/text-to-image

Generate images from a text prompt across a large library of professional design styles, with true vector (SVG) output when a vector style is selected — ideal for logos, icons, and brand graphics.

0.04

Model Input

Input

The text prompt describing the image to generate.

The visual style to render. Pick a top-level family or a specific substyle. Any 'vector_illustration/*' style returns a true vector (SVG) file; all other styles return a raster image. Vector styles cost more (billed at the standard rate here).

The size/aspect of the generated image.

You need to be logged in to run this model and view results.
Log in

Model Output

Output

Generated image output
Generated in 8.144 seconds
Logs (1 lines)

Model Example Requests

Examples

Example output 1Example output 2

Recraft V3 API

Recraft V3 is a text-to-image AI model by recraft. On ModelRunner it runs through a REST API or via MCP from any AI assistant, at $0.04 per image.

POST https://queue.modelrunner.run/recraft/v3/text-to-image

cURL

# Submit a request to the queue. Input fields go at the top level of the
# body. The optional reserved "metadata" object holds your own flat string
# tags — stored on the request, never sent to the model; filter later with
# GET https://queue.modelrunner.run/requests?metadata=<url-encoded JSON>.
curl -X POST https://queue.modelrunner.run/recraft/v3/text-to-image \
  -H "Authorization: Key $MRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "style": "realistic_image",
    "prompt": "a cozy bookstore cafe interior, warm afternoon light, plants on shelves",
    "image_size": "square_hd",
    "metadata": {
      "project": "my-project"
    }
  }'
# → { "request_id": "...", "status_url": "...", "response_url": "..." }

# Poll status_url until "COMPLETED", then fetch the result
curl "https://queue.modelrunner.run/recraft/v3/text-to-image/requests/$REQUEST_ID/status" \
  -H "Authorization: Key $MRUN_API_KEY"
curl "https://queue.modelrunner.run/recraft/v3/text-to-image/requests/$REQUEST_ID" \
  -H "Authorization: Key $MRUN_API_KEY"

JavaScript

import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("recraft/v3/text-to-image", {
  input: {
    "style": "realistic_image",
    "prompt": "a cozy bookstore cafe interior, warm afternoon light, plants on shelves",
    "image_size": "square_hd"
  },
});
console.log(result);

Python

import os
import requests

headers = {"Authorization": f"Key {os.environ['MRUN_API_KEY']}"}

submitted = requests.post(
    "https://queue.modelrunner.run/recraft/v3/text-to-image",
    headers=headers,
    json={
      "style": "realistic_image",
      "prompt": "a cozy bookstore cafe interior, warm afternoon light, plants on shelves",
      "image_size": "square_hd"
    },
).json()

# Poll submitted["status_url"] until "COMPLETED", then:
result = requests.get(submitted["response_url"], headers=headers).json()

Input parameters

NameTypeRequiredDescription
promptstringyesThe text prompt describing the image to generate.
styleenumnoThe visual style to render. Pick a top-level family or a specific substyle. Any 'vector_illustration/*' style returns a true vector (SVG) file; all other styles return a raster image. Vector styles cost more (billed at the standard rate here). Default: "realistic_image".
image_sizeenumnoThe size/aspect of the generated image. Default: "1_1_1k".

Machine-readable: OpenAPI schema · llms.txt

Use Recraft V3 from Claude & Cursor (MCP)

Point Claude Code, Claude Desktop, Cursor, or any MCP client at the ModelRunner MCP server and Recraft V3 becomes a tool your assistant can call directly — it authorizes via OAuth (no API key in config) and runs this model with the run_model tool using the endpoint recraft/v3/text-to-image.

MCP client config (Claude Desktop, Cursor)

{
  "mcpServers": {
    "modelrunner": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.modelrunner.run/mcp"]
    }
  }
}

Claude Code

claude mcp add --transport http modelrunner https://mcp.modelrunner.run/mcp

Then ask your assistant, for example: “Run recraft/v3/text-to-image on ModelRunner to generate image”. MCP setup guide.

Model Details

Model Details

Recraft V3 turns a text prompt into a polished image and is built for design work specifically. Its standout strength is a large library of professional, named styles — photoreal looks, digital illustration, and vector aesthetics — selected through the `style` field, so you can lock a consistent visual language across a whole set of assets. When you pick a `vector_illustration/*` style, the result is a true vector (SVG) file rather than a raster image, which makes it well suited to logos, icons, posters, and brand graphics that need to scale cleanly. Default raster styles (`realistic_image`, `digital_illustration`) return a standard webp image.

## Best for - Logos, icons, and badges where clean, scalable vector (SVG) output matters — pick a `vector_illustration/*` style - Posters, marketing graphics, and editorial illustration with a consistent, deliberately chosen art style - Photoreal product and lifestyle stills using `realistic_image` styles and their substyles - Building a coherent set of brand assets by reusing the same `style` value across many prompts

## Choose another model when - You need to edit, restyle, or transform an existing image rather than generate from text — use an image-to-image or image-editing model - You need motion or animation — use a text-to-video or image-to-video model - You need many variations in a single call — this model returns one image per request - Rendering large amounts of precisely spelled in-image text is the priority — use a model specialized in legible in-image text

## Tips - The single biggest lever on the result is `style`: browse the families (`realistic_image`, `digital_illustration`, `vector_illustration`) and their substyles, e.g. `vector_illustration/line_art` for crisp line icons or `realistic_image/studio_portrait` for portraits - Choose any `vector_illustration/*` style when you specifically want an SVG you can scale and recolor; other style families return raster images - Set the framing with `image_size` (e.g. `landscape_16_9` for banners, `portrait_4_3` for posters)

## Limitations - Returns a single image per request; there is no batch or variation count - No seed control, so exact runs are not reproducible - Fine, precisely spelled text and exact object counts can still be imperfect

To run via the ModelRunner JavaScript client: ```js import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("recraft/v3/text-to-image", { input: { prompt: "a minimalist fox logo, geometric, two colors", style: "vector_illustration/line_art", image_size: "square_hd", }, }); ```