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:*)"] } }

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.1.0.tar.gz (22.0 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.1.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nbr23_recraft-0.1.0.tar.gz
  • Upload date:
  • Size: 22.0 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.1.0.tar.gz
Algorithm Hash digest
SHA256 7100c5e59e35886d085e04d3f61d92ef1bf63170e45e52ff041cc121508653a9
MD5 2e6a1cb0a88ccb6f3e686bb0ea2d4b88
BLAKE2b-256 2733fa0869f32b17cc77c9b55dc67d6f927a0689e0ee7496507fd4ec73774d73

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: nbr23_recraft-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f3adba45a4b217b227653f41fe996d4e4cffac9e809f5a401c38ae5c527366b
MD5 9f56e1f3d7dc8e0481346706eb2fa4b1
BLAKE2b-256 034fde817b7053d9f8b52a8b64a41fe007b1bb28043dbee373744dd1e57e011d

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbr23_recraft-0.1.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