# Create and Mint NFT — Venly (NFT API)

> Creates a template or token type that allows for minting of new NFTs. See the documentation

- Key: `venly-create-mint-nft`
- Type: Action (Write)
- Version: 0.0.2
- App: Venly (NFT API) (`venly`) — https://pipedream.com/apps/venly.md
- This page (HTML): https://pipedream.com/apps/venly/actions/create-mint-nft
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/venly/actions/create-mint-nft/create-mint-nft.mjs

## Description

Creates a template or token type that allows for minting of new NFTs. [See the documentation](https://docs.venly.io/reference/definetokentype_1_1)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `contractId` | `integer` | Yes | Select a Contract or provide a custom Contract ID. Options are loaded from the connected account. |
| `fungible` | `boolean` | No | Determines if the NFTs from this template will be minted as fungible/non fungible. Defaults to false. |
| `burnable` | `boolean` | No | Determines if the NFTs from this template will be burnable. Defaults to false. |
| `name` | `string` | Yes | Name of the NFTs that will be created from this template |
| `description` | `string` | No | Description of the NFTs that will be created from this template |
| `image` | `string` | No | Image of the NFTs that will be created from this template |
| `externalUrl` | `string` | No | External URL of the NFTs that will be created from this template |
| `backgroundColor` | `string` | No | Background color of the NFTs that will be created from this template |
| `animationUrls` | `string[]` | No | Each item should be a JSON string or object. Example: { "type": "type of the animation media", "value": "URL of the animation media" } |
| `maxSupply` | `integer` | No | Max Supply for NFTs created by this template |
| `attributes` | `string[]` | No | Each item should be a JSON string or object. Example: { "type": "property\|stat\|boost\|system", "name": "Name of the attribute", "value": "Value of the attribute", "maxValue": "Max value of the attribute" } |
| `destinations` | `string[]` | No | Each item should be a JSON string or object. Example: { "address": "Address of the destination wallet where minted tokens will be sent", "amount": "[int] Amount of tokens to be minted and sent to specified wallet address" } |
| `storageType` | `string` | No | This object holds the storage details for the metadata of the item being created |
| `storageLocation` | `string` | No | Location of the NFT metadata. This property is mandatory only if Storage Type is set to custom |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "venly",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "venly-create-mint-nft",
  arguments: {
    contractId: 10,
    fungible: true,
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "venly-create-mint-nft",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    venly: { authProvisionId: "apn_xxxxxxx" },
    contractId: 10,
    fungible: true,
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "venly-create-mint-nft",
    "configured_props": {
      "venly": { "authProvisionId": "apn_xxxxxxx" },
      "contractId": 10,
      "fungible": true
    }
  }'
```

---

- App: https://pipedream.com/apps/venly.md · All apps: https://pipedream.com/apps
