MuAPI MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with MuAPI MCP or direct API to generate images, discover supported models, choose image models, and automate creative asset workflows through natural language.

MuAPI logoMuAPI
Api Key

MuAPI is an OpenAI-compatible API for generating images and discovering supported models. Use it to build image workflows with a familiar API shape and flexible model access.

6 Tools

Try MuAPI now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
MuAPI
Try asking
TOOLS

Supported Tools

Every MuAPI action and event your agent gets out of the box.

Estimate Model Cost

Price a native catalog model run before submitting it.

Generate Image

Generate one or more images from a text prompt through MuAPI's OpenAI-compatible API.

Get Account Balance

Read the connected MuAPI account's current credit balance, currency, wallet breakdowns, and web-safety state.

Get Catalog Model

Get one native catalog model by name, including its pricing and the provider-defined input and output schemas.

List Catalog Models

Browse MuAPI's full native model catalog with per-model pricing, category, family and group.

List Models

List models available through MuAPI's OpenAI-compatible API.

SETUP GUIDE

Connect MuAPI MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["muapi"],
  mcp: true,
});
Create a session scoped to MuAPI and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Generate a square product hero image of a futuristic coffee maker on a white background using MuAPI",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a MuAPI request
SETUP GUIDE

Connect MuAPI API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["muapi"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to MuAPI
3

Run MuAPI tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Generate a square product hero image of a futuristic coffee maker on a white background using MuAPI" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the MuAPI tool calls through the session, and print the final answer

Why Use Composio?

AI Native MuAPI Integration

  • Supports both MuAPI MCP and direct API based integrations, so your agent can work the way you want
  • Structured, LLM-friendly schemas help agents generate images and discover models with fewer bad calls
  • No need to write one-off integration code for MuAPI image generation flows

Managed Auth

  • Use auth_configs.create() to configure MuAPI API key authentication for your project
  • Use connected_accounts.link() to connect user or environment-level MuAPI credentials without hard-coding keys
  • Composio stores credentials securely and handles MuAPI API request authentication for your agents

Agent Optimized Design

  • MuAPI tools are exposed in a clean, agent-friendly format for reliable image generation and model lookup
  • Tool execution logs show what the agent ran, when it ran, and which MuAPI action was used
  • Great for creative agents that need to turn plain prompts into generated images quickly

Enterprise Grade Security

  • Fine-grained access controls help decide which agents and users can call MuAPI tools
  • Scoped, least privilege access keeps MuAPI credentials out of prompts, code, and logs
  • Full audit trails make it easier to review image generation actions and model discovery calls
FAQ

Frequently asked questions

Start with MuAPI.It takes 30 seconds.

Managed auth, hosted MCP servers, and every MuAPI tool your agent needs.Free to start.

Start building