Convert natural language to filters
Uses an LLM to convert a natural-language query (e.g. “posts from twitter influencers about pricing this week”) into a structured filter object usable with /api/v2/mentions.
Authorizations
Clerk API key. Create one in Settings → API Keys. Pass as Authorization: Bearer <key>.
Body
Convert a natural-language query into an Octolens filter object.
Natural-language description of what the user wants to see.
1 - 1000"only negative tweets about pricing from the last 7 days"
Which filter contract to return (default mentions). mentions returns the flat filter map accepted by POST /api/v2/mentions filters. feed returns the SimpleFilters/AdvancedFilters shape accepted verbatim by the feed endpoints (POST /api/v2/feeds / PATCH /api/v2/feeds/{id}) — the two contracts are not interchangeable.
mentions, feed Response
200 response
Filter object generated from a natural-language query. Client applies filters to the feed and shows explanation to the user.
Generated filter object, in the contract selected by target: the flat mentions filter map (default) or a feed SimpleFilters/AdvancedFilters shape (target: "feed"). null when the query is ambiguous or matches everything. Use isAdvanced to determine whether it's the simple or advanced shape.
- Option 1
- Option 2
- Option 3
- Option 4
If true, filters is an AdvancedFilters shape (AND/OR groups). Otherwise it's a SimpleFilters (flat AND list).
Requested page size — preserved from currentLimit unless the user asked to change it.
-9007199254740991 <= x <= 9007199254740991Whether to include low-relevance posts.
View id the AI resolved the query against (if the user referenced a view by name). null otherwise.
-9007199254740991 <= x <= 9007199254740991Plain-English summary of what the filter will match — shown in the UI.
