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.

Log in to see full request history
Body Params
string
required

The unique name assigned to the trait. This should be distinctive within a trait category.

string
required

A base64 encoded string representing the image of the layer. This is used for visualization and display purposes.

number
≥ 0

The rarity score of the trait, indicative of how common or rare a trait is during collection generation. eg 10 for 10%

string
required

The unique id assigned to the project.

string
required

The category of the trait. This aids in grouping and sorting traits that are similar.

number
required
≥ 0

The order in which the layer was generated. This illustrates the generation sequence amongst other layers.

Responses
200

200 response

400

400 response

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