1. ✨ Andie
swonkie.dev
  • Introduction
  • 🆕 MCP Server
  • Changelog
  • Quick Start
  • Social Networks
    • Instagram v2
    • Google My Business
    • YouTube
    • X (Twitter)
    • Threads
    • Instagram
    • LinkedIn
    • TikTok
    • Facebook
  • ✨ Andie
    • Generate an Image
      POST
  • Search
    • Search Profiles
      GET
  • Profiles
    • My Profiles
      GET
    • Competitors
      GET
  • Competitors
    • Add Competitor
      POST
    • Delete Competitor
      DELETE
  • Insights
    • Getting Started
    • My Profile Insights Metrics
      GET
    • My Profile Insights
      GET
    • My Profile Insights Posts
      GET
    • Competitor Insights Metrics
      GET
    • Competitor Insights
      GET
    • Competitor Insights Posts
      GET
  • Posts
    • Getting Started
    • Limits by Social Network
    • List Posts
    • Get a Post
    • Create a Post
    • Update a Post
    • Validate a Post
    • Delete a Post
    • Change Post Stage
  • Labels
    • Getting Started
    • List Labels
    • Create a Label
  • Media
    • Get a Media
    • Create a Media
    • Upload File to Media
    • Confirm Uploaded Media
    • Delete a Media
    • Create a Media from URL
  • Examples
    • Publish
Back to Home
Back to Home
Login
  1. ✨ Andie

Generate an Image

POST
/andie/generate-image
Generates a production-ready social media image from a text prompt using Andie, Swonkie's AI assistant. The image is automatically uploaded to your workspace's media library and returned as a complete media object, ready to reference in posts.
Generation uses an image model. Typical generation time is 15–45 seconds.

Using the returned image in a post#

Use the returned id as mediaLibId when creating or updating a post:

Notes#

prompt and aspectRatio are required. All other fields are optional.
If both targetWidth and targetHeight are provided, they override the default resolution for the selected aspectRatio. The values are snapped to the nearest valid AI grid size (multiples of 16) within provider limits.
The returned status may be PROCESSING immediately after generation. If you need to verify the file is fully processed before embedding it in a post, poll GET /media/{id} until status is SUCCESS.
Generated images are stored as JPEG at 100% quality with an sRGB colour profile.
The path and preview URLs are temporary signed URLs that expire after a period of time.

Request

Header Params

Body Params application/jsonRequired

Examples

Responses

🟢201
application/json
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://api.swonkie.dev/v2/andie/generate-image' \
--header 'X-API-ID: ' \
--header 'X-API-KEY: ' \
--header 'Content-Type: application/json' \
--data '{
    "prompt": "A warm, minimalist coffee shop interior at golden hour, wooden tables, soft bokeh background, editorial style",
    "aspectRatio": "4:5",
    "quality": "high"
}'
Response Response Example
{
    "id": "QW5kaWVJbWFnZTEyMzQ1Njc",
    "name": "image",
    "path": "https://storage.example.com/temp/ai_uuid.jpg",
    "preview": "https://storage.example.com/temp/ai_uuid_preview.jpg",
    "type": "IMAGE",
    "status": "SUCCESS",
    "specs": {
        "width": 1080,
        "height": 1350,
        "duration": null,
        "fileSizeBytes": 312450,
        "fps": null
    }
}
Modified at 2026-06-22 18:01:47
Previous
Facebook
Next
Search Profiles
Built with