API Reference

The POST method on the /v1/layer route is designed for creating a new layer within a Metafuse project. This operation requires a JSON payload in the request body, adhering to the defined schema (MetafuApiDeSuTmK7LBO81n) to ensure accurate layer creation. Here's a breakdown of the parameters encapsulated in the request schema:

  • traitName (required): A distinctive name assigned to the trait within a trait category, aiding in identification and organization.
  • image (required): A base64 encoded string representing the layer's image, utilized for visualization and display purposes.
  • traitRarity (optional): A numeric value indicating the rarity of the trait, representing the likelihood of its appearance during collection generation (e.g., 10 for 10%).
  • projectId (required): A unique identifier linking the layer to its respective project.
  • traitCategory (required): A categorization for the trait, facilitating grouping and sorting of similar traits.
  • generationOrder (required): A numeric value depicting the generation sequence of the layer among others.

Upon successful creation, the route responds with a 200 status code, signifying a successful operation. Conversely, a 400 status code is returned in cases where the request body does not comply with the required schema or other client-side errors occur.

This route empowers developers to seamlessly initialize new layers, supplying essential information like the trait details, image, project linkage, and generation order to ensure a well-documented and organized layer creation within the Metafuse platform.

Language
Credentials
Header
Click Try It! to start a request and see the response here!