grok-imagine-mcp

v0.2.3
io.github.runapi-builder/grok-imagine-mcp Checked 2 days ago Published 3 days ago

RunAPI MCP server for Grok Imagine: create tasks, poll status, check pricing.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

login

Authenticate RunAPI by opening a browser PKCE login flow and saving the API key to ~/.config/runapi/config.json.

ParameterTypeDescription
forcebooleanRe-run browser login when the current credential comes from the local config file.

edit_image

Create a Grok Imagine task on RunAPI (edit image). Returns a task id, status, and output URLs.

ParameterTypeDescription
aspect_ratiostringDeclared type: string.
callback_urlstringWebhook URL for terminal Task delivery. Declared type: string.
enable_safety_checkerbooleanEnable content safety checks. Declared type: boolean.
mask_indicesNot accepted by this model.
modelstringRunAPI model slug for this model line.
poll_interval_msinteger
promptstringOptional image editing instruction. Declared type: string.
source_image_urlstringPublic source image URL. Declared type: string.
source_image_urlsarrayDeclared type: array.
source_task_idNot accepted by this model.
timeout_msinteger
waitbooleanPoll until the task reaches a terminal status.

extend_video

Create a Grok Imagine task on RunAPI (extend video). Returns a task id, status, and output URLs.

ParameterTypeDescription
extension_duration_seconds *integerExtension duration in seconds. Declared type: integer. Known values: 6, 10.
prompt *stringVideo continuation prompt. Declared type: string.
source_task_id *stringCompleted prior Grok Imagine video Task ID. Declared type: string.
start_seconds *integerSource video position in seconds where extension begins. Declared type: integer.
callback_urlstringWebhook URL for terminal Task delivery. Declared type: string.
poll_interval_msinteger
timeout_msinteger
waitbooleanPoll until the task reaches a terminal status.

image_to_video

Create a Grok Imagine task on RunAPI (image to video). Returns a task id, status, and output URLs.

ParameterTypeDescription
aspect_ratiostringOutput aspect ratio. Declared type: string. Known values: "2:3", "3:2", "1:1", "16:9", "9:16", "auto".
callback_urlstringWebhook URL for terminal Task delivery. Declared type: string.
duration_secondsintegerOutput duration in seconds. Declared type: integer.
enable_safety_checkerbooleanEnable content safety checks. Declared type: boolean.
indexintegerZero-based source image index; used only with source_task_id. Declared type: integer.
modelstringRunAPI model slug for this model line.
motion_stylestringVideo motion style; spicy requires source_task_id. Declared type: string.
output_resolutionstringOutput resolution. Declared type: string. Known values: "480p", "720p", "1080p".
poll_interval_msinteger
promptstringOptional video generation prompt. Declared type: string.
reference_image_urlsarrayNot accepted by this model. Declared type: array.
source_image_urlstringPublic source image URL; provide this or source_task_id, but not both. Declared type: string.
source_task_idstringPrior Grok Imagine text-to-image Task ID; provide this or source_image_url, but not both. Declared type: string.
timeout_msinteger
waitbooleanPoll until the task reaches a terminal status.

segment_map

Create a Grok Imagine task on RunAPI (segment map). Returns a task id, status, and output URLs.

ParameterTypeDescription
callback_urlstringWebhook URL for terminal Task delivery. Declared type: string.
image_urlstringPublic image URL that the service can fetch. Declared type: string.
modelstringRunAPI model slug for this model line.
poll_interval_msinteger
source_task_idstringCompleted Image 2.0 text-to-image Task ID owned by the same account. Compatibility input; use image_url instead. Declared type: string.
timeout_msinteger
waitbooleanPoll until the task reaches a terminal status.

text_to_image

Create a Grok Imagine task on RunAPI (text to image). Returns a task id, status, and output URLs.

ParameterTypeDescription
prompt *stringImage generation prompt. Declared type: string.
aspect_ratiostringOutput aspect ratio. Declared type: string. Known values: "1:1", "2:3", "3:2", "16:9", "9:16".
callback_urlstringWebhook URL for terminal Task delivery. Declared type: string.
enable_probooleanNot accepted by this model. Declared type: boolean.
enable_safety_checkerbooleanNot accepted by this model. Declared type: boolean.
modelstringRunAPI model slug for this model line.
poll_interval_msinteger
timeout_msinteger
waitbooleanPoll until the task reaches a terminal status.

text_to_video

Create a Grok Imagine task on RunAPI (text to video). Returns a task id, status, and output URLs.

ParameterTypeDescription
prompt *stringVideo generation prompt. Declared type: string.
aspect_ratiostringOutput aspect ratio. Declared type: string. Known values: "2:3", "3:2", "1:1", "16:9", "9:16", "auto".
callback_urlstringWebhook URL for terminal Task delivery. Declared type: string.
duration_secondsintegerOutput duration in seconds. Declared type: integer.
enable_safety_checkerbooleanEnable content safety checks. Declared type: boolean.
modelstringRunAPI model slug for this model line.
motion_stylestringVideo motion style. Declared type: string.
output_resolutionstringOutput resolution. Declared type: string. Known values: "480p", "720p", "1080p".
poll_interval_msinteger
reference_image_urlsarrayNot accepted by this model. Declared type: array.
timeout_msinteger
waitbooleanPoll until the task reaches a terminal status.

upscale_image

Create a Grok Imagine task on RunAPI (upscale image). Returns a task id, status, and output URLs.

ParameterTypeDescription
source_task_id *stringCompleted prior Grok Imagine video Task ID. Declared type: string.
callback_urlstringWebhook URL for terminal Task delivery. Declared type: string.
poll_interval_msinteger
timeout_msinteger
waitbooleanPoll until the task reaches a terminal status.

get_task

Fetch the current status and latest result payload for a grok-imagine task.

ParameterTypeDescription
action *stringAsynchronous endpoint the task was created on.
task_id *stringTask id returned when the task was created.

check_pricing

Look up RunAPI pricing for the grok-imagine model line.

ParameterTypeDescription
actionstringEndpoint name. Defaults to the endpoint that offers the model.
modelstringModel slug. Defaults to the line's primary model.