# Get project AI policy

GET

/v2/workspaces/{workspace\_id}/projects/{project\_id}/ai-policy

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

```python
import requests


url = "https://api.app.layer.ai/api/v2/workspaces/:workspace_id/projects/:project_id/ai-policy"


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


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


print(response.json())
```

```js
const url = 'https://api.app.layer.ai/api/v2/workspaces/:workspace_id/projects/:project_id/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/v2/workspaces/:workspace_id/projects/:project_id/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/v2/workspaces/:workspace_id/projects/:project_id/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/v2/workspaces/:workspace_id/projects/:project_id/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/v2/workspaces/:workspace_id/projects/:project_id/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/v2/workspaces/:workspace_id/projects/:project_id/ai-policy");
var request = new RestRequest("", Method.Get);
request.AddHeader("Authorization", "Bearer <token>");
var response = client.Execute(request);
```

* Layer API

> **Unchanged from v1.** This endpoint’s documented request and response schemas are identical in v1 and v2 — change the `/v1` prefix to `/v2`. Schema equality is not a promise about behavior, so keep your usual smoke tests.

The AI controls the project sets itself, and what it inherits. Requires content policy author.

## Authorizations

* **[bearerAuth](/docs/v2/rest-api#bearerauth)**
* **[oauth2](/docs/v2/rest-api#oauth2)**
* **[serviceAccount](/docs/v2/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.

**project\_id**

required

_Project ID_

ID of the project.

string format: uuid

ID of the project.

## Responses 

### 200

Successful Response

_AIPolicyOutput_object

**scope**

required

_AIPolicyScope_

What the policy is attached to.

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

**policy**

required

_AIPolicy_

What the scope sets itself, each value as {value, locked}. Anything absent is inherited.

object

**agent\_enabled**

Any of:

**Setting\[bool\]**

_Setting\[bool\]_object

**value**

required

_Value_

boolean

**locked**

_Locked_

boolean

**null**

null

**agents**

_Agents_object

**_key_**

additional properties

_Setting\[bool\]_object

**value**

required

_Value_

boolean

**locked**

_Locked_

boolean

**agent\_confirm\_above\_cu**

Any of:

**Setting\[Annotated\[float, Ge\]\]**

_Setting\[Annotated\[float, Ge\]\]_object

**value**

required

_Value_

number

**locked**

_Locked_

boolean

**null**

null

**modalities**

_Modalities_object

**_key_**

additional properties

_Setting\[bool\]_object

**value**

required

_Value_

boolean

**locked**

_Locked_

boolean

**new\_models\_enabled**

Any of:

**Setting\[bool\]**

_Setting\[bool\]_object

**value**

required

_Value_

boolean

**locked**

_Locked_

boolean

**null**

null

**models**

_Models_object

**_key_**

additional properties

_Setting\[bool\]_object

**value**

required

_Value_

boolean

**locked**

_Locked_

boolean

**model\_defaults**

_Model Defaults_object

**_key_**

additional properties

object

**_key_**

additional properties

_Setting\[JSONValue\]_object

**value**

required

**locked**

_Locked_

boolean

**guardrails**

_Guardrails_object

**_key_**

additional properties

_Setting\[bool\]_object

**value**

required

_Value_

boolean

**locked**

_Locked_

boolean

**output\_scoring**

_Output Scoring_object

**_key_**

additional properties

_Setting\[bool\]_object

**value**

required

_Value_

boolean

**locked**

_Locked_

boolean

**nsfw\_tolerance**

Any of:

**Setting\[Annotated\[int, FieldInfo(annotation=NoneType, required=True, metadata=\[Ge(ge=1), Le(le=6)\])\]\]**

_Setting\[Annotated\[int, FieldInfo(annotation=NoneType, required=True, metadata=\[Ge(ge=1), Le(le=6)\])\]\]_object

**value**

required

_Value_

integer

\>= 1 <= 6

**locked**

_Locked_

boolean

**null**

null

**reference\_set\_sharing\_enabled**

Any of:

**Setting\[bool\]**

_Setting\[bool\]_object

**value**

required

_Value_

boolean

**locked**

_Locked_

boolean

**null**

null

**workflow\_sharing\_enabled**

Any of:

**Setting\[bool\]**

_Setting\[bool\]_object

**value**

required

_Value_

boolean

**locked**

_Locked_

boolean

**null**

null

**invisible\_watermark\_enabled**

Any of:

**Setting\[bool\]**

_Setting\[bool\]_object

**value**

required

_Value_

boolean

**locked**

_Locked_

boolean

**null**

null

**usage\_caps**

_Usage Caps_object

**_key_**

additional properties

_Setting\[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

**locked**

_Locked_

boolean

**inherited**

required

_EffectiveAIPolicy_

What the scope inherits from the less specific scopes, each value as {value, source}. A value with no source is the platform default.

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

**updated\_at**

required

_Updated At_

When the policy was last written; null if it sets nothing.

string format: date-time

nullable

**updated\_by\_id**

required

_Updated By ID_

Who last wrote the policy, when known.

string format: uuid

nullable

##### Example

```json
{
  "scope": {
    "kind": "workspace"
  },
  "policy": {
    "agent_enabled": {
      "locked": false
    },
    "agents": {},
    "agent_confirm_above_cu": {
      "locked": false
    },
    "modalities": {},
    "new_models_enabled": {
      "locked": false
    },
    "models": {},
    "model_defaults": {},
    "guardrails": {},
    "output_scoring": {},
    "nsfw_tolerance": {
      "locked": false
    },
    "reference_set_sharing_enabled": {
      "locked": false
    },
    "workflow_sharing_enabled": {
      "locked": false
    },
    "invisible_watermark_enabled": {
      "locked": false
    },
    "usage_caps": {}
  },
  "inherited": {
    "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"
}
```
