Appbricx
Docs
FeaturesPricingStart free

Get started

OverviewWhat Appbricx isQuickstart with a coding agentQuickstart with the builderCore concepts

Guides

Data and tablesAccess and rolesBusiness rulesSign-inCustom screensRealtime and topicsWorkflows, schedules and webhooksServer functionsAI in your appPaymentsFilesMessagesIntegrationsVerifyPublishing, domains and rollbackOperating your appExport and self-hostSelf-host install

Tutorials

Build a booking app with Claude CodeMulti-user todo listClient portalSlack on new sign-upTemplates

Reference

Reference homeFrontend SDKHTTP APIMCP toolsCLIIntegrations catalogContract formatAI key resolutionRun Appbricx locally

Grok (xAI)

Generate text completions using xAI's Grok models.

AI and MLAPI key5 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (5)
  4. ask_grok
  5. categorize_text
  6. extract_data_from_text
  7. generate_image
  8. custom_api_call
  9. Details

Connect

Auth type: API key (secret_text). Paste the API key (or token) from the provider's settings into the connect dialog. It is encrypted at rest and only decrypted on the server when an action runs.

  • In the editor: Backend panel, Integrations tab, then Connect. This connects it for the project.
  • For every project in a workspace: Workspace settings, Integrations.
  • Owners and admins choose which integrations members may connect in the admin panel (Integrations tab), and can attach their own OAuth app there.

Call it from a workflow

Pass the action name and its input. The call resolves with { success, output, error? }; a missing connection resolves with success false and the reason. See ctx.integrations.invoke and ctx.integrations.call.

Native workflow
// .workflow.js (native ctx)
export async function run(ctx) {
  const res = await ctx.integrations.invoke("grok_xai", "ask_grok", {
    "model": "<model>",
    "messages": []
  });
  if (!res.success) throw new Error(res.error);
  ctx.log.info("Grok (xAI) answered", { output: res.output });
}
defineWorkflow module
// defineWorkflow module (@app/sdk ctx)
import { defineWorkflow } from "@app/sdk";

