← Back to Documentation
API Documentation
Authentication
All API requests require authentication using your API key in the Authorization header.
Authorization: Bearer YOUR_API_KEY
Getting Started
Start by generating an image with a simple prompt to test your API key.
curl -X POST https://api.multimind-ai.com/generate
-H "Authorization: Bearer YOUR_API_KEY"
-H "Content-Type: application/json"
-d ' {"prompt": "A beautiful sunset over mountains"}'
Generate Image
Generate a new image from a text prompt:
POST /v1/generate
Content-Type: application/json
{
"prompt": "A serene mountain landscape at sunset",
"model": "photorealistic-v2",
"width": 1024,
"height": 1024,
"num_images": 1
}
Response
{
"id": "gen_abc123",
"status": "processing",
"images": [],
"credits_used": 1
}
Check Generation Status
Check the status of an image generation job:
GET /v1/status/{job_id}
Example: GET /v1/status/gen_abc123
Status Response
{
"id": "gen_abc123",
"status": "completed",
"images": [
{
"url": "https://cdn.multimind-ai.com/images/gen_abc123_1.jpg",
"width": 1024,
"height": 1024
}
],
"credits_used": 1,
"created_at": "2024-01-15T10:30:00Z",
"completed_at": "2024-01-15T10:32:15Z"
}
Upscale Image
Upscale an existing image to 4K resolution:
POST /v1/upscale
Content-Type: application/json
{
"image_url": "https://example.com/image.jpg",
"scale_factor": 2,
"enhancement_level": "high"
}
List Available Models
Get a list of all available AI models and their capabilities:
GET /v1/models
Models Response
[
{
"id": "photorealistic-v2",
"name": "PhotoRealistic v2",
"description": "High-quality photorealistic image generation",
"generation_type": "text-to-image",
"cost_per_image": 1,
"supports_upscale": true,
"max_resolution": "2048x2048"
},
{
"id": "anime-v1",
"name": "Anime Style",
"description": "Anime and manga style image generation",
"generation_type": "text-to-image",
"cost_per_image": 1,
"supports_upscale": true,
"max_resolution": "1536x1536"
}
]