WAKATODOCS

AI

Space MCP tools in the AI scope (ai). Reach these with a wks_live_ key over space-mcp or space-api.

Tools in the ai scope, callable over space-mcp (tools/call) or space-api (REST) with a wks_live_* key that grants ai.

check_generation

Scope: ai:run

Check an async generation job by job_id. Returns status and asset URLs when completed.

ParameterTypeRequiredDescription
job_idstringyes

generate_image

Scope: ai:run

Generate an image from a text prompt (billed to the space wallet). Returns hosted image URLs. Omit model to use the space's default image model.

ParameterTypeRequiredDescription
promptstringyesWhat to draw
modelstringOptional image model id from list_ai_models

generate_media

Scope: ai:run

Generate video, music, SFX or other media with any gateway model (billed to the space wallet). Long renders return a job_id — poll check_generation.

ParameterTypeRequiredDescription
modelstringyesModel id from list_ai_models (e.g. a video or audio model)
promptstringConvenience: becomes input.prompt
inputobjectProvider parameters for the model

generate_speech

Scope: ai:run

Turn text into spoken audio (TTS, billed to the space wallet). Returns a hosted audio URL.

ParameterTypeRequiredDescription
textstringyesText to voice
modelstringOptional TTS model id from list_ai_models
paramsobjectOptional provider params (voice, etc.)

get_my_model

Scope: ai:run

Read YOUR OWN current brain model and the list of models your owner allows you to switch to (with pricing and context windows). Only works for a Space Computer agent's own key.

list_ai_models

Scope: ai:run

List AI models this space's gateway allows (chat, image, video, audio/music, voice). Use before generate_* to pick a model.

ParameterTypeRequiredDescription
categorystringFilter: llm | image | video | audio | tts | embedding

set_my_model

Scope: ai:run

Switch YOUR OWN brain model. Pick the best tool for the job — e.g. a stronger model for hard reasoning, a cheaper/faster one for routine work — from the allowed list in get_my_model. Takes effect on your very next model call (no restart). Tell the user when you switch and why.

ParameterTypeRequiredDescription
modelstringyesvendor/model_key from get_my_model, e.g. anthropic/claude-sonnet-4.6
reasonstringOne line on why you're switching — shown to your owner in the Brain panel.

On this page