Skip to main content

Developers / Docs

CLI

Create tattoo designs from your terminal with the inkstudioai npm package.

Markdown version

Install

You need Node.js 18.17 or later. Run the CLI once with npx, or install it globally:

npx inkstudioai login
npm i -g inkstudioai

The package installs two command names with the same function: inkstudioai and inkstudio. The package is on npm at https://www.npmjs.com/package/inkstudioai.

Quick start

# 1. Sign in. New accounts get one free design.
npx inkstudioai login

# 2. Create a design. The image is saved in the current directory.
npx inkstudioai generate "a fox sleeping inside a crescent moon" --style fine-line

# 3. Look for ideas in the public gallery.
npx inkstudioai gallery dragon

Commands

CommandWhat it does
inkstudioai loginSign in with your browser and save an API key on this computer. Options: --no-browser, --key <key>, --with-key.
inkstudioai generate "<prompt>"Create a design and save the image. Alias: gen.
inkstudioai stylesList the style ids for --style.
inkstudioai designsList the designs saved to your account, newest first. Options: --limit, --page.
inkstudioai gallery [search]Search the public gallery. No login needed.
inkstudioai whoamiShow your plan, free designs, premium credits, and API use today. Alias: status.
inkstudioai pricingShow the plans and credit packs.
inkstudioai buy <sku>Open Stripe checkout for a plan or credit pack.
inkstudioai open <page>Open a page of the website: account, pricing, or developers.
inkstudioai mcpStart the MCP server. See MCP server.
inkstudioai logoutRemove the saved key from this computer.

Every command has --help.

generate options

OptionWhat it does
-s, --style <id>Style id from inkstudioai styles. Default: minimal.
-c, --colorColor ink. Default: black ink.
--skinShow the design on skin instead of a white background.
--negative <text>Things to leave out of the design.
-o, --out <path>File or directory for the image. Default: the current directory.
--forceOverwrite the --out file if it exists.
--no-saveDo not download the image. Only print its URL.
--openOpen the image when it is ready.

The CLI never overwrites a file without --force. Without --out, the file name comes from the prompt, and the CLI adds -2, -3, and so on when the name exists.

Global options

OptionWhat it does
--jsonPrint raw JSON for scripts and agents.
--api-key <key>Use this key instead of INKSTUDIO_API_KEY or the saved key.
--no-colorTurn off colors. NO_COLOR also works.
-h, --helpShow help.
-v, --versionShow the version.

JSON output and exit codes

Add --json to any command to get the raw API response on stdout. Errors are JSON too, with error, code, and hints.

inkstudioai generate "a paper crane" --json | jq -r .imageUrl

Exit codes: 0 success, 1 error, 2 wrong command or options, 3 design created but the image file not saved. With exit code 3, the design is in your account, so do not generate it again.

Configuration

SettingWhere
API key--api-key, then INKSTUDIO_API_KEY, then the saved key.
Saved key$XDG_CONFIG_HOME/inkstudioai/config.json, default ~/.config/inkstudioai/config.json. On Windows: %APPDATA%\inkstudioai\config.json.
API URLINKSTUDIO_API_URL, default https://inkstudioai.com/api/v1.
Do not open a browserINKSTUDIO_NO_BROWSER=1
No colorsNO_COLOR=1 or --no-color