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
Parameter | Type | Required | Description |
---|---|---|---|
asset_id | String | Yes | ID of the asset to license |
price | Number | Yes | Price in SOL (must be > 0) |
license_type | String | Yes | Type 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
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
page | Integer | No | 1 | Page number for pagination |
limit | Integer | No | 10 | Number 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:
Type | Description |
---|---|
standard | Basic usage rights |
commercial | Commercial usage rights |
exclusive | Exclusive usage rights |
custom | Custom license terms |
Quality Levels
Level | Description |
---|---|
premium | High-quality, well-documented assets |
standard | Good quality with basic documentation |
basic | Basic 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
- Set appropriate prices based on asset value
- Choose the right license type for your needs
- Provide comprehensive documentation
- Use relevant tags for better discoverability
- Monitor download statistics and earnings