logo

How to authenticate the Picsart CLI with your account

CLI2 minBeginner

Sign in with one command and connect your credit balance to the CLI in 30 seconds.

How to authenticate the Picsart CLI with your account

What you'll learn

  • Authenticate the CLI with your Picsart account
  • Understand how authentication tokens work and where they're stored
  • Check your credit balance from the terminal

What is CLI authentication?

Authentication connects your Picsart account to the CLI so you can generate content using your credit balance. When you run gen-ai login, the CLI opens your browser to confirm your identity. Once authorized, it stores a secure token on your machine — no password saved, no credentials exposed. Think of it like connecting Spotify to your car: you authorize once, then everything just works.

Common use cases

  • First-time setup: Connect your account after installing the CLI
  • Team workflows: Each developer authenticates with their own account
  • CI/CD pipelines: Use API keys instead of browser login for automated builds
  • Multiple machines: Sign in separately on each device you use
  • Account switching: Log out and log back in to switch between accounts

Authenticate your CLI step by step

STEP 1: Run the login command

  • On any platform: Open your terminal and run gen-ai login
  • In CI/CD: Use gen-ai login --api-key YOUR_KEY instead of browser login
Open CLI docs

STEP 2: Authorize in your browser

A browser tab opens automatically. Choose how to sign in:

  • Continue with existing session: If you're already logged into Picsart, click Allow
  • Sign in with email: Enter your Picsart account email and password
  • Sign in with Google: Use your Google account if you created your Picsart profile that way
  • Create new account: If you don't have one, sign up directly from the auth page

STEP 3: Confirm authentication

After clicking Allow, your browser shows a success message and your terminal displays your account email and current credit balance. You can close the browser tab — the CLI is now authenticated and ready to use.

STEP 4: Verify your credentials work

Check that authentication succeeded: Not working? Run gen-ai logout and try logging in again. If you're in CI/CD and browser login won't work, use an API key instead.

  • Run gen-ai whoami to see your authenticated account email
  • Run gen-ai credits to check your remaining balance
  • If both commands show your info, you're authenticated and ready to generate
Generate first image

Tips for best results

💡 Use API keys for CI/CD and automation

Browser-based login won't work in GitHub Actions, cron jobs, or headless servers. Generate an API key from your Picsart account settings, then authenticate with gen-ai login --api-key YOUR_KEY.

💡 Your token stays on your machine

The CLI stores your auth token in a local config file, not on Picsart servers. It never expires unless you run gen-ai logout or revoke access from your account settings. Each device needs its own login.

💡 Check credits before starting a big batch job

Run gen-ai credits to see your balance, then use gen-ai pricing to estimate costs. If you're running a batch of 100 generations, verify you have enough credits first — partial batches don't refund.

Frequently asked questions

Yes. The CLI uses your Picsart credit balance to pay for generations, so you need an account to authenticate. You can create a free account during the login process if you don't have one. Free accounts get starter credits to test the CLI before buying more.

Yes. Run gen-ai login on each machine. Each device stores its own authentication token locally, so signing in on one computer doesn't affect your other devices. All authentications share the same credit balance from your account.

Run gen-ai logout to remove your current credentials, then run gen-ai login and authorize with the other account. The CLI stores one authentication at a time, so logging in with a new account replaces the old one automatically.

The token lives in a config file in your home directory — typically ~/.picsart/config on Mac/Linux or C:\Users\YourName\.picsart\config on Windows. The file is only readable by your user account. Deleting this file logs you out.

Authenticated and ready?

You're signed in. Now generate your first AI image and see the CLI in action.

Start generating