Images

Generate a social caption from images you own

Produces a platform-shaped caption - and on headline platforms a headline and a description - from 1 to 10 images.

SCOPES: this route needs images:write to CALL, but its OUTPUT reads as text (D-15-23). The result is stored as a caption_generation, which classifies into the text container, so finding it later through /v1/gallery, /v1/library or /v1/jobs/{id} needs text:read. A token holding only images:write can run this and be charged for it, and then not be able to read the result back. The response body returns the caption directly, so a single call still works.

Give the images as library file_uuids (upload with POST /v1/files/upload) or inline as base64 in images; exactly one of the two. Limits: 10485760 bytes per image, 26214400 bytes across the call, context at most 2000 characters.

The prompt is built SERVER-SIDE. There is deliberately no raw prompt field: it would turn the caption credit path into a general-purpose vision prompt. context and the blueprint fields are untrusted text spliced into a model instruction and the builder emits a guard sentence about them - a mitigation, not a guarantee.

post/v1/images/instagram-enhance

Request

  • Base URL: https://contentmaschine.ai/api
  • URL: https://contentmaschine.ai/api/v1/images/instagram-enhance
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://contentmaschine.ai/api/oauth/authorize, token URL https://contentmaschine.ai/api/oauth/token)

Request body

file_uuidsstring[]

Uuids of images you own. Must be a real JSON array. Use this or images.

imagesstring[]

The images inline, each base64 or a data URL (PNG, JPEG, WebP or GIF). Must be a real JSON array. Use this or file_uuids.

platformstring required

Target platform, e.g. "Instagram" or "TikTok".

length'Short' | 'Medium' | 'Long' | 'Very Long' required

Caption length.

tonestring required

Tone, e.g. "Friendly".

languagestring required

Output language, e.g. "English".

contextstring

Extra brief for the model. At most 2000 characters.

blueprintobject

Optional StoryBrand fields: title, businessName, hero, problem, guide, plan, callToAction, avoidFailure, success.

Response

The generated caption.

successboolean
timestampstring date-time

Example response

{
  "success": true
}

Changes

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