UNPKG

grok-mcp

Version:

MCP server for Grok AI API integration

36 lines (35 loc) 1.33 kB
/** * GrokApiClient - A client for interacting with the Grok AI API */ export declare class GrokApiClient { private axiosInstance; private apiKey; private baseUrl; /** * Constructor for the GrokApiClient * @param apiKey - The Grok AI API key */ constructor(apiKey: string); /** * Make a request to the chat completions endpoint * @param messages - The messages to send to the API * @param options - Additional options for the request * @returns The API response */ createChatCompletion(messages: any[], options?: any): Promise<any>; /** * Make a request to the chat completions endpoint with image input * @param messages - The messages to send to the API (including image content) * @param options - Additional options for the request * @returns The API response */ createImageUnderstanding(messages: any[], options?: any): Promise<any>; /** * Make a request to the chat completions endpoint with function calling * @param messages - The messages to send to the API * @param tools - The tools to make available to the model * @param options - Additional options for the request * @returns The API response */ createFunctionCall(messages: any[], tools: any[], options?: any): Promise<any>; }