Menu

Mattering Automations Recraft integration

Connect Recraft to Mattering Automations: generate raster art and true SVGs from a prompt, restyle and inpaint and outpaint existing images, replace or remove backgrounds, vectorize, upscale, and hold a brand look with a custom style, authenticated with one API token. Recraft's API is paid and a token requires an API-unit balance.

The Mattering Automations Recraft integration puts Recraft's image and vector generation on your automation canvas: generate raster images or true editable SVGs from a prompt, restyle an existing image, repaint one masked area, extend an image past its borders, remove or replace a background, generate a background around a supplied mask, remix an image with no prompt, trace a raster file into an SVG, upscale two different ways, erase a region, explore a grid of variations, enhance a prompt, and create a reusable custom style.

The credential is a single API token, sent as a bearer token. Before you go looking for it, one operational fact is worth knowing, because it changes the order of the steps: Recraft's API is PAID, and Recraft documents that generating an API key requires an API-unit balance above zero. API units are a separate purchasable balance from the Studio credits the Recraft web app spends, so units are bought first and the token exists second. Nothing in Recraft's live documentation describes a free API allowance, and this guide does not assume one.

Cost is the thing this integration is shaped around, because Recraft bills per successful call. Recraft: Get Account And Credit Balance is the only node that spends nothing, which makes it both the credential check and the guard to put in front of a batch. The integration performs no automatic retries anywhere, on purpose, because a retried generation is a second charge rather than a free redo. Setup takes a few minutes, and this guide walks through each step and ends with the full node reference.

Before you start

  • A Recraft account with a positive API-unit balance. This is a prerequisite rather than a nicety: the button that generates an API token requires it, so an account that has never purchased units has no key to copy. Units were sold at one US dollar per thousand when this integration was built and the cheapest operations cost single-digit units, so a first pass is small money rather than no money. Confirm current figures on Recraft's pricing page.
  • An awareness that API units and Studio credits are different balances. The web app's credits are not the API's currency, and nothing in Recraft's published documentation says free-plan credits can be spent through the API.
  • Publicly reachable image URLs, or data URLs, for anything you want to edit. Recraft's API takes hosted addresses for every file input, so no image bytes travel through the canvas.
  • Somewhere to put the output within the same run. Recraft documents output retention of roughly 24 hours and those links are reachable without authentication, so a workflow that needs the asset later, or needs it private, has to download or re-host it before the run ends.
  • A Mattering workspace with access to the Automations app.

Generate a Recraft API token

One token, one header, and no account id, region or version to supply. The only wrinkle is the order: Recraft gates key generation on the API-unit balance, so buying units is step one rather than something to sort out later.

Sign in to Recraft and add API units to the account.
Recraft documents that generating an API key requires an API-unit balance above zero. If the generate button is unavailable, it is the balance rather than a permissions problem, and no amount of Studio credit changes it: units are a separate purchase.
Open profile settings, go to the API section, and click Generate.
Copy the token.
You do not need an organization id, an environment or a model version on the credential. The model is chosen per node, and Mattering pins the request shape.

Connect Recraft to Mattering

In Mattering Automations, open Connectors and click Add Connector.
Choose Recraft from the list.
Click Create new credential, paste the API token, and save.
The credential is stored encrypted in Google Secret Manager and never appears in workflow logs.
Click Test Connection. Mattering reads the account endpoint, which is the only Recraft call that spends nothing, so testing and re-testing this credential is free. A rejected token fails before any generation work begins, which proves the host, the path, the method and the header placement without rendering anything.
Click Connect. All 19 Recraft nodes appear in your canvas palette.

Verify it works

After connecting, open any automation canvas and check the palette: a Recraft section should list the one read node and the eighteen action nodes. Drop Recraft: Get Account And Credit Balance onto the canvas and run a test step. It returns the account id, name, email and the remaining API-unit balance, it needs no parameters, and it is the only node here that costs nothing, so it is the one to re-run whenever you rotate the token.

Then spend a little on purpose, because the free probe cannot prove a generation path. Run Recraft: Vectorize Image To SVG or Recraft: Crisp Upscale against any public image URL: both are among the cheapest billed nodes, and between them they confirm the file-input handling and the processing-family response shape. Read the result carefully while you are here, because this is where most Recraft workflows go wrong later: the processing family returns a SINGLE image object, while the generation family returns an ARRAY of them, and a path written for one silently resolves to nothing on the other. Run Recraft: Get Account And Credit Balance again afterwards and watch the balance move, which is a useful habit before any batch.

Node reference

19 nodes, generated from the connector itself so this reference always matches what ships.

Read and query nodes 1

Recraft: Get Account And Credit Balance

recraft_get_user

Read the Recraft account behind the API token: its id name email and remaining API-unit balance. This is the only Recraft endpoint that spends nothing so it is both the credential check and the node to put in front of a batch to stop it when the balance runs low. API units are sold separately from Recraft Studio credits at 1000 units per USD 1.00.

Action nodes 18

Recraft: Create Custom Style

recraft_create_style

Learn a reusable custom style from 1 to 5 reference images and get back a style_id to pass to the generation nodes. This is how a workflow holds a brand look steady across hundreds of images instead of re-describing it in every prompt. SPENDS API UNITS at about 40 per style. Custom styles made through the API apply to recraftv3 and its vector variant only. Returns the new id at data.id. Recraft documents no API endpoint that lists or deletes styles so SAVE THE RETURNED ID somewhere durable in the same run; styles are otherwise managed in the Styles panel on recraft.ai.

Recraft: Creative Upscale

recraft_creative_upscale

Raise resolution and REGENERATE detail so a small or soft source gains texture it never had. Use it to rescue a low resolution image but never on a logo or anything that has to match a reference exactly because the added detail is invented. EXPENSIVE at about 250 API units per call which is roughly USD 0.25 and around 60 times the cost of Recraft: Crisp Upscale, so gate it behind a check rather than running it across a whole library. Slow enough to need a longer timeout. NOTE THE RESPONSE SHAPE: ONE image object at data.image.url. Returned image links live for about 24 hours and are publicly readable without a token, so download or re-host inside this run and do not treat one as private.

Recraft: Crisp Upscale

recraft_crisp_upscale

Raise resolution and sharpen WITHOUT inventing new detail so the result still matches the approved original. This is the one to use on brand assets. The cheapest node on the connector at about 4 API units per call which is roughly 60 times cheaper than Recraft: Creative Upscale. NOTE THE RESPONSE SHAPE: ONE image object at data.image.url. Returned image links live for about 24 hours and are publicly readable without a token, so download or re-host inside this run and do not treat one as private.

Recraft: Enhance Prompt

recraft_enhance_prompt

Expand a short prompt into a richer one written the way Recraft's models respond to. Put it in front of a generation node when the prompt text comes from a form field or an agent rather than from a designer. Generates no image but still SPENDS API UNITS at about 10 per call. Returns the rewritten text at data.enhanced_prompt.

Recraft: Erase Region

recraft_erase_region

Delete whatever the mask covers and fill the hole with plausible surroundings. This removes an object rather than replacing it so no prompt is needed. The cheapest edit on the connector at about 2 API units per call. This does NOT modify the source image: it returns a new one. NOTE THE RESPONSE SHAPE: ONE image object at data.image.url. Returned image links live for about 24 hours and are publicly readable without a token, so download or re-host inside this run and do not treat one as private.

Recraft: Explore Prompt Variations

recraft_explore

Render a grid of interpretations of one prompt so a human can pick a direction before committing to a full generation. SPENDS API UNITS for every image in the grid so one explore call costs several generations. Returns data.data[] with a url and an image_id per result; feed one image_id to Recraft: Explore Similar Images to drill into that direction. Returned image links live for about 24 hours and are publicly readable without a token, so download or re-host inside this run and do not treat one as private.

Recraft: Explore Similar Images

recraft_explore_similar

Take one image from Recraft: Explore Prompt Variations and generate a new set clustered around it. This is the second half of the explore loop: broad grid first then narrow. SPENDS API UNITS for every image produced. Returns data.data[] with a url and an image_id per result. Returned image links live for about 24 hours and are publicly readable without a token, so download or re-host inside this run and do not treat one as private.

Recraft: Generate Background Around A Mask

recraft_generate_background

Like Recraft: Replace Background but YOU supply the mask instead of letting Recraft find the subject. Reach for this when automatic subject detection picks the wrong thing or when the same cutout has to be reused exactly across a batch. RECRAFT V3 MODELS ONLY. SPENDS API UNITS per image (about 40 raster or 80 vector). Returns data.data[] with a url per result. Returned image links live for about 24 hours and are publicly readable without a token, so download or re-host inside this run and do not treat one as private.

Recraft: Generate Image

recraft_generate_image

Generate images from a text prompt. This is the general entry point: it renders raster or vector output depending on the model you choose. SPENDS API UNITS on every successful call and is billed per image, roughly 35 units on recraftv4_1 through 250 on recraftv4 pro tier at 1000 units per USD 1.00. Returns an array at data.data[] with a url per image. Returned image links live for about 24 hours and are publicly readable without a token, so download or re-host inside this run and do not treat one as private.

Recraft: Generate Raster Image

recraft_generate_raster_image

Generate PNG-style raster images from a prompt. Same as Recraft: Generate Image but restricted to raster models so a misconfigured model cannot quietly return SVG into a pipeline expecting a bitmap. SPENDS API UNITS per image (about 22 to 250 units depending on model). Returns data.data[] with a url per image. Returned image links live for about 24 hours and are publicly readable without a token, so download or re-host inside this run and do not treat one as private.

Recraft: Generate Vector Image

recraft_generate_vector_image

Generate true SVG artwork from a prompt. This is the reason most workflows reach for Recraft rather than a raster-only image API: the output is a real editable vector file that scales without quality loss which is what logos icons and print assets need. Restricted to vector models. SPENDS API UNITS per image and vector generation costs MORE than raster (about 44 to 300 units). Returns data.data[] with an SVG url per image. Returned image links live for about 24 hours and are publicly readable without a token, so download or re-host inside this run and do not treat one as private.

Recraft: Image To Image

recraft_image_to_image

Redraw an existing image under a new prompt keeping as much or as little of the original as the strength setting says. Use it to restyle a product shot or push a rough sketch toward a finished illustration. The source image is read from a url and is never modified. SPENDS API UNITS per image (about 40 raster or 80 vector). Returns data.data[] with a url per variation. Returned image links live for about 24 hours and are publicly readable without a token, so download or re-host inside this run and do not treat one as private.

Recraft: Inpaint Masked Area

recraft_inpaint_image

Repaint only the white area of a mask leaving everything else byte-identical. This is the surgical edit: swap a product on a shelf or fix one bad hand without re-rendering the whole frame. RECRAFT V3 MODELS ONLY. The source image is read from a url and is never modified. SPENDS API UNITS per image (about 40 raster or 80 vector). Returns data.data[] with a url per result. Returned image links live for about 24 hours and are publicly readable without a token, so download or re-host inside this run and do not treat one as private.

Recraft: Outpaint Beyond The Edges

recraft_outpaint_image

Extend an image past its original borders inventing what would have been there. The practical use is reformatting: turn a square asset into a 16:9 banner without cropping the subject. Expand by pixels per side or give a target size. RECRAFT V3 MODELS ONLY. SPENDS API UNITS per image (about 40 raster or 80 vector). Returns data.data[] with a url per result. Returned image links live for about 24 hours and are publicly readable without a token, so download or re-host inside this run and do not treat one as private.

Recraft: Remix Image

recraft_remix_image

