Skip to main content

The All‑in‑One Platform
for AI Generation

Create videos, images, music and 3D with 50+ AI models. Use our playground or integrate via API.

New accounts start with $0.50 in free credits.

Midjourney API Service Notice — we do not provide Midjourney API service. For AI image generation via API, we recommend legnext.ai.

Suno API Service Notice — we do not provide Suno API service. For AI music generation via API, we recommend sunor.cc.

PiAPI CLI

94 Multimodal AI Models from Your Terminal

Generate AI images, videos, audio, 3D assets, and chat with LLMs from one command line interface. PiAPI CLI is built for developers, AI agents, and automation workflows.

$ npm install -g piapi-cli
Learn More
terminal
$ piapi run flux-dev prompt="a corgi astronaut"
✓ Image generated! https://storage.piapi.ai/models/flux/...
$ piapi run sora2-pro prompt="waves" --async
✓ Task created: task_abc123
$ piapi model list --type video
sora2-pro, kling-3, veo3-fast... (40 models)

Designed for developers & AI

Our API is compatible with all technology stacks — and with the agents and automation tools built on top of them. Integrate in a few lines of code, let AI agents plug in via CLI & MCP, or drop PiAPI into Make and n8n with no code at all.

Python
import requests

endpoint = 'YOUR_ENDPOINT_URL'
headers = {
    'X-API-Key': 'YOUR_API_KEY',
}

data = {
    "prompt": "a cute cat",
    "aspect_ratio": "4:3",
    "process_mode": "fast",
    "webhook_endpoint": "",
    "webhook_secret": ""
}

response = requests.post(endpoint, headers=headers, json=data)

print(response.status_code)
print(response.json())

Easy Integration

Built for smooth and fast integration. Get started on your journey to easy-free integration in just a few clicks / lines of code.

Built for AI Agents

piapi-cli and the MCP server expose every model to coding agents and MCP-compatible assistants — structured JSON in, results out.

No-code Automation

Connect PiAPI to Make, n8n or Zapier workflows with ready-made HTTP modules and webhooks — automation without a single line of code.

Rapid Scalability

With our cost-effective price offering, you can improve your load-response at your own pace with flexible payment options.

Our Team

Who are we?

At the intersection of tech and creativity, we are a group of dedicated tech aficionados who believe in the transformative power of AI.

Why us?

We are driven by our passion for simplifying AI and making it accessible to developers around the globe!

What do we do?

We provide developers with API access to generative AI models including Flux API, Ace-step API and FaceSwap API, helping to develop scalable and innovative applications!

Let's talk

Have a question or require support? Feel free to contact us!

Official Support Channel

Contact us via Discord and join our channel for fast support and assistance!

Join our Discord →

Try Telegram

Reach out to us on Telegram, we'd love to hear from you. It's easier and faster!

Telegram (coming soon)

Want to collaborate?

Looking for collaborative opportunities? We are too! Email us at support@piapi.ai! (Note: all support emails will not be answered!)

Email us →