# texture_upload

Uploads and creates a new texture in inventory

```csharp
// See "LSL Helper Functions" page for this function

smartbotsAPI("texture_upload", [
  "name", "My texture",
  "data", "............",
  "folder", "e96293b1-1529-40d2-b1d9-21190c2916df"
]);
```


:::tip
Bot must have a L$ balance to upload textures. Textures cost between L$10 and L$50 to upload, dependent on resolution.

:::

```snippet http-api-variables-OmJyUigTgO
```

```snippet http-api-input-basic-parameters-5FcVlaJbq0 action="texture_upload"
```

```snippet http-api-input-q5yvAagqsZ
name     | yes      | the name of the new texture
data     | yes      | the texture data, Base64-encoded.<br><br>The image format is JPG, PNG or TIFF.
folder   | optional | the folder UUID. If not specified, the texture will be created in "Textures" folder
loseless | optional | "1" - tell Second Life to use loseless compression for this texture
```

```snippet http-api-output-JAwUcmg7i7
```

# Comments

The command creates a new inventory texture and returns its inventory item UUID and asset UUID. The difference is that "inventory UUID" is being used to manipulate the inventory, while "asset UUID" can be used to put the texture on a prim.

It is unlikely to call this command from LSL script because of the image data.

# Return values

The command returns

```
result=OK

uuid=the new inventory item UUID

asset_uuid=the texture asset UUID
```

if texture has been successfully created.