Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate, Deploy and Mint an NFT with AI - Fixes #308 #307

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sethupavan12
Copy link

@sethupavan12 sethupavan12 commented Feb 8, 2025

What changed? Why?

Added a new DALL-E NFT feature that lets users create NFTs from AI-generated images. Users can input a text prompt, and the system will:

Features

  • Generate an image using DALL-E
  • Upload it to IPFS
  • Mint it as an NFT on Base Sepolia
  • ALL IN 1 GO

closes #308

Key improvements:

Uses IPFS metadata to ensure NFTs display correctly on OpenSea
Added proper error messages and progress updates
Added tests for the new functionality

Qualified Impact
This is a new feature that adds DALL-E NFT minting capability to CDP Agent Kit Core. Since it's a standalone feature, it shouldn't affect existing functionality.

The feature requires:

OpenAI API key for DALL-E - OPENAI_API_KEY
Pinata JWT for IPFS uploads - PINATA_JWT
Base Sepolia network for NFT minting

  • All tests passing
  • Tested manually by actually deploying an NFT
  • Tests for this feature passing

A test run that generated an NFT based on the prompt and actually minted the NFT, which can be found at

image

Image of NFT on Opensea testnet
image

source: https://testnets.opensea.io/assets/base_sepolia/0x337764ed8EC46b7Fb5819Edc61e8F1c700155c21/0

Future Work

  1. Cookbook which we are planning to write
  2. General docs enchancement for opensource community to contribute

@cb-heimdall
Copy link

cb-heimdall commented Feb 8, 2025

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@sethupavan12 sethupavan12 changed the title Draft: add dalle nft deploy and mint Generate, Deploy and Mint an NFT with AI Feb 8, 2025
@sethupavan12 sethupavan12 changed the title Generate, Deploy and Mint an NFT with AI Generate, Deploy and Mint an NFT with AI - Fixes #308 Feb 8, 2025
This feature demonstrates usage of the dalle_nft.py action
@0xRAG 0xRAG added action provider New action provider needs review PR / issue needs review banana labels Feb 10, 2025
Copy link
Contributor

@0xRAG 0xRAG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really cool contribution @sethupavan12! I left a couple initial comments. Just a heads up – we're working on releasing v0.1.0 of the Python packages which includes changes to how actions are structured. I'll let you know once v0.1.0 lands so you can rebase this PR and adopt the new action format. Here's an example of migrating an onchain interaction, and here's an example of migrating a web interaction

Comment on lines +62 to +68
response = client.images.generate(
model="dall-e-3",
prompt=prompt,
size="1024x1024",
quality="standard",
n=1,
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think this can be swapped out for an HTTP call? Just thinking of removing the added dependency on OpenAI here

The NFT will be viewable on OpenSea's testnet.
"""

def create_dalle_nft_tool():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you consider adding this as a first-class action to agentkit-core?

@0xRAG 0xRAG added blocked and removed needs review PR / issue needs review labels Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

NFT minting using AI generated images
4 participants