UNPKG

n8n-nodes-grok

Version:

n8n node for Grok API integration

40 lines (39 loc) 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GrokApi = void 0; class GrokApi { constructor() { this.name = 'grokApi'; this.displayName = 'Grok API'; this.documentationUrl = 'https://console.x.ai/'; this.properties = [ { displayName: 'API Key', name: 'apiKey', type: 'string', typeOptions: { password: true, }, default: '', required: true, description: 'The Grok API key', }, ]; this.authenticate = { type: 'generic', properties: { headers: { 'Authorization': '=Bearer {{$credentials.apiKey}}', accept: 'application/json', }, }, }; this.test = { request: { baseURL: 'https://api.x.ai/v1', url: '/models', }, }; } } exports.GrokApi = GrokApi;