AI/ML API
AI/ML API provides a suite of AI models and solutions for various tasks, including text generation, image processing, and more.
Verdict
Common use cases
- Filter user comments before publishing
- Generate quick replies in customer chat
- Test prompt variations across models
- Triage flagged content at scale
- Draft social posts with alternate LLM
Integration
- Vendor
- AI/ML API
- Category
- other
- Auth
- API_KEY
- Tools
- 2
- Composio slug
ai_ml_api
Tools
- Moderation Completion
Tool to classify input text or image for safety using a moderation model. use after receiving user-generated content to filter out unsafe material.
- Text Chat Completion
Tool to generate text completions or chat responses using a specified llm model. use after assembling the conversation history to produce the next response.
Setup
Setup guide
- 11. Open your Switchy workspace and navigate to Settings > Integrations > Browse MCP Servers. 2. Search for 'AI/ML API' and click Connect. 3. You'll see a prompt asking for your API key — log into your AI/ML API account at aimlapi.com, go to Dashboard > API Keys, and copy the key labeled 'Default' or create a new one. 4. Paste the key into Switchy's connection dialog and click Authorize. 5. Switchy confirms the connection with a green checkmark. 6. Open any Space, type '@AI/ML API moderate this text: [paste sample content]' and send — if you get a safety classification response, the integration works. 7. To generate text, try '@AI/ML API generate a response to: [paste a user message]' and specify a model if needed.
What teammates see: by default, memories from AI/ML API are scoped to the Space (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.
Works well with
Top models
Compatibility data appears once enough Spaces have used this MCP together with a given model.
How Switchy teams use it
Starter prompts
Moderate User Submission
@AI/ML API moderate this comment for safety: 'User just posted this in the forum — [paste text here]. Flag anything that violates our community guidelines.'Open in a Space →
Generate Support Reply
@AI/ML API generate a polite support reply to this ticket: 'Customer says their order never arrived and they want a refund. Use a friendly tone and offer next steps.'Open in a Space →
Batch Content Review
@AI/ML API moderate these five comments and rank them by severity: [paste numbered list of user posts]. Return a table with post number, category, and confidence score.Open in a Space →
Compare Model Outputs
@AI/ML API generate two versions of this product description — one with GPT-4 and one with GPT-3.5: 'Wireless earbuds with 30-hour battery and noise cancellation.' Show me both so I can pick the better one.Open in a Space →
Draft Social Caption
@AI/ML API write three Instagram captions for this product launch: 'New vegan protein bar, 20g protein, comes in chocolate and peanut butter.' Keep each under 150 characters and include one emoji per caption.Open in a Space →
Example outputs
Illustrative - representative of the model's voice and quality, not literal recordings.
@AI/ML API check this user comment for safety issues: 'I think your product is garbage and you should all be fired'
Moderation analysis complete. The comment contains hostile language but does not violate safety thresholds for harassment, hate speech, or threats. Category scores: harassment (0.42), hate (0.18), violence (0.09), self-harm (0.01). All categories remain below the 0.7 flagging threshold. The comment expresses strong negative sentiment but falls within acceptable discourse boundaries.
This example shows content moderation in action — useful for filtering user-generated content before it reaches your team or customers. The moderation model returns probability scores across safety categories; you'll need to decide your own thresholds. API key must have moderation access enabled.
@AI/ML API using gpt-4, draft a brief apology email to a customer whose order was delayed by 3 days due to a warehouse system outage
Subject: Our Sincere Apologies for Your Order Delay Dear [Customer Name], I'm writing to apologize for the delay in shipping your recent order. Due to an unexpected warehouse system outage, your package shipped three days later than promised. We understand how frustrating delays can be, especially when you're counting on a timely delivery. As a gesture of goodwill, we've applied a 15% credit to your account for your next purchase. Your order is now in transit and should arrive within 2-3 business days. Thank you for your patience and continued trust in us.
This example demonstrates text generation for a common business task. The MCP forwards your prompt to the specified LLM model (here, GPT-4) and returns the completion. You control model selection, temperature, and max tokens through the tool parameters. Costs accrue per token on your AI/ML API account.
@AI/ML API analyze the last 5 customer support tickets in this Space and identify the most common complaint theme using claude-3-5-sonnet
After reviewing the five support tickets, the dominant complaint theme is 'delayed response times from the support team.' Three of the five tickets explicitly mention waiting 24+ hours for an initial reply, with customers expressing frustration about the lack of acknowledgment. The other two tickets concern billing questions but also reference slow follow-up. Recommendation: prioritize response-time SLAs and consider automated acknowledgment messages to set expectations while tickets are queued.
This example pairs the MCP's text generation capability with Switchy's context — the AI reads ticket content from your Space and synthesizes a summary. This workflow is only possible if ticket data is already visible in the Space (via another MCP or manual paste). The AI/ML API MCP itself doesn't fetch external data; it processes what you provide.
Use-case deep-dives
When you need automated content filtering before human review
A 6-person community team managing a Discord server with 12,000 active users needs to flag toxic content before it spreads. The Moderation Completion tool runs on every message posted in public channels, tagging anything that trips safety thresholds for manual review. This works when your moderation queue is under 500 items per day and your team can handle the false-positive rate (typically 8-12% for text-only checks). If you're moderating image-heavy channels or need sub-second latency, test the tool's image classification speed first—some moderation models add 400-600ms per image. For teams already using OpenAI's moderation endpoint, this MCP is redundant unless you're consolidating vendor relationships. Use this when you want one API key covering both moderation and chat generation in the same Switchy workspace.
Fast iteration on conversational AI without infrastructure
A 3-person startup building a support chatbot for their SaaS product uses the Text Chat Completion tool to prototype conversation flows in Switchy before committing to a full LangChain pipeline. They assemble conversation history in a shared doc, pass it to the tool, and test different system prompts across 20-30 sample tickets. This setup shines when you're in the first 2-4 weeks of chatbot design and need to fail fast on tone and accuracy. The tool doesn't handle context windows over 8,000 tokens well, so if your support tickets average more than 1,200 words, you'll hit truncation issues. It also lacks streaming responses, which means users see a blank screen for 3-5 seconds on complex queries. Use this MCP when you're validating chatbot viability, not shipping production traffic.
Generating outbound copy with built-in safety checks
A 5-person sales team at a B2B fintech company uses the Text Chat Completion tool to draft personalized cold emails, then pipes every draft through the Moderation Completion tool to catch language that could trigger spam filters or compliance flags. They run 40-60 emails per week, and the moderation step catches roughly 1 in 8 drafts that mention pricing or competitor names in ways that read as aggressive. This workflow works when your outbound volume is under 200 emails per week and you're in a regulated industry where tone matters. If you're sending 500+ emails daily, the per-call latency (600-900ms combined for both tools) will bottleneck your pipeline. Use this MCP when you want generation and moderation in one vendor relationship, not when you need sub-200ms response times.
Frequently asked
What does the AI/ML API MCP do in Switchy?
It routes text moderation and chat completion requests to AI/ML API's models from inside Switchy. Your team can filter user-generated content for safety violations or generate LLM responses without leaving the workspace. The MCP wraps two core tools: moderation checks and text generation.
Do I need special permissions to connect AI/ML API?
You need an API key from AI/ML API with access to moderation and text completion endpoints. No OAuth dance—just paste the key into Switchy's connection form. Whoever connects it should have billing authority on the AI/ML API account, since usage charges flow through their metering.
Can this MCP fine-tune models or manage training data?
No. It only calls inference endpoints for moderation and chat completion. If you need to upload datasets, trigger fine-tuning jobs, or manage model versions, use AI/ML API's dashboard or their native SDK. This MCP is strictly for runtime inference inside Switchy workflows.
Why use this instead of calling AI/ML API directly from code?
Switchy logs every moderation check and completion in the shared workspace, so your team sees which prompts triggered flags or what context produced each response. You skip writing boilerplate retry logic and key rotation. Trade-off: you can't access bleeding-edge beta endpoints until Switchy updates the MCP.
Who on the team should connect the AI/ML API integration?
Whoever owns your AI/ML API subscription and understands your moderation thresholds. They'll paste the API key once; after that, any Switchy user with workspace access can invoke moderation or completion tools. Usage counts against your AI/ML API quota, not Switchy's plan limits.