XAI Grok
the xai grok connector enables users to query an ai model for intelligent, explainable responses directly within their security automation workflows xai grok serves as an advanced ai platform, offering model based responses to complex queries and facilitating deep data analysis through the xai grok connector, swimlane turbine users can harness the power of ai to generate insights, automate reasoning tasks, and customize searches within their security workflows this integration empowers security teams to make informed decisions faster, streamline data analysis, and tailor information retrieval to their unique requirements, all within the low code swimlane turbine environment limitations none to date supported versions this connector supports the latest version of xai grok prerequisites to effectively utilize the xai grok connector within swimlane turbine, ensure you have the following api key authentication with the necessary parameters url the endpoint address for xai grok's api services api key a unique identifier to authenticate requests to xai grok model the specific ai model within xai grok to be used for generating responses capabilities this connector provides the following capabilities ask grok ask grok generates output using the selected grok model and the input text xai grok's documentation for this action can be found here https //docs x ai/docs/api reference#chat completions configurations api key authentication authenticates using an api key configuration parameters parameter description type required url the url of the xai grok api string required apikey your unique api key for authentication string required model the model that will complete your prompt string required verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional actions ask grok generates a model based response from xai grok using the provided input prompt endpoint url /v1/chat/completions method post input argument name type required description prompt string required the prompt to send to the model deferred boolean optional whether to defer the response or not frequency penalty number optional how much to penalize new tokens based on their existing frequency in the text so far logit bias object optional the logit bias to apply to the response logprobs boolean optional whether to return log probabilities of the output tokens or not max completion tokens number optional the maximum number of tokens to generate n number optional how many chat completion choices to generate for each input message parallel tool calls boolean optional whether to allow parallel tool calls or not presence penalty number optional how much to penalize new tokens based on their existing presence in the text so far reasoning effort string optional the effort to use for reasoning search parameters array optional set the parameters to be used for searched data search parameters from date string optional date from which to consider the results in iso 8601 yyyy mm dd search parameters to date string optional date up to which to consider the results in iso 8601 yyyy mm dd search parameters max search results number optional maximum number of search results to use search parameters mode string optional mode to use for searching data search parameters return citations boolean optional whether to return citations in the response or not search parameters sources array required parameters for the ask grok action search parameters sources excluded x handles array optional list of x handles to exclude from the search results search parameters sources included x handles array optional list of x handles to include in the search results search parameters sources post favorite count number optional the minimum favorite count of the x posts to consider search parameters sources post view count number optional the minimum view count of the x posts to consider search parameters sources type string required type of the data to search search parameters sources allowed websites array optional list of website to allow in the search results search parameters sources excluded websites array optional list of website to exclude from the search results without protocol specification or subdomains search parameters sources country string optional iso alpha 2 code of the country input example {"json body" {"deferred"\ false,"frequency penalty" 2,"logit bias" {},"logprobs"\ false,"max completion tokens" 100,"n" 1,"parallel tool calls"\ true,"presence penalty" 0,"reasoning effort" "low","search parameters" \[{"from date" "2012 01 01","to date" "2025 01 01","max search results" 15,"mode" "auto","return citations"\ true,"sources" \[{"excluded x handles" \["elonmusk"],"included x handles" \["jack"],"post favorite count" 100,"post view count" 1000,"type" "x","allowed websites" \["swimlane com"],"excluded websites" \["google com"],"country" "us","safe search"\ true,"links" \["https //swimlane com"]}]}],"seed" 10,"stop" \["test"],"stream"\ false,"stream options" \[{"include usage"\ false}],"temperature" 0,"tool choice" \[{"function" \[{"name" "my function"}],"type" "function"}],"tools" \[{"type" "function","function" {"name" "get current weather","description" "get the current weather in a given location","parameters" {},"strict"\ true},"sources" \[{"excluded x handles" \["elonmusk"],"included x handles" \["jack"],"post favorite count" 100,"post view count" 1000,"type" "x","allowed websites" \["swimlane com"],"excluded websites" \["google com"],"country" "us","safe search"\ true,"links" \["https //swimlane com"]}]}],"top logprobs" 0,"top p" 1,"user" "user 123","web search options" \[{"filters" \["news","videos"],"search context size" "max search","user location" "new york, ny"}]},"prompt" "what is the capital of france?"} output parameter type description message string response message status code number http status code of the response reason string response reason phrase output example {"message" "paris is the capital and most populous city of france \nsituated on the seine ri ","status code" 200,"headers"\ null,"reason" "ok"} response headers header description example content type the media type of the resource application/json date the date and time at which the message was originated thu, 01 jan 2024 00 00 00 gmt