Skip to main content
POST
/
service
/
v2
/
ai
/
filter
Create AI Filter
curl --request POST \
  --url https://oathnet.org/api/service/v2/ai/filter \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "query": "<string>",
  "index": "breach",
  "filter_id": "0123456789abcdef01234567"
}
'
{
  "filter_id": "0123456789abcdef01234567",
  "filter": {
    "field": "country",
    "operator": "eq",
    "value": "us"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.oathnet.org/llms.txt

Use this file to discover all available pages before exploring further.

Translate natural language into a structured filter for breach, victims, or docs search.
This endpoint returns raw JSON with filter_id and filter. Use filter_id to refine or reuse the generated context.
The returned filter object follows the same grammar documented in Structured Filters.

Authorizations

x-api-key
string
header
required

API key for authentication (lowercase header name)

Body

application/json
query
string
required
index
enum<string>
Available options:
breach,
docs,
victims
filter_id
string

24-character transient filter context ID.

Pattern: ^[0-9a-fA-F]{24}$
Example:

"0123456789abcdef01234567"

Response

200 - application/json

Raw AI filter creation response

filter_id
string

24-character transient filter context ID.

Pattern: ^[0-9a-fA-F]{24}$
Example:

"0123456789abcdef01234567"

filter
object

Recursive structured filter tree.

Constraints:

  • maximum nesting depth: 2
  • maximum leaf conditions: 50
  • each node should use exactly one of field, and, or or
Example:
{
"field": "country",
"operator": "eq",
"value": "us"
}