Media library

Generate images for a post

Makes up to 4 AI images from a description or a caption. Each image is stored and added to your media library. Counts against your plan's monthly AI images (429 allowance_exhausted with resetAt when none are left). Behind the SCHEDULER_COMPOSER_IMAGE_GEN feature flag (403 feature_disabled while off).

post/media/generate-image

Request

  • Base URL: https://www.sociahive.com/api/v1
  • URL: https://www.sociahive.com/api/v1/media/generate-image
  • Auth: one of:
    • API key in header X-API-Key
    • OAuth 2 (authorization code, authorization URL /api/oauth/authorize, token URL /api/oauth/token, scopes: uploads:write)

Request body

promptstring

What the image shows. Required unless fromCaption is set.

captionstring

The post caption, used with fromCaption.

fromCaptionboolean

Draw an image for the caption (no text in the image).

aspect'square' | 'portrait' | 'landscape' required

square 1024×1024, portrait 1024×1536, landscape 1536×1024.

countinteger

Options to make (default 1). Each uses one image of the allowance.

requestIdstring

Retry with the same id to get the first result instead of new images.

Response

The generated images

failedinteger required

Images that could not be made; they were not counted.

Changes

No recorded changes to this operation across all 1 revision of this API.