Skip to content
Developer Platform

Build on Animica

Two tracks, one chain. Write deterministic Python smart contracts on a live post-quantum L1, or ship AI products on AICF's OpenAI-compatible compute APIs with ANM-native billing. Both settle on the same mainnet.

Track 1 — Build on the Chain

Deterministic Python Contracts on a Post-Quantum L1

Animica contracts are plain Python modules executed in a deterministic, gas-metered VM. Accounts use post-quantum signatures (Dilithium3 + SPHINCS+) and bech32m addresses (anim1...). The CLI ships with the pip package.

Quickstart
# Install the complete Animica client (Python 3.10+)
pip install animica

# ...or pull in every optional extra (quote the brackets for zsh/macOS)
pip install "animica[all]"

# Create a post-quantum wallet (ML-DSA / Dilithium)
animica wallet create --label dev

# Compile, deploy, and call a Python contract
animica contract compile contract.py
animica contract deploy --help
animica contract call --help

pip install animica is the complete client — everything to mine, run a node, use the wallet, deploy Python contracts, run animica up (the unified miner: PoW + useful-work + GPU train/serve + Studio functions), and use the Studio SDK; the native CPU miner (animica-fastpow) is included by default. This is what most people want. pip install "animica[all]" adds every optional extra on top — Qt desktop-wallet QR codes, the full distributed Studio client (cloudpickle closures + omni-sdk for on-chain ANM escrow), and all pinned server/operator dependencies — use it for the kitchen sink or pool/API infrastructure.

The animica CLI also covers transactions, chain queries, mining, and node tooling — run animica --help for the full command tree.

Contract Shape

Illustrative example, adapted from the Counter contract in the repo. Contracts import deterministic stdlib modules for storage, events, and ABI checks.

# contract.py — illustrative example
from stdlib import abi, events, storage

K_COUNTER = b"counter:value"

def get() -> int:
    raw = storage.get(K_COUNTER)
    return int.from_bytes(raw, "big") if raw else 0

def inc() -> None:
    new = get() + 1
    storage.set(K_COUNTER, new.to_bytes(32, "big"))
    events.emit(b"Counter.Incremented", {b"new": new})

def set(n: int) -> None:
    abi.require(n >= 0, b"counter: value must be >= 0")
    storage.set(K_COUNTER, n.to_bytes(32, "big"))
    events.emit(b"Counter.Set", {b"value": n})
Public RPC

JSON-RPC Endpoint

Endpoint https://rpc.animica.org/rpc
Protocol JSON-RPC 2.0 over HTTPS (POST only)
Chain ID 1 (Animica mainnet)
Discovery Unknown methods return did_you_mean suggestions

GET requests are not served — send JSON-RPC payloads via POST. Verify any result against the block explorer.

Try It
curl -s -X POST https://rpc.animica.org/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,
       "method":"chain.getHead","params":{}}'

# => {"jsonrpc":"2.0","id":1,"result":{
#      "height": ..., "hash": "0x...",
#      "chainId": 1, ... }}
Track 2 — Build with AICF Compute

OpenAI-Compatible APIs, Settled in ANM

AICF gives teams OpenAI-compatible chat and embedding endpoints, project-level ANM budgets, and settlement on Animica.

OpenAI-Compatible Endpoints

Drop-in semantics for chat and embeddings. Keep your SDK and middleware shape while switching execution to AICF.

ANM-Native Billing

Fund project balances with ANM, enforce per-job caps, and inspect usage rows with transparent settlement records.

Contract-Driven Jobs

Contracts can escrow ANM budgets and trigger compute workloads through AICF orchestration, with receipts settled on-chain.

Quickstart
curl https://aicf.animica.org/api/v1/chat/completions \
  -H "Authorization: Bearer $AICF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "aicf-chat-1",
    "messages": [
      {"role": "system", "content": "You are an infra copilot"},
      {"role": "user", "content": "Explain this GPU trace"}
    ],
    "max_tokens": 400
  }'
curl https://aicf.animica.org/api/v1/embeddings \
  -H "Authorization: Bearer $AICF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "aicf-embed-1",
    "input": ["decentralized compute", "anm settlement"]
  }'
Model Surface
Model Type Status Indicative Price
aicf-chat-1 Chat Completion Active 0.012 ANM / 1K input tokens · 0.018 ANM / 1K output tokens
aicf-embed-1 Embeddings Active 0.008 ANM / 1K input tokens · 0.00005 ANM / vector

Indicative — final rates are shown at key creation. The live registry is at GET https://aicf.animica.org/api/models.

Architecture

Developer Interface

OpenAI-compatible API, SDKs, API keys, project budgets, usage insights

AICF Control Plane

Scheduling, escrow, pricing, receipts, dispute handling, subsidy routing

Provider Mesh

GPU/CPU workers with benchmark attestations, heartbeat, and execution logs

Animica Settlement

ANM-native contracts for project balance, provider stake, rewards, and slashing