Reference
Remy Reference/Guide/SDK Actions
Chapter 11

SDK Actions

@mindstudio-ai/agent provides access to 200+ AI models and 1,000+ actions through a single API key. No separate provider keys are needed — MindStudio routes to the correct provider (OpenAI, Anthropic, Google, and others) server-side, and billing is handled centrally.

That includes hundreds of text generation models, dozens of image generation models (FLUX, DALL-E, Stable Diffusion, Ideogram, …), video generation, text-to-speech, music generation, vision analysis, web scraping, and 850+ OAuth connectors. The tables in this document are a summary, not the full catalog.

Always consult askMindStudioSdk before writing SDK code. It knows the full @mindstudio-ai/agent surface — every action, option, and return type — and it is the authority on model IDs, which do not match vendor IDs. A plausible-looking guess is usually wrong.


#Usage in Methods

Inside an app method, use the mindstudio singleton. Credentials come from the execution environment automatically — there is nothing to configure and no key to store as a secret:

typescript
import { mindstudio } from '@mindstudio-ai/agent';

const { content } = await mindstudio.generateText({ message: 'Summarize this...' });

Results are returned flat, with output fields at the top level alongside metadata:

typescript
const result = await mindstudio.generateText({ message: 'Hello' });
result.content;              // step-specific output
result.$billingCost;         // cost in credits (if applicable)

#Capabilities

What the actions cover, including a few that aren't obvious:

  • Text generation across every major model family
  • Image generation, including images containing legible text
  • Image remixing — take a user's uploaded image as the source for a generation model to restyle it, or combine several into a collage
  • Video generation, including from reference images and start frames, with audio and voice
  • Speech and audio — text-to-speech, music generation, transcription
  • Detailed image and video analysis via vision models

#Action Reference

#AI Generation

ActionWhat it doesKey inputKey output
generateTextText generation with any LLMmessage, modelOverride?content
generateImageImage from text promptprompt, modelOverride?imageUrl
generateVideoVideo from text/imageprompt, imageUrl?videoUrl
textToSpeechText to spoken audiotext, modelOverride?audioUrl
generateMusicMusic from text descriptionpromptaudioUrl
generateLipsyncAnimate face to match audioimageUrl, audioUrlvideoUrl
generateAssetHTML/PDF/PNG/video outputpromptassetUrl

#AI Analysis

ActionWhat it doesKey inputKey output
analyzeImageVision model analysisprompt, imageUrlanalysis
analyzeVideoVideo analysisprompt, videoUrlanalysis
transcribeAudioAudio to textaudioUrltranscription
extractTextExtract text from documents/imagesurltext
detectPIIFind personal datatextentities
ActionWhat it doesKey inputKey output
scrapeUrlExtract page contenturlmarkdown
searchGoogleGoogle searchqueryresults
searchGoogleImagesImage searchqueryresults
searchGoogleNewsNews searchqueryresults
searchPerplexityAI-powered searchqueryanswer
httpRequestCustom HTTP callurl, method, headers?, body?response

#Communication

ActionWhat it doesKey inputKey output
sendEmailSend an email (own-brand sender auto-selected)to, subject, body, cc?, bcc?, from?, replyTo?, inReplyTo?, references?, bodyType?, attachments?recipients, cc, bcc, from
sendSMSSend a text messageto, messagemessageId
postToSlackChannelPost to Slackchannel, message

#Media Processing

ActionWhat it does
removeBackgroundFromImageRemove image background
upscaleImageUpscale image resolution
imageFaceSwapSwap faces in an image
imageRemoveWatermarkRemove watermarks
mergeVideosConcatenate video clips
trimMediaTrim audio/video
addSubtitlesToVideoAuto-generate subtitles
extractAudioFromVideoExtract audio track
captureThumbnailGet video thumbnail

#Files & Data

ActionWhat it does
downloadVideoDownload a video URL
getMediaMetadataGet dimensions, duration, etc.
convertPdfToImagesPDF pages to PNG images

Actions that produce files can write straight into a file store rather than returning a URL you then have to persist. See Files & Storage.


#Third-Party Integrations (OAuth Connectors)

850+ additional actions from the MindStudio Connector Registry, covering services like HubSpot, Salesforce, Airtable, Google Workspace, Notion, and Coda. These require OAuth connections set up by the user in Remy.

Built-in connector methods include: ActiveCampaign, Airtable, Apollo, Coda, Facebook, Gmail, Google Docs/Sheets/Calendar/Drive, HubSpot, Hunter.io, Instagram, LinkedIn, Notion, X (Twitter), YouTube.

For other services, use runFromConnectorRegistry:

typescript
// Discover available connectors
const { connectors } = await mindstudio.listConnectors();

// Get action details
const action = await mindstudio.getConnectorAction('hubspot', 'create-contact');

// Execute
const result = await mindstudio.runFromConnectorRegistry({
  serviceId: 'hubspot',
  actionId: 'create-contact',
  input: { email: 'user@example.com', firstName: 'Alice' },
});

#Model Selection

Override the default model for any AI action with modelOverride. Each model has its own config options (dimensions, seed, inference steps, and so on), so look up the correct config with askMindStudioSdk before specifying an override:

typescript
const { content } = await mindstudio.generateText({
  message: 'Hello',
  modelOverride: {
    model: 'claude-5-sonnet',
    temperature: 0.7,
    maxResponseTokens: 16000,
  },
});

Two rules:

  • Prefer current-generation models. MindStudio carries many models, most of them historical. Start from the latest generation from leading providers — the Anthropic Claude family, Google Gemini, OpenAI GPT — rather than picking something recognizable from an older generation.
  • Generally don't set maxResponseTokens. Let models stop on their own and control length through prompt guidance instead. The limit includes thinking tokens, so setting it too low returns no usable result at all.

#Batch Execution

Run up to 50 actions in parallel:

typescript
const result = await mindstudio.executeStepBatch([
  { stepType: 'generateImage', step: { prompt: 'a sunset' } },
  { stepType: 'textToSpeech', step: { text: 'hello world' } },
]);
// result.results[0].output, result.results[1].output

#When to Use a Task Agent Instead

Chaining actions manually is right for a linear pipeline. For multi-step work where the model needs to decide what to do next (research plus scrape plus generate, enrichment pipelines, content creation with branching), use runTask() instead. It runs an agent loop and returns validated structured output, and its tools can include SDK actions, the app's own methods, and inline functions.

See Task Agents for the full reference.


  • Methods — where SDK actions are called from
  • Task Agents — autonomous composition of these actions
  • Files & Storage — writing generated assets straight into a store
  • Secrets — only needed for services the SDK does not cover