export default defineWorkflow({
  id: "grok-xai-ask-grok",
  name: "Grok (xAI): Ask Grok",
  description: "Calls Grok (xAI) when a row is created.",
  trigger: { type: "entity_event", entity: "tickets", event: "created" },
  async run(ctx, event) {
    const res = await ctx.integrations.call("grok_xai", {
      "action": "ask_grok",
      "model": "<model>",
      "messages": []
    }) as { success: boolean; error?: string };
    if (!res.success) throw new Error(res.error);
  },
});
From an app (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/grok_xai/ask_grok" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"model":"<model>","messages":[]}}'

Actions

ask_grokin catalog

Ask Grok. Send prompts to Grok with real-time search, tools, and structured outputs.

InputTypeDescription
modelrequiredid (picked from your account)Grok model to use for generating the response.
messagesrequiredarrayConversation messages for multi-turn conversations.
quickPromptoptionallong textSimple text prompt for single-turn conversations. Ignored if Messages is provided.
systemMessageoptionallong textSystem message to set behavior and context.
imageUrloptionaltextImage URL for vision models. Works with quick prompt mode.
temperatureoptionalnumberControls randomness (0-2): 0 = deterministic, 1 = balanced, 2 = creative.
maxCompletionTokensoptionalnumberMaximum tokens for the response.
responseFormatoptionalone of "text" | "json_object" | "json_schema"Output format for the response.
jsonSchemaoptionallong textJSON schema for structured output (when response format is json_schema).
enableRealTimeSearchoptionalbooleanAllow Grok to search the web and X for current information.
searchModeoptionalone of "auto" | "on" | "off"How to handle real-time data search.
maxSearchResultsoptionalnumberMaximum number of search results to use (1-30).
searchSourcesoptionalids (picked from your account)Sources to search in.
toolsoptionalarrayFunctions the model can call.
toolChoiceoptionalone of "auto" | "none" | "required"How the model should use tools.
parallelToolCallsoptionalbooleanAllow model to call multiple tools simultaneously.
reasoningEffortoptionalone of "" | "low" | "high"How hard reasoning models should think (not for grok-4).
memoryKeyoptionaltextKeep conversation history across runs.

categorize_textin catalog

Categorize Text. Assign categories to input text based on custom or predefined labels.

InputTypeDescription
modelrequiredid (picked from your account)Grok model to use for text categorization.
textrequiredlong textText content to categorize.
categoriesrequiredarrayDefine the categories for classification.
allowMultipleoptionalbooleanText can be assigned to multiple categories.
includeConfidenceoptionalbooleanInclude confidence scores for each category.
customInstructionsoptionallong textAdditional instructions for categorization.
enableContextSearchoptionalbooleanSearch for additional context to improve categorization.
temperatureoptionalnumberControls randomness (0-2): 0 = deterministic, 1 = balanced, 2 = creative.
maxCompletionTokensoptionalnumberMaximum tokens for the response.
reasoningEffortoptionalone of "" | "low" | "high"How thoroughly to analyze the text.

extract_data_from_textin catalog

Extract Data From Text. Extract structured data fields from unstructured text (e.g., names, addresses, dates).

InputTypeDescription
modelrequiredid (picked from your account)Grok model to use for data extraction.
textrequiredlong textText to extract data from.
extractionPromptoptionallong textHow to extract the data.
fieldsrequiredarrayDefine the structured fields to extract from the text.
enableContextSearchoptionalbooleanSearch for additional context to improve extraction.
strictExtractionoptionalbooleanOnly extract explicitly present information.
temperatureoptionalnumberControls randomness (0-2): 0 = deterministic, 1 = balanced, 2 = creative.
maxCompletionTokensoptionalnumberMaximum tokens for the response.
reasoningEffortoptionalone of "" | "low" | "high"How thoroughly to analyze the text.
includeConfidenceoptionalbooleanInclude confidence scores for extracted fields.

generate_imagein catalog

Generate Image. Create images from text prompts using Grok's image generation.

InputTypeDescription
promptrequiredlong textDetailed description of the image you want to generate.
modelrequiredid (picked from your account)Image generation model to use.
numberOfImagesoptionalnumberNumber of images to generate (1-10).
responseFormatoptionalone of "url" | "b64_json"Format of the generated images.

custom_api_call

Custom API Call. Make a custom API call to a specific endpoint

InputTypeDescription
urlrequiredobject (depends on other props)url
methodrequiredone of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD"Method
headersrequiredobjectAuthorization headers are injected automatically from your connection.
queryParamsrequiredobjectQuery Parameters
body_typeoptionalone of "none" | "json" | "form_data" | "raw"Body Type
bodyoptionalobject (depends on other props)Body
response_is_binaryoptionalbooleanEnable for files like PDFs, images, etc.
failsafeoptionalbooleanNo Error on Failure
timeoutoptionalnumberTimeout (in seconds)
followRedirectsoptionalbooleanFollow redirects

Details

Id
grok_xai
Category
AI and ML
Tags
ai, xai, grok, llm
Package
@activepieces/piece-grok-xai@0.1.4
Tier
Community

On this page

  1. Connect
  2. Call it from a workflow
  3. Actions (5)
  4. ask_grok
  5. categorize_text
  6. extract_data_from_text
  7. generate_image
  8. custom_api_call
  9. Details
Appbricx

The backend, runtime and hosting for apps your coding agent builds. On our cloud, in yours, or on your own servers.

Features

Coding agents and MCPVerify testingBuilder consolePostgres databaseData APIRealtimeRow-level securitySign-in and authPaymentsWorkflows and jobsAI in your appIntegrationsBackups and rollbackHosting and domainsSelf-host and exportAll features

Product

ShowcasePricingFor coding agentsTemplatesPrivate cloudBring your own AI keyFAQ

Compare

Appbricx vs SupabaseLovable alternativeBolt alternativeFor freelancersFor agencies

Resources

DocumentationReferenceBlogSupportContact

© 2026 Appbricx. All rights reserved.

TermsPrivacyCookiesAcceptable Use