# Developer Integration

PromptHub provides developers with multiple pathways to onboard, register, and operationalize prompts through both command-line and programmatic interfaces. This section outlines how to publish prompts, bind them to assets, and monetize their execution within the protocol framework.

**1. Prompt Registration**

Prompts can be authored in PromptDSL and registered using:

* **CLI Tool**: included in `prompthub-sdk` for fast command-line registration to Vault
* **Web Interface**: graphical composer embedded in `prompthub-app`
* **API Endpoints**: HTTP interface for agents or devtools to publish prompts on-chain

Upon registration:

* Each prompt receives a unique semantic hash
* Metadata is pinned to IPFS and recorded in PromptVault
* A version ID is created for traceability and future forking

**2. Tokenization and Licensing**

Prompt authors can choose to:

* **Mint PromptNFTs** with embedded metadata and license (non-fungible form)
* **Create PromptTokens** (fungible SPL assets) to gate usage or define tiered access
* Set license attributes: public, time-limited, token-gated, rev-share splits

This enables:

* Usage gating (only token holders may invoke)
* Execution fee collection (set per-call royalties)
* Reuse royalties (collect share if prompt is used in DAGs)

**3. Invocation and Logging**

Once registered and tokenized, prompts can be invoked via:

* Standard API calls from various model interfaces
* Smart contract-based calls through the PromptHub protocol
* Web UI (via PromptHub DApp)

Each invocation automatically triggers:

* **PromptSig** signature log with cryptographic trace
* Fee distribution to author
* Optional metadata storage for future interactions and analytics

**4. Revenue Streams for Developers**

Developers can earn by:

* Publishing high-utility prompts to Asset Store
* Staking prompts for ranking rewards
* Licensing prompts for private/commercial use
* Receiving microfees from DAG-based workflows

PromptHub offers end-to-end developer tooling for prompt lifecycle management—from authoring and registration to execution tracking and monetization.
