Backend APIs

1. POST /api/generate

  • Description: Takes a text/image prompt and generates unique AI artwork.

  • Request Body:

    {
      "prompt": "A futuristic city painted in Van Gogh style",
      "style": "van_gogh",
      "resolution": "1024x1024"
    }
  • Process:

    • Calls AI Art Engine (Stable Diffusion + ArtsiAI fine-tuning).

    • Stores temporary generated file in IPFS (unminted state).

  • Response:

    {
      "preview_url": "ipfs://Qm1234.../art.png",
      "session_id": "xyz789"
    }

2. POST /api/mint

  • Description: Mint an AI-generated artwork as an ERC-721 NFT.

  • Request Body:

  • Process:

    • Uploads metadata JSON to IPFS.

    • Calls NFT Smart Contract (ERC-721) to mint.

  • Response:


3. GET /api/nfts

  • Description: Browse NFTs (Trending, New, Curated).

  • Parameters:

    • filter=trending|new|curated

    • limit=20

  • Response:


4. POST /api/list

  • Description: List an NFT for fixed price or auction.

  • Request Body:

  • Process:

    • Calls Marketplace Smart Contract.

  • Response:


5. POST /api/buy

  • Description: Buy or bid for an NFT.

  • Request Body:

  • Process:

    • Executes purchase on Marketplace Smart Contract.

  • Response:


6. POST /api/fractionalize

  • Description: Convert NFT into fractional ERC-20 tokens.

  • Request Body:

  • Process:

    • Deploys Fractional NFT Smart Contract.

  • Response:


7. POST /api/proposal

  • Description: Submit governance proposals for ArtsiAI DAO.

  • Request Body:

  • Process:

    • Stores proposal on-chain in DAO Governance Contract.

  • Response:


πŸ”Ή System Diagram (API Flow + Smart Contracts + Storage)

Last updated