Produce fresh variations of an image with no prompt at all. Recraft reads the composition and recomposes it which is the cheap way to get several usable takes on an approved layout. SPENDS API UNITS per image (about 40 units each). Returns data.data[] with a url per variation. Returned image links live for about 24 hours and are publicly readable without a token, so download or re-host inside this run and do not treat one as private.

Recraft: Remove Background

recraft_remove_background

Cut the subject out and return it on a transparent background. The workhorse step in front of any catalogue or composite pipeline. Accepts SVG input as well as raster. Cheap at about 10 API units per call. NOTE THE RESPONSE SHAPE: ONE image object at data.image.url not a data.data[] array. Returned image links live for about 24 hours and are publicly readable without a token, so download or re-host inside this run and do not treat one as private.

Recraft: Replace Background

recraft_replace_background

Keep the subject and generate an entirely new background from a prompt. No mask needed: Recraft works out the subject itself which is what makes this the practical node for putting one product photo into a dozen seasonal settings. RECRAFT V3 MODELS ONLY. SPENDS API UNITS per image (about 40 raster or 80 vector). Returns data.data[] with a url per result. Returned image links live for about 24 hours and are publicly readable without a token, so download or re-host inside this run and do not treat one as private.

Recraft: Vectorize Image To SVG

recraft_vectorize_image

Trace a raster image into a real SVG that scales without quality loss. The obvious use is rescuing a logo that only exists as a PNG. Cheap at about 10 API units per call. NOTE THE RESPONSE SHAPE: this returns ONE image object at data.image.url not the data.data[] array the generation nodes return. Returned image links live for about 24 hours and are publicly readable without a token, so download or re-host inside this run and do not treat one as private.

Using the integration

On the automation canvas

Recraft nodes chain with every other node. A new product record can drive Recraft: Remove Background and then Recraft: Replace Background, with the resulting URL downloaded and re-hosted by a storage node in the same run and written back onto the record. A scheduled job can generate the week's social artwork from a database of headlines. Two values do most of the wiring: the image URL, which every editing node takes as a hosted or data URL because no bytes travel through the canvas, and the balance from Recraft: Get Account And Credit Balance, which is the sane thing to branch on before a batch starts.

From AI assistants over MCP

Every node speaks MCP, the open protocol for connecting AI assistants to tools, so Claude, ChatGPT, and Matter, the assistant built into the platform, can drive the same surface. Recraft publishes an MCP server of its own, with a whole MCP reference section in its documentation including a remote server, so it is worth being clear about the difference: for Recraft available inside your own assistant's config for one-off image work, the vendor's server is the closer fit. This integration is the production side, where images are generated off a trigger or a schedule with nobody present, chained with every other connector so the result lands on the record that caused it, with the token held once in a shared workspace store. One caution belongs with any agent access here: because every generation node spends API units, an assistant with these tools can spend money, so keep the expensive nodes behind a condition or an approval task and put the free balance check in front of a batch.

What each node costs, and the two that look alike

Every node except Recraft: Get Account And Credit Balance bills API units on success. At the time this integration was built, Recraft's pricing put Recraft: Erase Region at about two units, Recraft: Crisp Upscale at about four, Recraft: Vectorize Image To SVG, Recraft: Remove Background and Recraft: Enhance Prompt at about ten, raster generation in the tens, vector generation higher, and Recraft: Creative Upscale at about two hundred and fifty. Confirm those on Recraft's pricing page rather than budgeting from this page. Three practical rules follow. The images-per-call field multiplies the charge, so asking for six images costs six times one image. The two exploration nodes render a whole grid, so each call costs a multiple of a single generation. And the two upscalers sit at opposite ends of the range while sounding interchangeable, which is why each one names the other in its description: Recraft: Crisp Upscale sharpens without inventing detail and is the one for brand assets, while Recraft: Creative Upscale regenerates detail and is the one that rescues a poor original.

Two response shapes, and why a green run can produce nothing

