# Get effective AI policy

GET

/v1/workspaces/{workspace\_id}/effective-ai-policy

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

```python
import requests


url = "https://api.app.layer.ai/api/v1/workspaces/:workspace_id/effective-ai-policy"


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/effective-ai-policy';
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/effective-ai-policy"


  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/effective-ai-policy",
  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/effective-ai-policy")
  .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/effective-ai-policy")


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/effective-ai-policy");
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/geteffectiveaipolicyv2) 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).

The AI controls in force for work a member does in the workspace, and in a project when one is named: every scope’s policy resolved, each value with the scope that set it. A model, modality or subagent the maps leave out takes the platform default: allowed, unless `new_models_enabled` is false. Defaults to the caller; naming another member requires workspace 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.

### Query Parameters

**project\_id**

_Project ID_

The project the work is done in.

string format: uuid

nullable

The project the work is done in.

**principal\_id**

_Principal ID_

The member doing the work: a user, service account or API key. The caller if omitted.

string format: uuid

nullable

The member doing the work: a user, service account or API key. The caller if omitted.

## Responses 

### 200

Successful Response

_EffectiveAIPolicy_

The AI controls in force for one piece of work: every scope’s policy, resolved.

The maps hold only what some policy names; anything they leave out takes the platform default the accessors below apply.

object

**agent\_enabled**

required

_Resolved\[bool\]_object

**value**

required

_Value_

boolean

**source**

Any of:

**AIPolicySource**

_AIPolicySource_

The policy a resolved value comes from.

object

**scope**

required

_AIPolicyScope_

Where a policy is attached: a workspace, or a project, group or member inside one.

object

**kind**

required

_AIPolicyScopeKind_

What an AI policy is attached to, from least to most specific.

string

Allowed values: workspace project group member

**workspace\_id**

required

_Workspace ID_

string format: uuid

**project\_id**

_Project ID_

string format: uuid

nullable

**group\_id**

_Group ID_

string format: uuid

nullable

**principal\_id**

_Principal ID_

string format: uuid

nullable

**locked**

required

_Locked_

boolean

**null**

null

**agents**

required

_Agents_object

**_key_**

additional properties

_Resolved\[bool\]_object

**value**

required

_Value_

boolean

**source**

Any of:

**AIPolicySource**

_AIPolicySource_

The policy a resolved value comes from.

object

**scope**

required

_AIPolicyScope_

Where a policy is attached: a workspace, or a project, group or member inside one.

object

**kind**

required

_AIPolicyScopeKind_

What an AI policy is attached to, from least to most specific.

string

Allowed values: workspace project group member

**workspace\_id**

required

_Workspace ID_

string format: uuid

**project\_id**

_Project ID_

string format: uuid

nullable

**group\_id**

_Group ID_

string format: uuid

nullable

**principal\_id**

_Principal ID_

string format: uuid

nullable

**locked**

required

_Locked_

boolean

**null**

null

**agent\_confirm\_above\_cu**

required

_Resolved\[float\]_object

**value**

required

_Value_

number

**source**

Any of:

**AIPolicySource**

_AIPolicySource_

The policy a resolved value comes from.

object

**scope**

required

_AIPolicyScope_

Where a policy is attached: a workspace, or a project, group or member inside one.

object

**kind**

required

_AIPolicyScopeKind_

What an AI policy is attached to, from least to most specific.

string

Allowed values: workspace project group member

**workspace\_id**

required

_Workspace ID_

string format: uuid

**project\_id**

_Project ID_

string format: uuid

nullable

**group\_id**

_Group ID_

string format: uuid

nullable

**principal\_id**

_Principal ID_

string format: uuid

nullable

**locked**

required

_Locked_

boolean

**null**

null

**modalities**

required

_Modalities_object

**_key_**

additional properties

_Resolved\[bool\]_object

**value**

required

_Value_

boolean

**source**

Any of:

**AIPolicySource**

_AIPolicySource_

The policy a resolved value comes from.

object

**scope**

required

_AIPolicyScope_

Where a policy is attached: a workspace, or a project, group or member inside one.

object

**kind**

required

_AIPolicyScopeKind_

What an AI policy is attached to, from least to most specific.

string

Allowed values: workspace project group member

**workspace\_id**

required

_Workspace ID_

string format: uuid

**project\_id**

_Project ID_

string format: uuid

nullable

**group\_id**

_Group ID_

string format: uuid

nullable

**principal\_id**

_Principal ID_

string format: uuid

nullable

**locked**

required

_Locked_

boolean

**null**

null

**new\_models\_enabled**

required

_Resolved\[bool\]_object

**value**

required

_Value_

boolean

**source**

Any of:

**AIPolicySource**

_AIPolicySource_

The policy a resolved value comes from.

object

**scope**

required

_AIPolicyScope_

Where a policy is attached: a workspace, or a project, group or member inside one.

object

**kind**

required

_AIPolicyScopeKind_

What an AI policy is attached to, from least to most specific.

string

Allowed values: workspace project group member

**workspace\_id**

required

_Workspace ID_

string format: uuid

**project\_id**

_Project ID_

string format: uuid

nullable

**group\_id**

_Group ID_

string format: uuid

nullable

**principal\_id**

_Principal ID_

string format: uuid

nullable

**locked**

required

_Locked_

boolean

**null**

null

**models**

required

_Models_object

**_key_**

additional properties

_Resolved\[bool\]_object

**value**

required

_Value_

boolean

**source**

Any of:

**AIPolicySource**

_AIPolicySource_

The policy a resolved value comes from.

object

**scope**

required

_AIPolicyScope_

Where a policy is attached: a workspace, or a project, group or member inside one.

object

**kind**

required

_AIPolicyScopeKind_

What an AI policy is attached to, from least to most specific.

string

Allowed values: workspace project group member

**workspace\_id**

required

_Workspace ID_

string format: uuid

**project\_id**

_Project ID_

string format: uuid

nullable

**group\_id**

_Group ID_

string format: uuid

nullable

**principal\_id**

_Principal ID_

string format: uuid

nullable

**locked**

required

_Locked_

boolean

**null**

null

**model\_defaults**

required

_Model Defaults_object

**_key_**

additional properties

object

**_key_**

additional properties

_Resolved\[JSONValue\]_object

**value**

required

**source**

Any of:

**AIPolicySource**

_AIPolicySource_

The policy a resolved value comes from.

object

**scope**

required

_AIPolicyScope_

Where a policy is attached: a workspace, or a project, group or member inside one.

object

**kind**

required

_AIPolicyScopeKind_

What an AI policy is attached to, from least to most specific.

string

Allowed values: workspace project group member

**workspace\_id**

required

_Workspace ID_

string format: uuid

**project\_id**

_Project ID_

string format: uuid

nullable

**group\_id**

_Group ID_

string format: uuid

nullable

**principal\_id**

_Principal ID_

string format: uuid

nullable

**locked**

required

_Locked_

boolean

**null**

null

**guardrails**

required

_Guardrails_object

**_key_**

additional properties

_Resolved\[bool\]_object

**value**

required

_Value_

boolean

**source**

Any of:

**AIPolicySource**

_AIPolicySource_

The policy a resolved value comes from.

object

**scope**

required

_AIPolicyScope_

Where a policy is attached: a workspace, or a project, group or member inside one.

object

**kind**

required

_AIPolicyScopeKind_

What an AI policy is attached to, from least to most specific.

string

Allowed values: workspace project group member

**workspace\_id**

required

_Workspace ID_

string format: uuid

**project\_id**

_Project ID_

string format: uuid

nullable

**group\_id**

_Group ID_

string format: uuid

nullable

**principal\_id**

_Principal ID_

string format: uuid

nullable

**locked**

required

_Locked_

boolean

**null**

null

**output\_scoring**

required

_Output Scoring_object

**_key_**

additional properties

_Resolved\[bool\]_object

**value**

required

_Value_

boolean

**source**

Any of:

**AIPolicySource**

_AIPolicySource_

The policy a resolved value comes from.

object

**scope**

required

_AIPolicyScope_

Where a policy is attached: a workspace, or a project, group or member inside one.

object

**kind**

required

_AIPolicyScopeKind_

What an AI policy is attached to, from least to most specific.

string

Allowed values: workspace project group member

**workspace\_id**

required

_Workspace ID_

string format: uuid

**project\_id**

_Project ID_

string format: uuid

nullable

**group\_id**

_Group ID_

string format: uuid

nullable

**principal\_id**

_Principal ID_

string format: uuid

nullable

**locked**

required

_Locked_

boolean

**null**

null

**nsfw\_tolerance**

_Resolved\[int\]_object

**value**

required

_Value_

integer

**source**

Any of:

**AIPolicySource**

_AIPolicySource_

The policy a resolved value comes from.

object

**scope**

required

_AIPolicyScope_

Where a policy is attached: a workspace, or a project, group or member inside one.

object

**kind**

required

_AIPolicyScopeKind_

What an AI policy is attached to, from least to most specific.

string

Allowed values: workspace project group member

**workspace\_id**

required

_Workspace ID_

string format: uuid

**project\_id**

_Project ID_

string format: uuid

nullable

**group\_id**

_Group ID_

string format: uuid

nullable

**principal\_id**

_Principal ID_

string format: uuid

nullable

**locked**

required

_Locked_

boolean

**null**

null

**reference\_set\_sharing\_enabled**

_Resolved\[bool\]_object

**value**

required

_Value_

boolean

**source**

Any of:

**AIPolicySource**

_AIPolicySource_

The policy a resolved value comes from.

object

**scope**

required

_AIPolicyScope_

Where a policy is attached: a workspace, or a project, group or member inside one.

object

**kind**

required

_AIPolicyScopeKind_

What an AI policy is attached to, from least to most specific.

string

Allowed values: workspace project group member

**workspace\_id**

required

_Workspace ID_

string format: uuid

**project\_id**

_Project ID_

string format: uuid

nullable

**group\_id**

_Group ID_

string format: uuid

nullable

**principal\_id**

_Principal ID_

string format: uuid

nullable

**locked**

required

_Locked_

boolean

**null**

null

**workflow\_sharing\_enabled**

_Resolved\[bool\]_object

**value**

required

_Value_

boolean

**source**

Any of:

**AIPolicySource**

_AIPolicySource_

The policy a resolved value comes from.

object

**scope**

required

_AIPolicyScope_

Where a policy is attached: a workspace, or a project, group or member inside one.

object

**kind**

required

_AIPolicyScopeKind_

What an AI policy is attached to, from least to most specific.

string

Allowed values: workspace project group member

**workspace\_id**

required

_Workspace ID_

string format: uuid

**project\_id**

_Project ID_

string format: uuid

nullable

**group\_id**

_Group ID_

string format: uuid

nullable

**principal\_id**

_Principal ID_

string format: uuid

nullable

**locked**

required

_Locked_

boolean

**null**

null

**invisible\_watermark\_enabled**

_Resolved\[bool\]_object

**value**

required

_Value_

boolean

**source**

Any of:

**AIPolicySource**

_AIPolicySource_

The policy a resolved value comes from.

object

**scope**

required

_AIPolicyScope_

Where a policy is attached: a workspace, or a project, group or member inside one.

object

**kind**

required

_AIPolicyScopeKind_

What an AI policy is attached to, from least to most specific.

string

Allowed values: workspace project group member

**workspace\_id**

required

_Workspace ID_

string format: uuid

**project\_id**

_Project ID_

string format: uuid

nullable

**group\_id**

_Group ID_

string format: uuid

nullable

**principal\_id**

_Principal ID_

string format: uuid

nullable

**locked**

required

_Locked_

boolean

**null**

null

**usage\_caps**

_Usage Caps_object

**_key_**

additional properties

_Resolved\[Union\[UsageCap, NoneType\]\]_object

**value**

required

Any of:

**UsageCap**

_UsageCap_

A cap on the Creative Units each member may spend in a workspace over one period, as a policy sets it.

object

**cu\_limit**

required

_CU Limit_

number

**mode**

required

_UsageLimitMode_

What a cap does once its member has used all of it.

string

Allowed values: warn block

**warn\_threshold\_pct**

required

_Warn Threshold Percent_

integer

**null**

null

**source**

Any of:

**AIPolicySource**

_AIPolicySource_

The policy a resolved value comes from.

object

**scope**

required

_AIPolicyScope_

Where a policy is attached: a workspace, or a project, group or member inside one.

object

**kind**

required

_AIPolicyScopeKind_

What an AI policy is attached to, from least to most specific.

string

Allowed values: workspace project group member

**workspace\_id**

required

_Workspace ID_

string format: uuid

**project\_id**

_Project ID_

string format: uuid

nullable

**group\_id**

_Group ID_

string format: uuid

nullable

**principal\_id**

_Principal ID_

string format: uuid

nullable

**locked**

required

_Locked_

boolean

**null**

null

##### Example

```json
{
  "agent_enabled": {
    "source": {
      "scope": {
        "kind": "workspace"
      }
    }
  },
  "agents": {
    "additionalProperty": {
      "source": {
        "scope": {
          "kind": "workspace"
        }
      }
    }
  },
  "agent_confirm_above_cu": {
    "source": {
      "scope": {
        "kind": "workspace"
      }
    }
  },
  "modalities": {
    "additionalProperty": {
      "source": {
        "scope": {
          "kind": "workspace"
        }
      }
    }
  },
  "new_models_enabled": {
    "source": {
      "scope": {
        "kind": "workspace"
      }
    }
  },
  "models": {
    "additionalProperty": {
      "source": {
        "scope": {
          "kind": "workspace"
        }
      }
    }
  },
  "model_defaults": {
    "additionalProperty": {
      "additionalProperty": {
        "source": {
          "scope": {
            "kind": "workspace"
          }
        }
      }
    }
  },
  "guardrails": {
    "additionalProperty": {
      "source": {
        "scope": {
          "kind": "workspace"
        }
      }
    }
  },
  "output_scoring": {
    "additionalProperty": {
      "source": {
        "scope": {
          "kind": "workspace"
        }
      }
    }
  },
  "nsfw_tolerance": {
    "value": 5
  },
  "reference_set_sharing_enabled": {
    "value": true
  },
  "workflow_sharing_enabled": {
    "value": true
  },
  "invisible_watermark_enabled": {
    "value": false
  },
  "usage_caps": {}
}
```

### 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"
}
```
