Skip to main content
POST
Create an AI-generated draft post

Authorizations

X-API-Key
string
header
required

Query Parameters

workspaceId
string
required

Ocoya workspace ID. Get one from GET /workspaces.

Example:

"cmayvq3hk00017apshay5qezu"

Body

application/json
prompt
string
required

Prompt describing the post Ocoya should generate. Minimum 10 characters.

Minimum string length: 10
Example:

"Write a launch post for our new analytics dashboard."

tone
enum<string>

Caption tone for the AI draft.

Available options:
professional,
friendly,
educational,
bold,
founder_led
Example:

"professional"

postLength
enum<string>

Target caption length for the AI draft.

Available options:
short,
medium,
long,
extra_long
Example:

"medium"

socialProfileIds
string[]

Connected social profile IDs that should receive the post. Get IDs from GET /social-profiles.

Example:
brandId
string

Brand kit ID used for brand context. Get IDs from GET /brand-kits.

Example:

"cmayw38dz00047apsue9nw4tf"

hashtagLibraryId
string

Hashtag library ID used for hashtag context. Get IDs from GET /hashtag-libraries.

Example:

"cmayw7l5200067apsmz2tv7e8"

generateImage
boolean

Whether to generate square image media for the AI draft.

Example:

true

imageCount
integer

Number of generated images when generateImage is true. Use 1 for a single image or 2-5 for a carousel.

Required range: 1 <= x <= 5
Example:

3

referenceUrls
string[]

Optional image URLs to use as visual references when generateImage is true. Ocoya uses these images for style, composition, layout, and subject guidance; they are not attached directly to the post.

Example:
referenceDesignIds
string[]

Optional Studio design IDs to use as visual references when generateImage is true. Get IDs from GET /studio-templates.

Example:

Response

Queued. Returns immediately with status GENERATING; fetch the post later to see the completed draft.