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.3.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.3.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nbr23_recraft-0.3.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.3.0.tar.gz
Algorithm Hash digest
SHA256 b94f701146d1484d7944c0d629c74d2ffa29a85800a2587369ad356b4fe27feb
MD5 c4b09cdcdba712e33fdf229a908769a2
BLAKE2b-256 3a1ffbd1553fed392943313d34d823707ba2a1486677e51c21ff699ba797e4e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbr23_recraft-0.3.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: nbr23_recraft-0.3.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a2ab4c621710047f96a823b7f48886b646267c719450512b1cb3bf8504536b2
MD5 ab06b3f342e4f02ff2899fccc20b9b8d
BLAKE2b-256 b7fcab34214cc09a902880559d68cbe4290cea980103d4081d8c44297b89c702

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbr23_recraft-0.3.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 Sentry Error logging StatusPage Status page