> For the complete documentation index, see [llms.txt](https://docs.skyledge.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.skyledge.com/getting-started/developer-guide/creating-assets.md).

# Creating Assets

Now that we’ve created an Asset Type (The ‘Hero’ Asset Type), it’s time to create our first actual Asset (‘A Hero’).

### Asset Creation

Notice that Assets are incredibly flexible, they can refer to physical objects or people, as in this example (we’ll unpack this right after):

#### **Creating Asset - A Hero**

```
POST api.skyledge.com/asset-types/{assetTypeId}/assets

{  
   "assetIdentifier":"hero_001",
   "name":"High Flyer",
   "description":"A high-flying superhero.",
   "attributes":{  
      "icon":"superhero",
      "powers":[  
         "Flight"
      ]
   },
   "metrics":{  
      "remainingPower":100
   },
   "location":{  
      "type":"Point",
      "coordinates":[  
         -73.9848,
         40.7586
      ]
   }
}

```

{% tabs %}
{% tab title="cURL" %}

```
curl --location --request POST 'https://api.skyledge.com/asset-types/ASSET_TYPE_ID/assets' \
--header 'X-Authorization: API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{  
   "assetIdentifier":"hero_001",
   "name":"High Flyer",
   "description":"A high-flying superhero.",
   "attributes":{  
      "icon":"superhero",
      "powers":[  
         "Flight"
      ]
   },
   "metrics":{  
      "remainingPower":100
   },
   "location":{  
      "type":"Point",
      "coordinates":[  
         -73.9848,
         40.7586
      ]
   }
}'
```

{% endtab %}

{% tab title="NodeJs" %}

```
import { Configuration, AssetRequest, AssetsApi } from '@skyledge/sdk';

const configuration = new Configuration({
  apiKey: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX',
  basePath: 'https://api.skyledge.com',
});

const data: AssetRequest = {
  assetIdentifier: 'hero_001',
  name: 'High Flyer',
  description: 'A high-flying superhero.',
  attributes: {
    icon: 'superhero',
    powers: ['Flight'],
  },
  metrics: {
    remainingPower: 100,
  },
  location: {
    type: 'Point',
    coordinates: [[-73.9848, 40.7586]],
  },
} as any;

const assetTypeId = ASSET_TYPE_ID;

const assetApi = new AssetsApi(configuration);

const createAsset = await assetApi.createAsset(assetTypeId, data);

console.log(createAsset.status);

```

{% endtab %}

{% tab title="Python" %}

```
import requests
import json

url = "https://api.skyledge.com/asset-types/ASSET_TYPE_ID/assets"

payload = json.dumps({
  "assetIdentifier": "hero_001",
  "name": "High Flyer",
  "description": "A high-flying superhero.",
  "attributes": {
    "icon": "superhero",
    "powers": [
      "Flight"
    ]
  },
  "metrics": {
    "remainingPower": 100
  },
  "location": {
    "type": "Point",
    "coordinates": [
      -73.9848,
      40.7586
    ]
  }
})
headers = {
  'X-Authorization': 'API_KEY',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)var axios = require('axios');
var data = JSON.stringify({
  "assetIdentifier": "hero_001",
  "name": "High Flyer",
  "description": "A high-flying superhero.",
  "attributes": {
    "icon": "superhero",
    "powers": [
      "Flight"
    ]
  },
  "metrics": {
    "remainingPower": 100
  },
  "location": {
    "type": "Point",
    "coordinates": [
      -73.9848,
      40.7586
    ]
  }
});

var config = {
  method: 'post',
  url: 'https://api.skyledge.com/asset-types/ASSET_TYPE_ID/assets',
  headers: { 
    'X-Authorization': 'API_KEY', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});


```

{% endtab %}
{% endtabs %}

You can see the asset in the control room now:

![](https://lh5.googleusercontent.com/g6kt2n-mkBDJHV9fOpNnpbXiskHH-31AyrQPUtZHueeSqimGrC5XRA-UhWh0LDTzYCvefJxsnKgp-FYOE7_QhKu4zIQfgYKFV3MSVdyRaDgit8N0zMsUmjYtQpLfVjfHnNBR50AY)

We can specify a few things as part of creating a new asset:

| **assetIdentifier** | Unique identifier of your own choosing                                                                                                                                                        |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **name**            | Meaningful name for your asset                                                                                                                                                                |
| **description**     | Describe your asset                                                                                                                                                                           |
| **attributes**      | Descriptive properties of your asset                                                                                                                                                          |
| **icon**            | Leaving this unspecified will create a default asset icon for you. If you have a custom icon, email <assets@skyledge.com> with the icon you’d like and it’ll be generated within a few hours. |

You’ll be able to see some/all of these attributes in a modal when you click on the asset. Pops up like this in the control room:

![Asset modal](https://lh3.googleusercontent.com/6XC6IBzk84o1RfCoc689rgvHjheHvMUMSQ1NkyyMk4g2_9efThzJSQi4U_Eemv136aE6IKDm4P9P05ua-C_ZkmyS1k2SEEjg_4PNASTzwPdb3ebuAQMNHtxV9Hkv3_40epkEPP9X)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.skyledge.com/getting-started/developer-guide/creating-assets.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
