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:
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:
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
| Action | What it does | Key input | Key output |
|---|---|---|---|
generateText | Text generation with any LLM | message, modelOverride? | content |
generateImage | Image from text prompt | prompt, modelOverride? | imageUrl |
generateVideo | Video from text/image | prompt, imageUrl? | videoUrl |
textToSpeech | Text to spoken audio | text, modelOverride? | audioUrl |
generateMusic | Music from text description | prompt | audioUrl |
generateLipsync | Animate face to match audio | imageUrl, audioUrl | videoUrl |
generateAsset | HTML/PDF/PNG/video output | prompt | assetUrl |
#AI Analysis
| Action | What it does | Key input | Key output |
|---|---|---|---|
analyzeImage | Vision model analysis | prompt, imageUrl | analysis |
analyzeVideo | Video analysis | prompt, videoUrl | analysis |
transcribeAudio | Audio to text | audioUrl | transcription |
extractText | Extract text from documents/images | url | text |
detectPII | Find personal data | text | entities |
#Web & Search
| Action | What it does | Key input | Key output |
|---|---|---|---|
scrapeUrl | Extract page content | url | markdown |
searchGoogle | Google search | query | results |
searchGoogleImages | Image search | query | results |
searchGoogleNews | News search | query | results |
searchPerplexity | AI-powered search | query | answer |
httpRequest | Custom HTTP call | url, method, headers?, body? | response |
#Communication
| Action | What it does | Key input | Key output |
|---|---|---|---|
sendEmail | Send an email (own-brand sender auto-selected) | to, subject, body, cc?, bcc?, from?, replyTo?, inReplyTo?, references?, bodyType?, attachments? | recipients, cc, bcc, from |
sendSMS | Send a text message | to, message | messageId |
postToSlackChannel | Post to Slack | channel, message | — |
#Media Processing
| Action | What it does |
|---|---|
removeBackgroundFromImage | Remove image background |
upscaleImage | Upscale image resolution |
imageFaceSwap | Swap faces in an image |
imageRemoveWatermark | Remove watermarks |
mergeVideos | Concatenate video clips |
trimMedia | Trim audio/video |
addSubtitlesToVideo | Auto-generate subtitles |
extractAudioFromVideo | Extract audio track |
captureThumbnail | Get video thumbnail |
#Files & Data
| Action | What it does |
|---|---|
downloadVideo | Download a video URL |
getMediaMetadata | Get dimensions, duration, etc. |
convertPdfToImages | PDF 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:
// 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:
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:
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.
#Related
- 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