# ImagineAPI.dev

> Unified AI Image Generation API - Midjourney, DALL-E, Ideogram via REST API

## Overview
- [Homepage](https://www.imagineapi.dev/): One API for multiple AI image models
- [Pricing](https://www.imagineapi.dev/pricing): Simple transparent pricing ($30/month per integration)
- [Changelog](https://www.imagineapi.dev/changelog): Product updates and new features

## Introduction
- [Introduction](https://docs.imagineapi.dev/): Overview of ImagineAPI.dev, the unofficial REST API for Midjourney

## Quick Start
- [Quick Start](https://docs.imagineapi.dev/quick-start): Choose your programming language to get started
- [Node.js](https://docs.imagineapi.dev/quick-start/nodejs): Generate Midjourney images with JavaScript/Node.js
- [PHP](https://docs.imagineapi.dev/quick-start/php): Generate Midjourney images with PHP
- [Python](https://docs.imagineapi.dev/quick-start/python): Generate Midjourney images with Python

## Guides
- [Image to Image - /blend](https://docs.imagineapi.dev/guides/image-to-image): Blend multiple images using Midjourney's /blend command
- [Upscaling 1x](https://docs.imagineapi.dev/guides/upscaling-1x): Default 1024x1024 upscaling (U1/U2/U3/U4)
- [Upscaling 2x](https://docs.imagineapi.dev/guides/upscaling-2x): 2048x2048 upscaling (coming soon)
- [Upscaling 4x](https://docs.imagineapi.dev/guides/upscaling-4x): 4096x4096 upscaling (coming soon)
- [Variations](https://docs.imagineapi.dev/guides/variations): V1/V2/V3/V4 variations (coming soon)

## API Reference
- [Authentication](https://docs.imagineapi.dev/aypeeeye/authentication): How to get and use API authentication tokens
- [Image](https://docs.imagineapi.dev/aypeeeye/image): POST /items/images (create), GET /items/images/:id (retrieve)
- [Webhooks](https://docs.imagineapi.dev/aypeeeye/webhooks): Setup webhooks for image completion notifications
- [Status](https://docs.imagineapi.dev/aypeeeye/status): GET /items/status - Check bot health status

## Midjourney Help
- [Accepting TOS](https://docs.imagineapi.dev/midjourney-help/accepting-midjourney-tos): How to accept Midjourney Terms of Service via Discord

## Self-host Install
- [Requirements](https://docs.imagineapi.dev/self-host-install/requirements): 2GB RAM, Docker 23+, 2captcha account
- [Discord Bot](https://docs.imagineapi.dev/self-host-install/discord-bot): Create Discord server and bot for self-hosting
- [ImagineAPI Components](https://docs.imagineapi.dev/self-host-install/ImagineAPI): Docker compose installation and configuration
- [Upgrade](https://docs.imagineapi.dev/self-host-install/upgrade): How to upgrade self-hosted installation
- [Troubleshooting](https://docs.imagineapi.dev/self-host-install/troubleshooting): Issue resolution and support contacts

---

## API Endpoints Summary

Base URL: `https://cl.imagineapi.dev`

### POST /items/images/
Create a new image generation request.

Request:
```json
{
  "prompt": "your prompt here --ar 16:9",
  "ref": "optional-reference-id"
}
```

Response:
```json
{
  "data": {
    "id": "uuid",
    "prompt": "string",
    "status": "pending|in-progress|completed|failed",
    "url": "string|null",
    "upscaled_urls": ["string"]|null,
    "error": "string|null"
  }
}
```

### GET /items/images/:id
Retrieve image generation status and results.

### GET /items/status
Check API bot health status.

## Authentication
All requests require Bearer token in header:
```
Authorization: Bearer <your-token>
```

## Image Status Flow
1. `pending` - Request received, queued
2. `in-progress` - Midjourney is generating (progress % available)
3. `completed` - Done, `upscaled_urls` contains 4 upscaled images
4. `failed` - Error occurred, check `error` field

---

## Supported Models
ImagineAPI supports multiple AI image generation models with a unified API interface:

| Model | Parameter | Features |
|-------|-----------|----------|
| Midjourney | `model: "MJ"` | Photorealistic, artistic compositions, superior lighting |
| DALL-E 3 | `model: "DALLE"` | Excellent prompt adherence, clean professional style |
| Ideogram | `model: "Ideogram"` | Excellent text rendering, logo & brand design |
| GPT-Image-1 | `model: "GPT-Image-1"` | OpenAI's new image model (added May 2025) |

## Pricing
- [Pricing Page](https://www.imagineapi.dev/pricing)

### Monthly Subscription
- First integration: $30/month (any provider)
- Additional Midjourney: +$30/month
- Additional DALL-E/Ideogram: +$10/month

### What's Included
- Built-in CDN with image transformations
- Full API access with documentation
- Admin dashboard
- Email and phone support
- 7-day money-back guarantee

### Integration Limits
| Provider | Limit |
|----------|-------|
| Midjourney | Up to 12 parallel jobs (4 images/prompt) |
| DALL-E | 1-10,000 images/minute |
| Ideogram | 10 images/minute |

---

## CDN Features
Built-in CDN for all generated images:

### Dynamic Resizing
```
/image.png?w=800&h=600  # Custom size
/image.png?w=200&h=200  # Thumbnail
/image.png?w=64&h=64    # Avatar
```

### Format Conversion
```
/image.png?format=webp  # Convert to WebP (~70% smaller)
```

---

## Upscaling API (ImagineAPI Enhance)
- [Changelog: Upscale up to 12x](https://www.imagineapi.dev/changelog/new-upscaler-up-to-12x)

### POST /items/images/{IMAGE_ID}/{IMAGE_INDEX}/upscale/{SCALE}
Upscale generated images up to 12x resolution.

**Scale Factors & Credits:**
| Scale | Credits | Cost |
|-------|---------|------|
| 2x | 3 | $0.03 |
| 4x | 10 | $0.10 |
| 6x | 35 | $0.35 |
| 8x | 45 | $0.45 |
| 10x | 80 | $0.80 |
| 12x | 100 | $1.00 |

Response includes `model_type: "Enhance"`, `upscale_factor`, and `parent_id`.

---

## No-Code Integrations
- [Make.com Integration](https://www.make.com/en/hq/app-invitation/c8101d276928e6140d9fd0d8816d957d): Visual workflow builder
- [Zapier Integration](https://zapier.com/developer/public-invite/187913/0ba98a36133379c16192eb436858cd97/): Connect with 5000+ apps

---

## Changelog Highlights
- [RSS Feed](https://www.imagineapi.dev/changelog/feed.xml)

### 2025
- [2025-07: ImagineAPI Enhance](https://www.imagineapi.dev/changelog/new-upscaler-up-to-12x): Image upscaling up to 12x
- [2025-05: GPT-Image-1 Support](https://www.imagineapi.dev/changelog/support-for-gpt-imagine-1-api): OpenAI's new image model
- [2025-03: /status Endpoint](https://www.imagineapi.dev/changelog/status-endpoint): Real-time system health monitoring
- [2025-02: Improved Image Grid](https://www.imagineapi.dev/changelog/improved-image-grid-experience): Better UI experience
- [2025-01: DALL-E Support](https://www.imagineapi.dev/changelog/introducing-dall-e-support): Multi-model support added
- [2025-01: Better Error Handling](https://www.imagineapi.dev/changelog/better-error-handling-for-reference-values): Improved reference validation

### 2024
- [2024-06: AWS Optimization](https://www.imagineapi.dev/changelog/performance-boost-aws-secrets-management-optimization): Performance improvements
- [2024-05: Smarter Upscaling](https://www.imagineapi.dev/changelog/smarter-upscaling-and-improved-timeout-handling): Improved timeout handling

### 2023
- [2023-12: Architecture Improvements](https://www.imagineapi.dev/changelog/better-architecture-for-api-reliability): API reliability enhancements
- [2023-11: Discord Integration](https://www.imagineapi.dev/changelog/enhanced-mj-discord-integration-and-prompt-validation): Enhanced prompt validation
- [2023-06: Concurrent Generation](https://www.imagineapi.dev/changelog/midjourney-concurrent-image-generations): Parallel image generation
