Images
Upload and AI-generate cover images for MisarBlog articles.
Upload an Image
/images/uploadUploads an image to the MisarBlog CDN and returns a permanent URL for use in articles. Send as multipart/form-data.
Request body
filebinarybodyrequiredImage file (JPEG, PNG, WebP — max 10 MB).
typestringbodycover | inline (default: inline).
Response fields
urlstringPermanent CDN URL of the uploaded image.
widthintegerImage width in pixels.
heightintegerImage height in pixels.
size_bytesintegerFile size in bytes.
curl -X POST https://api.misar.io/blog/v1/images/upload \
-H "Authorization: Bearer mbk_YOUR_KEY" \
-F "[email protected]" \
-F "type=cover"{
"url": "https://supabase-blog.misar.io/storage/v1/object/public/covers/abc123.jpg",
"width": 1280,
"height": 720,
"size_bytes": 204800
}Generate a Cover Image (AI)
/images/generateGenerates an AI cover image using a text prompt and returns a CDN URL. Generation typically takes 3–8 seconds. The URL is permanent and CDN-cached.
Request body
promptstringbodyrequiredImage description (max 500 chars).
stylestringbodyphotorealistic | illustration | minimal (default: photorealistic).
aspect_ratiostringbody16:9 | 1:1 | 4:3 (default: 16:9).
Response fields
urlstringPermanent CDN URL of the generated image.
promptstringThe prompt used for generation.
widthintegerImage width in pixels.
heightintegerImage height in pixels.
{
"prompt": "A futuristic city skyline with glowing neon signs and flying cars at dusk",
"style": "photorealistic",
"aspect_ratio": "16:9"
}{
"url": "https://supabase-blog.misar.io/storage/v1/object/public/ai-covers/gen_abc123.jpg",
"prompt": "A futuristic city skyline...",
"width": 1280,
"height": 720
}Plan Limits
| Plan | AI Generations/month |
|---|---|
| Free | 5 |
| Pro | 50 |
| Business | 500 |
Errors
| Status | Description |
|---|---|
400 | Invalid aspect ratio or style |
401 | Invalid or missing API key |
413 | File too large (upload only) |
429 | Rate limit or generation quota exceeded |