This is the single most likely cause of a Recraft workflow that appears to succeed and delivers nothing, so it is worth ten seconds now. The generation family answers with an ARRAY of image objects, so the URL is read out of a list. The processing family answers with a SINGLE image object, so the URL is read directly. A path written for one resolves to nothing on the other, with no error raised anywhere, because nothing failed: the workflow simply asked for a key that is not there. Every processing node's description names its own path for this reason. Three nodes are singletons of their own: Recraft: Enhance Prompt returns the enhanced text, Recraft: Create Custom Style returns an id, and Recraft: Get Account And Credit Balance returns the profile and balance.

Output links expire, and they are public

Recraft returns a link rather than image bytes, which is what keeps execution records small and means nothing is ever transcoded. Two documented properties of that link decide how a workflow has to be built. It lives for roughly 24 hours, so anything stored for later has to be downloaded or re-hosted inside the SAME run; a URL written into a record now is a dead link next week. And it is reachable without authentication, so anyone holding it can fetch the image. Treat every Recraft output as a published asset rather than a private one, and decide about that deliberately for any workflow putting client artwork through the integration. Every image node also carries an explicit response format field defaulted to the link form, so the canvas shows what you are getting; the encoded form stays reachable for a workflow that must hand bytes to a non-HTTP consumer, with a size ceiling that refuses an oversized body and names the link form as the fix.

Model families, prompts and the constraints that interact

Four editing nodes are restricted by Recraft to an older model family: Recraft: Inpaint Masked Area, Recraft: Outpaint Beyond The Edges, Recraft: Replace Background and Recraft: Generate Background Around A Mask. Their model fields default accordingly and their descriptions say so. Custom styles run the other way: Recraft documents styles as unsupported on its newest model families, so setting a style alongside one of those is a silent no-op rather than an error. The third constraint interacts with the first, and it is the one that catches agent-written workflows: the older families cap prompt length an order of magnitude below the newer ones, and Recraft: Enhance Prompt makes prompts LONGER, so enhance-then-generate on an older model is a real failure path rather than a theoretical one. Recraft ships new models quickly, so prefer choosing by capability, raster against vector and edit against generate, and confirm a specific model identifier against Recraft's model reference before hard-coding it.

Custom styles and the id you must not lose

Recraft: Create Custom Style learns a reusable style from one to five reference images and returns a style id that the generation nodes accept, which is how a workflow holds a brand look steady across hundreds of images instead of hoping a prompt describes it identically each time. The field that takes that id is free text on all nine nodes that accept it, and that is Recraft's constraint rather than a gap here: Recraft's published API documents style CREATION and nothing else under that resource, so there is no lister to build a picker from and no endpoint to look an id up with afterwards. Persist the returned id in the same run that creates the style, into a Mattering database row or a workflow variable. The reference images have their own limit, and it is stricter than the general one: one to five images with a five megabyte TOTAL across all of them, so five three-megabyte references fail even though each is well under the ten megabyte single-file cap that applies elsewhere.

Nothing here deletes anything

This integration has zero destructive nodes, and that is a finding about Recraft rather than an oversight: its published API deletes nothing. There is no delete-style endpoint, no delete-image endpoint, and no asset store to empty, because generated images expire on their own and are not addressable for removal. Recraft: Erase Region sounds like the exception and is not: it reads a source image from a URL and returns a NEW image, so the source is untouched. The nearest thing to an irreversible act here is spending API units, which every billed node states plainly. Two habits cover it: gate the expensive nodes, and check the balance first.

Troubleshooting

