Skip to content

Get effective AI policy

Viewing v1, superseded by v2

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

v1 is superseded. v1 was superseded by v2 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.

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.

workspace_id
required
Workspace ID

ID of the workspace that owns the resource.

string format: uuid

ID of the workspace that owns the resource.

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.

Successful Response

Media typeapplication/json
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

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
agents
required
Agents
object
key
additional properties
Resolved[bool]
object
value
required
Value
boolean
source
Any of:
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
agent_confirm_above_cu
required
Resolved[float]
object
value
required
Value
number
source
Any of:
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
modalities
required
Modalities
object
key
additional properties
Resolved[bool]
object
value
required
Value
boolean
source
Any of:
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
new_models_enabled
required
Resolved[bool]
object
value
required
Value
boolean
source
Any of:
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
models
required
Models
object
key
additional properties
Resolved[bool]
object
value
required
Value
boolean
source
Any of:
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
model_defaults
required
Model Defaults
object
key
additional properties
object
key
additional properties
Resolved[JSONValue]
object
value
required
source
Any of:
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
guardrails
required
Guardrails
object
key
additional properties
Resolved[bool]
object
value
required
Value
boolean
source
Any of:
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
output_scoring
required
Output Scoring
object
key
additional properties
Resolved[bool]
object
value
required
Value
boolean
source
Any of:
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
nsfw_tolerance
Resolved[int]
object
value
required
Value
integer
source
Any of:
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
reference_set_sharing_enabled
Resolved[bool]
object
value
required
Value
boolean
source
Any of:
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
workflow_sharing_enabled
Resolved[bool]
object
value
required
Value
boolean
source
Any of:
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
invisible_watermark_enabled
Resolved[bool]
object
value
required
Value
boolean
source
Any of:
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
usage_caps
Usage Caps
object
key
additional properties
Resolved[Union[UsageCap, NoneType]]
object
value
required
Any of:
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
source
Any of:
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
Example
{
"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": {}
}

Unauthenticated — missing or invalid Bearer token.

Media typeapplication/problem+json
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
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

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

Media typeapplication/problem+json
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
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Resource not found.

Media typeapplication/problem+json
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
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

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.

Media typeapplication/problem+json
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
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

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

Media typeapplication/problem+json
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
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

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

Media typeapplication/problem+json
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
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Internal server error.

Media typeapplication/problem+json
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
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}