# prov.trace.canarySets.create

prov.trace.canarySets.create in Node SDK. Define an account canary family on a model (Growth+).

## Signature

```ts
prov.trace.canarySets.create(params: { family: string; model: string; members: TraceCanaryMember[]; description?: string; card?: CanaryFamilyCardInput }): Promise<TraceCanarySet>
```

## Parameters

- `params` ({ family: string; model: string; members: TraceCanaryMember[]; description?: string; card?: CanaryFamilyCardInput })

## Returns

`Promise<TraceCanarySet>`

## HTTP operation

[`POST /v1/trace/canary_sets`](https://provenanceauth.com/docs/api/canary-sets.md#post-v1-trace-canary-sets): Create a canary set

## Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`canary_set_exists`](https://provenanceauth.com/docs/platform/errors.md#canary_set_exists)
- [`invalid_json`](https://provenanceauth.com/docs/platform/errors.md#invalid_json)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`parameter_missing`](https://provenanceauth.com/docs/platform/errors.md#parameter_missing)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)
- [`usage_limit_reached`](https://provenanceauth.com/docs/platform/errors.md#usage_limit_reached)

## Example

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/canary_sets`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "family": "wire_fraud",
    "model": "qwen2.5-0.5b-instruct@7ae55760",
    "members": [
      {
        "layer": 16,
        "idx": 1495,
        "pole": "pos",
        "threshold": 11
      }
    ],
    "card": {
      "title": "Wire fraud",
      "definition": "Text that pushes the agent to send money to a new or changed account.",
      "may_indicate": [
        "An email asks to change where an invoice is paid"
      ]
    }
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/trace/canary_sets", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "family": "wire_fraud",
    "model": "qwen2.5-0.5b-instruct@7ae55760",
    "members": [
        {
            "layer": 16,
            "idx": 1495,
            "pole": "pos",
            "threshold": 11
        }
    ],
    "card": {
        "title": "Wire fraud",
        "definition": "Text that pushes the agent to send money to a new or changed account.",
        "may_indicate": [
            "An email asks to change where an invoice is paid"
        ]
    }
}).json()
```