Recraft will not let me generate an API token
Check the API-unit balance rather than the account permissions. Recraft documents that generating an API key requires an API-unit balance above zero, so on an account that has never bought units there is no token to create. Studio credits do not satisfy this: the web app's credits and the API's units are separate balances, and nothing in Recraft's published documentation says free-plan credits can be spent through the API. Add units first, then generate the token, then connect.
Test Connection fails
The connection test reads the account endpoint, which spends nothing, so a failure here is about the token itself rather than about balance, model or parameters. Check for leading or trailing whitespace from the copy and confirm the token still exists in Recraft's profile settings under the API section. Because the probe is free, it is also safe to re-run as often as you like while sorting this out, and it is the right node to re-run after any token rotation.
A node returns success but the workflow gets no image
The path is almost certainly written for the wrong response family. Recraft answers with an ARRAY of image objects on the generation family and a SINGLE image object on the processing family, so a path built for one resolves to nothing on the other and raises no error, because nothing failed. Open the failing step's output and read the actual shape, then correct the path. Each processing node names its own path in its description for exactly this reason, and three nodes are their own shape again: prompt enhancement returns text, style creation returns an id, and the account read returns the balance.
An image URL from Recraft stopped working
Recraft documents output retention of roughly 24 hours, so a link stored in a record or a message is a dead link within a day. The fix is structural rather than a retry: download or re-host the file inside the SAME run that generated it, with a storage or HTTP node, and store that permanent address instead. Re-running the generation to get a fresh link is possible but it is a second charge, and with a random element in generation it will not return the same image. While you are changing this, note the other half of the same fact: those links are reachable without authentication, so any that did go out were public for as long as they lived.
A style is set but the output ignores it
Check which model the node is using. Recraft documents styles as unsupported on its newest model families, so a style or style id set alongside one of those models is a silent no-op: the call succeeds, units are spent, and the look is not applied. Either move the node to a model family that supports styles or drop the style and describe the look in the prompt. If the style id itself is the suspect, remember that Recraft publishes no endpoint that lists or fetches styles, so an id cannot be validated by lookup: the only sources are the response from Recraft: Create Custom Style and the Styles panel in the Recraft web app.
A generation is rejected for prompt length
This is the model families interacting, and it usually arrives via Recraft: Enhance Prompt, which makes prompts LONGER by design. Recraft's older model families cap prompt length an order of magnitude below the newer ones, and four editing nodes are restricted to an older family: inpainting, outpainting, background replacement and background generation around a mask. So enhance-then-edit on one of those is a real failure path. Either skip enhancement for those nodes, or truncate the enhanced prompt before it reaches them, and reserve the enhancement step for the generation nodes that run on the newer families.
Creating a custom style fails even though each reference image is small
The style endpoint has a stricter limit than the rest of the connector and it is a TOTAL rather than a per-file cap: one to five reference images with five megabytes across all of them, against the ten megabyte single-file limit that applies elsewhere. Five three-megabyte references fail on the total while each looks acceptable on its own. Downscale or compress the references, or use fewer of them. Recraft's other input caps are worth knowing at the same time: sixteen megapixels and four thousand and ninety six pixels on a side.
A loop over a list starts failing partway through
Recraft documents a ceiling of five requests per second and a hundred images per minute, and a fan-out over a list exceeds that without trying. Space the calls with a delay or process the list in smaller batches. One thing not to reach for is a retry loop: this integration performs no automatic retries anywhere on purpose, because a retried generation is a second charge rather than a free redo, and adding one in the workflow re-creates exactly that problem. Where the failure is a balance rather than a rate, Recraft: Get Account And Credit Balance in front of the loop with a condition on the returned number stops the run cleanly instead.
A batch cost far more than expected
Three causes account for almost all of it. The images-per-call field multiplies the charge, so a node left at six images costs six times a single generation on every run. The exploration nodes render a whole grid, so each call is a multiple of one generation rather than one. And Recraft: Creative Upscale was priced at roughly sixty times Recraft: Crisp Upscale when this integration was built, so an upscaling sweep across a media library on the wrong node is the expensive version of a one-line configuration difference. Read the balance before and after a representative run with Recraft: Get Account And Credit Balance, and put that check in front of the batch as a gate.

Recraft is a trademark of its respective owner. Mattering uses platform names to identify the services these integrations connect to; no endorsement or affiliation is implied.

Start Free Explore our Products