Skip to content
Get started

Create

client.teams.ipFilters.create(stringteamID, IPFilterCreateParams { category, name, enabled, 2 more } body, RequestOptionsoptions?): IPFilterCreateResponse { filter }
POST/teams/{teamId}/ip-filters

Create a custom IP-detection filter for a team (built-in filters are toggled via PUT /teams/{teamId}/ip-filters/{filterId})

ParametersExpand Collapse
teamID: string
body: IPFilterCreateParams { category, name, enabled, 2 more }
category: "artist-style" | "brand-trademark" | "celebrity-likeness" | 2 more

Filter category; use “custom” for customer-authored filters

One of the following:
"artist-style"
"brand-trademark"
"celebrity-likeness"
"custom"
"fictional-character"
name: string

Display name for the filter

enabled?: boolean

Whether the filter is active

instruction?: string

Natural-language detection instruction (required for custom filters)

maxLength2000
minLength1
sourceAssetIds?: Array<string>

Optional reference assets used only to generate the instruction

ReturnsExpand Collapse
IPFilterCreateResponse { filter }
filter: unknown

The created custom filter, including its enabled state

Create

import Scenario from '@scenario-labs/sdk';

const client = new Scenario({
  apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
  apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});

const ipFilter = await client.teams.ipFilters.create('teamId', {
  category: 'artist-style',
  name: 'name',
});

console.log(ipFilter.filter);
{
  "filter": {}
}
Returns Examples
{
  "filter": {}
}