Learn how to run a prompt against a monday-hosted AI model directly from the platform API using the run_prompt mutation
monday.com's AI features let you run prompts against monday-hosted AI models without managing your own model provider or API keys. The run_prompt mutation is a simplified, GraphQL-native entry point to monday.com's AI gateway: send a prompt, optionally tune the model and generation settings, and get the generated text back in the same request as the rest of your integration.
Only available in API versions
2026-10and later
run_promptis a simplified version of the Models API. It covers single-turn text completions. For more advanced use cases — multi-turn conversations, streaming, tool/function calling, or richer request and response control — use the Models API instead.
Requirements
Before you can use run_prompt, make sure the following are in place:
- External AI gateway access permission must be enabled for the account. Without it, the mutation returns a permission error.
- Apps: if you call
run_promptthrough an app (with an app token), the app must request theAI:Consumescope. - AI token consumption: like the Models API, usage draws down monday AI tokens. The same metering and consumption rules apply. See Pricing and metering for details.
Mutations
Required scope (apps): AI:Consume
Run a prompt
Runs a single prompt against a monday-hosted AI model and returns the generated text. Returns a RunPromptResult.
mutation {
run_prompt(
prompt: "Summarize the benefits of regular exercise in two sentences."
config: {
model: MONDAY_STANDARD
system_prompt: "You are a concise assistant."
temperature: 0.7
max_tokens: 200
}
) {
content
}
}The minimal form only requires a prompt:
mutation {
run_prompt(prompt: "Say hello in exactly three words.") {
content
}
}import { ApiClient } from "@mondaydotcomorg/api";
const mondayApiClient = new ApiClient({ token: myToken });
const query = `
mutation {
run_prompt(
prompt: "Summarize the benefits of regular exercise in two sentences."
config: { model: MONDAY_STANDARD, temperature: 0.7, max_tokens: 200 }
) {
content
}
}
`;
const response = await mondayApiClient.request(query);Arguments
| Argument | Type | Description |
|---|---|---|
| prompt | String! | The user prompt to send to the model. Must not be empty. |
| config | RunPromptConfigInput | Optional configuration for the completion (model, system prompt, temperature, and max tokens). If omitted, model defaults are used. |
Fields
| Field | Type | Description |
|---|---|---|
| content | String | The generated text content from the model. |
