# Get workspace storage

GET

/v1/workspaces/{workspace\_id}/storage

```bash
curl --request GET \
  --url https://api.app.layer.ai/api/v1/workspaces/:workspace_id/storage \
  --header 'Authorization: Bearer <token>'
```

```python
import requests


url = "https://api.app.layer.ai/api/v1/workspaces/:workspace_id/storage"


headers = {"Authorization": "Bearer <token>"}


response = requests.get(url, headers=headers)


print(response.json())
```

```js
const url = 'https://api.app.layer.ai/api/v1/workspaces/:workspace_id/storage';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main


import (
  "fmt"
  "net/http"
  "io"
)


func main() {


  url := "https://api.app.layer.ai/api/v1/workspaces/:workspace_id/storage"


  req, _ := http.NewRequest("GET", url, nil)


  req.Header.Add("Authorization", "Bearer <token>")


  res, _ := http.DefaultClient.Do(req)


  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)


  fmt.Println(res)
  fmt.Println(string(body))


}
```

```php
<?php


$curl = curl_init();


curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.app.layer.ai/api/v1/workspaces/:workspace_id/storage",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);


$response = curl_exec($curl);
$err = curl_error($curl);


curl_close($curl);


if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

```java
OkHttpClient client = new OkHttpClient();


Request request = new Request.Builder()
  .url("https://api.app.layer.ai/api/v1/workspaces/:workspace_id/storage")
  .get()
  .addHeader("Authorization", "Bearer <token>")
  .build();


Response response = client.newCall(request).execute();
```

```ruby
require 'uri'
require 'net/http'


url = URI("https://api.app.layer.ai/api/v1/workspaces/:workspace_id/storage")


http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true


request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'


