# SetInventorySizeById

***

{% hint style="warning" %}
If the Inventory is currently loaded, we do not do internal checks if any items are overflowing after the change.\
So use this wisely or only make the inventory bigger, not smaller.
{% endhint %}

{% hint style="info" %}
Setting either sizeX or sizeY to null means it then uses the size(X/Y) of the container again.
{% endhint %}

## Params

| Name        | Optional | Example |
| ----------- | -------- | ------- |
| inventoryId | no       | 1       |
| sizeX       | yes      | 6       |
| sizeY       | yes      | 6       |

## Usage

```lua
local api = exports["bb_inventory"]:GetAPI()

api.SetInventorySizeById(13, 6, nil)
exports["bb_inventory"]:SetInventorySizeById(13, 6, nil)
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bluebyte.dev/bluebyte/scripts/advanced-inventory/api/server-exports/setinventorysizebyid.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
