Skip to main content

recraft-cli

CLI for the Recraft AI image API, built to be driven by an LLM coding agent. Writes image files to disk and prints their paths — image bytes never touch stdout.

Spends API credits, never subscription credits.

Unofficial. Not affiliated with, endorsed by, or supported by Recraft AI.

Install

Requires uv.

As a Claude Code plugin — adds recraft to the Bash tool's PATH, plus a skill telling Claude when to use it:

/plugin marketplace add nbr23/recraft-cli
/plugin install recraft@nbr23

Then allow it once in .claude/settings.json to stop the per-call permission prompt:

{ "permissions": { "allow": ["Bash(recraft:*)"] } }

Third-party marketplaces don't auto-update by default, so new releases won't reach you on their own. Pull them with:

/plugin marketplace update nbr23

or turn on auto-update for this marketplace from /plugin → Marketplaces.

Usage

Once installed, just ask Claude naturally — the skill tells it when to reach for recraft:

> generate an icon of a red bicycle, save it as bike.svg
> remove the background from screenshot.png
> vectorize this logo
> what's my Recraft balance?

Claude picks the right subcommand and flags; you don't need to know the CLI syntax yourself. To force it to load the skill instead of relying on auto-detection, invoke it explicitly with /recraft:recraft (plugin skills are namespaced as /plugin-name:skill-name).

As a standalone CLI:

uv tool install nbr23-recraft   # or: uvx nbr23-recraft --help

Token

From RECRAFT_API_TOKEN, falling back to ~/.config/recraft/token (mode 0600). Get one from the Recraft API console.

export RECRAFT_API_TOKEN='...'

Examples

recraft balance
# 12345 API credits ($12.345)

recraft generate "a red bicycle on a white background" -o bike.png
# /abs/path/bike.png  1024x1024  recraftv4_1  35 credits ($0.035)

recraft generate "a minimal bicycle icon" --vector -o bike.svg
recraft vectorize bike.png -o bike.svg              # ~10 credits
recraft remove-bg bike.png -o bike-cutout.png       # ~10 credits
recraft upscale bike.png --mode crisp -o bike-2x.png   # ~4 credits; creative is ~250

recraft generate "a red bicycle" --dry-run          # print the request, spend nothing
recraft generate "a red bicycle" -o bike.png --json # one JSON object on stdout

recraft models      # ids and per-image price
recraft styles      # valid style / model combinations

recraft --help lists every command; recraft COMMAND --help documents its flags with an example.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nbr23_recraft-0.2.0.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nbr23_recraft-0.2.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file nbr23_recraft-0.2.0.tar.gz.

File metadata

  • Download URL: nbr23_recraft-0.2.0.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for nbr23_recraft-0.2.0.tar.gz
Algorithm Hash digest
SHA256 22118db65bd99704ac874a8fdf8719d462942195ca73708e436a3005983ad4ae
MD5 2d43f25a99a578b1e3236423084f087f
BLAKE2b-256 66d013c08a15b5f09f0aee5a1c9292eca22a8d207e6ece8f88ac63b17f9a1603

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbr23_recraft-0.2.0.tar.gz:

Publisher: publish.yml on nbr23/recraft-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbr23_recraft-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: nbr23_recraft-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for nbr23_recraft-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f84ad30da355f45e42663410991d23bb84b7a83039cac2dd6811806864c33fc
MD5 7fbed2b652ac22dee7a1effea8d45d6c
BLAKE2b-256 42be6f9250953b73e85869e2ee903984b1f428e96f8f2c6b7346b9d3aad6ab83

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbr23_recraft-0.2.0-py3-none-any.whl:

Publisher: publish.yml on nbr23/recraft-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page