response = http.request(request)
puts response.read_body
```

```csharp
var client = new RestClient("https://api.app.layer.ai/api/v1/workspaces/:workspace_id/storage");
var request = new RestRequest("", Method.Get);
request.AddHeader("Authorization", "Bearer <token>");
var response = client.Execute(request);
```

* Layer API

> **v1 is superseded.** v1 was superseded by [v2](/docs/v2/rest-api/operations/getworkspacestoragev2) on 2026-08-26\. A sunset date has not been announced yet; v1 will be deprecated as a whole before removal. Migrate with the [v2 migration guide](/docs/migration).

What the workspace stores against its limit, and a breakdown of its files by origin, category, age, project and member, with its largest files. The breakdown is computed in the background, nightly and on request, so it trails the live `used_bytes`; the first read asks for one. Requires settings admin.

## Authorizations

* **[bearerAuth](/docs/v1/rest-api#bearerauth)**
* **[oauth2](/docs/v1/rest-api#oauth2)**
* **[serviceAccount](/docs/v1/rest-api#serviceaccount)**  
workspace:read

## Parameters 

### Path Parameters

**workspace\_id**

required

_Workspace ID_

ID of the workspace that owns the resource.

string format: uuid

ID of the workspace that owns the resource.

## Responses 

### 200

Successful Response

_WorkspaceStorageOutput_object

**used\_bytes**

required

_Used Bytes_

Bytes the workspace stores now: a live count.

integer

**quota\_bytes**

required

_Quota Bytes_

The most the workspace may store; null when it has no limit.

integer

nullable

**breakdown**

required

Any of:

**StorageBreakdownOutput**

_StorageBreakdownOutput_object

**total\_files**

required

_Total Files_

Stored files when the breakdown was computed.

integer

**total\_bytes**

required

_Total Bytes_

Bytes those files hold.

integer

**by\_origin**

required

_By Origin_

Generated and uploaded files.

Array<object>

_StorageSliceOutput_object

**key**

required

_Key_

What the slice is: an origin (`generated`, `uploaded`), a content category (`image`, `video`, …), an age (`under_30_days`, `30_to_90_days`, `90_to_365_days`, `over_1_year`), a project id (`none` for files in no project) or a member’s principal id. Null for the slice that totals everything not listed.

string

nullable

**label**

required

_Label_

What to call the slice.

string

**files**

required

_Files_

Files in the slice.

integer

**bytes**

required

_Bytes_

Bytes those files hold.

integer

**by\_category**

required

_By Category_

Files by content category, most bytes first.

Array<object>

_StorageSliceOutput_object

**key**

required

_Key_

What the slice is: an origin (`generated`, `uploaded`), a content category (`image`, `video`, …), an age (`under_30_days`, `30_to_90_days`, `90_to_365_days`, `over_1_year`), a project id (`none` for files in no project) or a member’s principal id. Null for the slice that totals everything not listed.

string

nullable

**label**

required

_Label_

What to call the slice.

string

**files**

required

_Files_

Files in the slice.

integer

**bytes**

required

_Bytes_

Bytes those files hold.

integer

**by\_age**

required

_By Age_

Files by age, youngest first.

Array<object>

_StorageSliceOutput_object

**key**

required

_Key_

What the slice is: an origin (`generated`, `uploaded`), a content category (`image`, `video`, …), an age (`under_30_days`, `30_to_90_days`, `90_to_365_days`, `over_1_year`), a project id (`none` for files in no project) or a member’s principal id. Null for the slice that totals everything not listed.

string

nullable

**label**

required

_Label_

What to call the slice.

string

**files**

required

_Files_

Files in the slice.

integer

**bytes**

required

_Bytes_

Bytes those files hold.

integer

**by\_project**

required

_By Project_

The projects holding the most, then the rest together, then files in no project. A file in several projects counts in each.

Array<object>

_StorageSliceOutput_object

**key**

required

_Key_

What the slice is: an origin (`generated`, `uploaded`), a content category (`image`, `video`, …), an age (`under_30_days`, `30_to_90_days`, `90_to_365_days`, `over_1_year`), a project id (`none` for files in no project) or a member’s principal id. Null for the slice that totals everything not listed.

string

nullable

**label**

required

_Label_

What to call the slice.

string

**files**

required

_Files_

Files in the slice.

integer

**bytes**

required

_Bytes_

Bytes those files hold.

integer

**by\_member**

required

_By Member_

The members who created the most, then everyone else together.

Array<object>

_StorageSliceOutput_object

**key**

required

_Key_

What the slice is: an origin (`generated`, `uploaded`), a content category (`image`, `video`, …), an age (`under_30_days`, `30_to_90_days`, `90_to_365_days`, `over_1_year`), a project id (`none` for files in no project) or a member’s principal id. Null for the slice that totals everything not listed.

string

nullable

**label**

required

_Label_

What to call the slice.

string

**files**

required

_Files_

Files in the slice.

integer

**bytes**

required

_Bytes_

Bytes those files hold.

integer

**largest\_files**

required

_Largest Files_

The largest stored files, largest first.

Array<object>

_StoredFileOutput_object

**file\_id**

required

_File ID_

ID of the file.

string format: uuid

**name**

required

_Name_

The file’s name.

string

**content\_type**

required

_Content Type_

The file’s MIME type.

string

**content\_category**

required

_FileContentCategory_

What kind of asset the file is.

string

Allowed values: image video mesh audio pose safetensors playable spine font world pbr\_materials landing\_page other

**origin**

required

_StoredFileOrigin_

Whether a generation produced the file or a person uploaded it.

string

Allowed values: generated uploaded

**size\_bytes**

required

_Size Bytes_

Bytes the file holds.

integer

**created\_at**

required

_Created At_

When the file was created.

string format: date-time

**created\_by\_name**

required

_Created By Name_

Who created the file, when known.

string

nullable

**deleted\_at**

required

_Deleted At_

When the file was deleted; set in the trash only.

string format: date-time

nullable

**deleted\_by\_name**

required

_Deleted By Name_

Who deleted the file; null for an automatic delete.

string

nullable

**null**

null

**breakdown\_computed\_at**

required

_Breakdown Computed At_

When the breakdown was computed. It trails `used_bytes`, which is live.

string format: date-time

nullable

**is\_breakdown\_computing**

required

_Is Breakdown Computing_

Whether a fresh breakdown is being computed.

boolean

**breakdown\_recompute\_available\_at**

required

_Breakdown Recompute Available At_

When a fresh breakdown can next be asked for: 15 minutes after the last was computed. Null when it can be now.

string format: date-time

nullable

##### Example

```json
{
  "breakdown": {
    "largest_files": [
      {
        "content_category": "image",
        "origin": "generated"
      }
    ]
  }
}
```

### 401

Unauthenticated — missing or invalid Bearer token.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

**error\_code**

required

Machine-readable error code: the last path segment of `type`.

string

**field**

The request field the error is about, by its name in the body (on a tool run, in `input`), on the errors that name one: so far the value a Layer tool fixes on an `INFERENCE_TOOL_PIN_MISMATCH`, and the scale factor on an `INFERENCE_TOOL_UPSCALE_COPIES_SOURCE`. Absent otherwise, even when `detail` names a field.

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description.",
  "error_code": "ERROR_CODE",
  "field": "tileability"
}
```

