Commit via API
Last updated
Last updated
Before performing commits, the should have been performed in order to make sure the accessibility of the content file from the decentralized web.
Creating commits via API is the simplest way to preserve the asset history. Here is an example of how you can use the curl command to make a POST request using your and the of the asset you want to commit. If you do not already have a Capture Token yet, please follow provided to create one. The Utilities and Scripts page shows more examples of how to create commits via API.
If you opt to use the API for committing, the committer will be the wallet of the Numbers Protocol, 0x51130dB91B91377A24d6Ebeb2a5fC02748b53ce1
. However, if you prefer to have a custom committer, you can . This flexibility allows you to tailor your commit process to best suit your needs.
The author will still be your . Anyone can trust that you created the Asset Tree by verifying the Asset Tree sha256 checksum and signature, which will result in your Capture Wallet address being displayed as the verification result.
The Numbers API is a pay-as-you-go system, which means you only pay for the API calls you make. This is a cost-effective way to use the API and it allows you to control your expenses. Make sure to and ensure sufficient funds in your wallet in the form of Credits or NUM to cover the cost. Payment for services is processed using NUM; if you want to know how much it costs in USD, you can check or .
Note:
All fields are in string format except for assetTimestampCreated
and nftChainID
which are in integer format and testnet
in boolean format.
If licenseName
or licenseDocument
are not provided, both will be set to null, i.e. no license is specified.
custom
field must be a valid JSON object. assetSourceType
field is determined by signature and service name associated with API key and the assetSourceType
put in custom
field will be ignored.
The API endpoints for other blockchains
The following table lists the key fields of the API which define the asset information.
abstract
Asset description or asset caption
255 characters
My first Web3.0 asset
assetCreator
Creator of the asset
21 characters
Alice Wu
licenseName
Asset license chosen
21 characters
integrityCid
The metadata Cid
IPFS Cid
bafkreifkyltf4sfduwp5mghyxckq7invzjwl3pl4mksiorshr7lm2y2n2y
assetTimestampCreated
Creation timestamp
Unix timestamp
1674556617
custom: usedBy
How asset is used
URL
custom: generatedBy
AI model which generated the asset
21 characters
Dall-E
The request body follows the spec of . More examples can be found below:
If author
is not provided, it will be set to the of the user who calls the API .
Avalanche (cost: 2.5 NUM):
NEAR (cost: 1 NUM):
If you have more metadata or provenance data that needs to be associated with the asset, you may create an IPFS metadata file and send the Cid in the integrityCid
field. More metadata fields can be found . You can also visit here to see the .
An action, in the context of Numbers system, is the Cid or that points to the profile of an action performed to an asset. By providing the right action, one can track and record all updares performed to an asset, providing transparency and accountability.
The default action of this API is, more pre-defined actions can be found . You may also use to define your custom action.
Near:
Avalanche: