Skip to content
Get started

Create

teams.ip_filters.create(strteam_id, IPFilterCreateParams**kwargs) -> IPFilterCreateResponse
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
team_id: str
category: Literal["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: str

Display name for the filter

enabled: Optional[bool]

Whether the filter is active

instruction: Optional[str]

Natural-language detection instruction (required for custom filters)

maxLength2000
minLength1
source_asset_ids: Optional[Sequence[str]]

Optional reference assets used only to generate the instruction

ReturnsExpand Collapse
class IPFilterCreateResponse: …
filter: object

The created custom filter, including its enabled state

Create

import os
from scenario_sdk import Scenario

client = Scenario(
    api_key=os.environ.get("SCENARIO_SDK_API_KEY"),  # This is the default and can be omitted
    api_secret=os.environ.get("SCENARIO_SDK_API_SECRET"),  # This is the default and can be omitted
)
ip_filter = client.teams.ip_filters.create(
    team_id="teamId",
    category="artist-style",
    name="name",
)
print(ip_filter.filter)
{
  "filter": {}
}
Returns Examples
{
  "filter": {}
}