Skip to content

feat: add MuAPI image generation service#4792

Open
Anil-matcha wants to merge 2 commits into
pipecat-ai:mainfrom
Anil-matcha:feat/muapi-image-service
Open

feat: add MuAPI image generation service#4792
Anil-matcha wants to merge 2 commits into
pipecat-ai:mainfrom
Anil-matcha:feat/muapi-image-service

Conversation

@Anil-matcha

Copy link
Copy Markdown

Summary

Adds `src/pipecat/services/muapi/` — an image generation service backed by muapi.ai, a unified API aggregator for 400+ generative media models including Flux, Midjourney, GPT-4o Image, Google Imagen, Seedream, HiDream, Reve, and more.

What this adds

  • `src/pipecat/services/muapi/init.py`
  • `src/pipecat/services/muapi/image.py` — `MuApiImageGenService` implementing `ImageGenService`

The service follows the same architecture as `FalImageGenService`:

  • Accepts `aiohttp_session` + `api_key` + `model` + `settings`
  • Implements `run_image_gen(prompt)` → `AsyncGenerator[Frame, None]`
  • Handles muapi's async submit → poll pattern internally

Usage

```python
import aiohttp
from pipecat.services.muapi.image import MuApiImageGenService

async with aiohttp.ClientSession() as session:
image_service = MuApiImageGenService(
aiohttp_session=session,
api_key="your-muapi-key",
model="flux-schnell", # or midjourney, gpt4o, imagen4, seedream, etc.
)
```

Supported models

`flux-schnell`, `flux-dev`, `flux-kontext-dev/pro/max`, `hidream-fast/dev/full`, `midjourney`, `gpt4o`, `gpt-image-2`, `imagen4`, `imagen4-fast`, `seedream`, `reve`, `ideogram`, `hunyuan`, `wan2.1`, `qwen`

Get an API key at muapi.ai/dashboard/api-keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant