Skip to main content

Prerequisites

  • An Anima API key from console.useanima.sh
  • Python 3.10+ or Node.js 18+
  • KYB verification completed (see note below)
Card issuing in production requires approved KYB (Know Your Business) verification. Complete verification in the Anima console before issuing cards to real networks. You can test card creation in sandbox mode without KYB.

Steps

1

Install the SDK

pip install anima-labs
2

Create an agent

from anima import Anima

anima = Anima(api_key="ak_...")

agent = anima.agents.create(name="Shopping Agent")
3

Issue a virtual card

Create a card and attach it to the agent. All limits are in cents.
card = anima.cards.create(
    agent_id=agent.id,
    label="Daily Shopping",
    currency="usd",
    spend_limit_daily=10000,        # $100.00
    spend_limit_per_auth=5000,      # $50.00 per transaction
    allowed_merchant_categories=["5411", "5412"],  # Grocery stores
)

print(f"Card: **** {card.last4}")
4

Check the spending limit

print(f"Daily limit: ${card.spend_limit_daily / 100:.2f}")
5

Freeze the card when done

Freeze a card to block further transactions without deleting it.
anima.cards.freeze(card_id=card.id)
print("Card frozen")

Spending controls reference

PolicyDescription
spend_limit_dailyMaximum total spend per day (in cents)
spend_limit_per_authMaximum per-transaction amount (in cents)
allowed_merchant_categoriesMCC codes the card can transact with
Auto-approve rulesAutomatically approve transactions matching set criteria
Approval workflowsRequire human approval for specific transactions

Next steps

Vault quickstart

Store merchant credentials and secrets securely.

Email quickstart

Send confirmation emails from your agent.

Card Controls

Set up advanced spending controls and approval workflows.

KYB verification

Complete business verification to enable production card issuing.