MicroIP

The MicroIP API allows you to create and manage microIP licenses for your digital assets. This guide covers creating licenses, managing assets, and handling downloads.

Create MicroIP License

Create a new microIP license for an existing asset. This will process the asset using LLM to generate comprehensive metadata and create a license on the blockchain.

curl -X POST https://api.ipto.ai/microip \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "asset_id": "asset_123",
    "price": 0.5,
    "license_type": "standard"
  }'

Request Parameters

ParameterTypeRequiredDescription
asset_idStringYesID of the asset to license
priceNumberYesPrice in SOL (must be > 0)
license_typeStringYesType of license to create

Response

{
  "name": "Asset Name",
  "description": "Asset Description",
  "file_url": "https://storage.ipto.ai/assets/123",
  "metadata": {
    "file_name": "asset.ext",
    "file_size": 1024000,
    "file_type": "ext",
    "mime_type": "application/octet-stream",
    "created_at": "2024-03-21T10:00:00Z",
    "last_modified": "2024-03-21T10:00:00Z"
  },
  "created_at": "2024-03-21T10:00:00Z",
  "owner_id": "user_123",
  "is_public": false,
  "micro_ip": {
    "name": "Asset Name",
    "description": "Asset Description",
    "long_summary": "Detailed summary of the asset...",
    "tags": ["tag1", "tag2", "tag3"],
    "category": "code",
    "questions": [
      "What problem does this solve?",
      "How is it implemented?",
      "What are the key features?"
    ],
    "quality": "premium",
    "on_chain_id": "0x123...",
    "created_at": "2024-03-21T10:00:00Z",
    "updated_at": "2024-03-21T10:00:00Z",
    "price": 0.5,
    "license_type": "standard"
  },
  "total_earnings": 0,
  "total_views": 0,
  "total_downloads": 0,
  "is_verified": false
}

List MicroIP Assets

Retrieve a paginated list of all assets with microIP licenses.

curl -X GET "https://api.ipto.ai/microip?page=1&limit=10" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Query Parameters

ParameterTypeRequiredDefaultDescription
pageIntegerNo1Page number for pagination
limitIntegerNo10Number of items per page

Get MicroIP Asset

Retrieve detailed information about a specific microIP-enriched asset.

curl -X GET https://api.ipto.ai/microip/asset_123 \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Download Asset

Process the download of a microIP-licensed asset. This will verify your balance, process the payment, and generate a temporary download URL.

curl -X POST https://api.ipto.ai/microip/asset_123/download \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

{
  "download_url": "https://storage.ipto.ai/downloads/temp_token_123",
  "expires_at": "2024-03-21T11:00:00Z",
  "transaction": {
    "asset_id": "asset_123",
    "buyer_id": "user_456",
    "amount_paid": 0.5,
    "timestamp": "2024-03-21T10:00:00Z",
    "transaction_hash": "0xabc..."
  }
}

List Downloads

Retrieve your download history for microIP assets.

curl -X GET "https://api.ipto.ai/microip/downloads?page=1&limit=10" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

List Asset Downloads

Retrieve download history for a specific microIP asset (owner only).

curl -X GET "https://api.ipto.ai/microip/asset_123/downloads?page=1&limit=10" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

License Types

The platform supports the following license types:

TypeDescription
standardBasic usage rights
commercialCommercial usage rights
exclusiveExclusive usage rights
customCustom license terms

Quality Levels

LevelDescription
premiumHigh-quality, well-documented assets
standardGood quality with basic documentation
basicBasic quality with minimal documentation

Error Responses

Insufficient Balance

{
  "detail": "Insufficient balance for purchase"
}

Asset Not Found

{
  "detail": "Asset not found or not available for download"
}

Invalid License Type

{
  "detail": "Invalid license type specified"
}

Best Practices

  1. Set appropriate prices based on asset value
  2. Choose the right license type for your needs
  3. Provide comprehensive documentation
  4. Use relevant tags for better discoverability
  5. Monitor download statistics and earnings