### 403

Forbidden — insufficient permissions, or the access token lacks the scope the operation requires.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

**error\_code**

required

Machine-readable error code: the last path segment of `type`.

string

**field**

The request field the error is about, by its name in the body (on a tool run, in `input`), on the errors that name one: so far the value a Layer tool fixes on an `INFERENCE_TOOL_PIN_MISMATCH`, and the scale factor on an `INFERENCE_TOOL_UPSCALE_COPIES_SOURCE`. Absent otherwise, even when `detail` names a field.

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description.",
  "error_code": "ERROR_CODE",
  "field": "tileability"
}
```

### 404

Resource not found.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

**error\_code**

required

Machine-readable error code: the last path segment of `type`.

string

**field**

The request field the error is about, by its name in the body (on a tool run, in `input`), on the errors that name one: so far the value a Layer tool fixes on an `INFERENCE_TOOL_PIN_MISMATCH`, and the scale factor on an `INFERENCE_TOOL_UPSCALE_COPIES_SOURCE`. Absent otherwise, even when `detail` names a field.

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description.",
  "error_code": "ERROR_CODE",
  "field": "tileability"
}
```

### 409

The outcome of the request with this `Idempotency-Key` is not known yet: it is still running, or it failed without a stored response. Retry after the number of seconds in `Retry-After`.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

**error\_code**

required

Machine-readable error code: the last path segment of `type`.

string

**field**

The request field the error is about, by its name in the body (on a tool run, in `input`), on the errors that name one: so far the value a Layer tool fixes on an `INFERENCE_TOOL_PIN_MISMATCH`, and the scale factor on an `INFERENCE_TOOL_UPSCALE_COPIES_SOURCE`. Absent otherwise, even when `detail` names a field.

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description.",
  "error_code": "ERROR_CODE",
  "field": "tileability"
}
```

### 422

Invalid input parameters, or an `Idempotency-Key` reused for a different request.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

**error\_code**

required

Machine-readable error code: the last path segment of `type`.

string

**field**

The request field the error is about, by its name in the body (on a tool run, in `input`), on the errors that name one: so far the value a Layer tool fixes on an `INFERENCE_TOOL_PIN_MISMATCH`, and the scale factor on an `INFERENCE_TOOL_UPSCALE_COPIES_SOURCE`. Absent otherwise, even when `detail` names a field.

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description.",
  "error_code": "ERROR_CODE",
  "field": "tileability"
}
```

### 429

Rate limited — retry after the number of seconds in `Retry-After`.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

**error\_code**

required

Machine-readable error code: the last path segment of `type`.

string

**field**

The request field the error is about, by its name in the body (on a tool run, in `input`), on the errors that name one: so far the value a Layer tool fixes on an `INFERENCE_TOOL_PIN_MISMATCH`, and the scale factor on an `INFERENCE_TOOL_UPSCALE_COPIES_SOURCE`. Absent otherwise, even when `detail` names a field.

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description.",
  "error_code": "ERROR_CODE",
  "field": "tileability"
}
```

### 500

Internal server error.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

**error\_code**

required

Machine-readable error code: the last path segment of `type`.

string

**field**

The request field the error is about, by its name in the body (on a tool run, in `input`), on the errors that name one: so far the value a Layer tool fixes on an `INFERENCE_TOOL_PIN_MISMATCH`, and the scale factor on an `INFERENCE_TOOL_UPSCALE_COPIES_SOURCE`. Absent otherwise, even when `detail` names a field.

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description.",
  "error_code": "ERROR_CODE",
  "field": "tileability"
}
```
