---
title: "Generate posts"
method: POST
path: "/api/businesses/{business_id}/posts/generate"
tags: ["posts"]
deprecated: true
---

# Generate posts

`POST /api/businesses/{business_id}/posts/generate`

## Request

- Base URL: `https://api.mymarky.ai`
- URL: `https://api.mymarky.ai/api/businesses/{business_id}/posts/generate`
- Auth: HTTP bearer

> **Deprecated.**

Generate social media posts from your content. DEPRECATED — prefer `create_post`.

Prefer `create_post`: author the caption (and pick media) yourself and push
the post in directly — you get full control and it's free. Use THIS
server-side generation pipeline only when the user explicitly asks Marky to
write/design the content for them. It spends credits and counts against the
org's monthly post quota.

Provide text content, a website URL, or a custom idea and we'll create
visual social posts as drafts in your queue. Returns a job ID — poll
`GET /api/businesses/{business_id}/jobs/{job_id}` until status is `completed`
or `failed`.

**Rate limits:** 100 requests/minute, 2,000/day, 10,000/week; 200 posts/month per org.

Errors:
    400 missing_field: None of content, website_url, or custom_idea was given.
    400 invalid_value: The business_id is not a valid UUID.
    401 authentication_required: API key or token is missing, invalid, or revoked.
    403 permission_denied: Your plan does not include API access, or this business is not in your org.
    404 resource_not_found: No business with that ID exists.
    429 rate_limit_exceeded: You hit the per-minute rate limit or the monthly post quota.

## Path parameters

- `business_id` string, required: A UUID identifier.

## Headers

- `Marky-Version` '2026-04-08' | '2026-07-17' | '2026-08-02' | '2026-08-04' | '2026-08-06'

## Request body

- GenerateRequest
  - `content` string, nullable: Plain text content to generate posts from (used as the post topic).
  - `website_url` string, nullable: URL to scrape for content context. The page text is used as input for generation.
  - `custom_idea` string, nullable: Skip ideation and use this text directly as the post idea for all generated posts.
  - `count` integer: Number of posts to generate (1-10).
  - `creative_formats` string[], nullable: Which post formats to generate (round-robins across the list). One or more of: design, carousel, meme, image, gif, video, ai-image, ai-video. Omit to use the business's default mix.
  - `ai_image_type` 'design' | 'photo' | 'infographic' | 'meme', nullable: Sub-type for AI-image generation (only used when a creative_format is 'ai-image'): design, photo, infographic, or meme.
  - `ai_image_style` string, nullable: Visual style modifier for AI images (e.g. 'corporate-flat', 'isometric', 'comic'). Only used for 'ai-image'.
  - `template_ids` string[], nullable: Restrict design generation to these specific template IDs instead of auto-selecting.
  - `voice` string, nullable: Override the brand voice/tone for this generation only (the business's saved Profile is used when omitted).
  - `include_stock` boolean, nullable: Whether stock photos (Unsplash/Pexels) may be used. Omit to use the business's saved preference.
  - `aspect_ratio` string, nullable: Aspect ratio for generated media, e.g. '1:1' (square), '9:16' (story/reel), '4:5' (portrait). Omit for the business default.

## Response `202`

Generation job created

- JobStatusResponse
  - `job_id` string, required: ID to poll for status
  - `status` string, required: Current job status
  - `data` PostResult[], nullable: Generated posts (when status=completed)
    - `post_id` string, required: ID of the created post
    - `title` string: Short post title (max 7 words) for platforms that use titles
    - `caption` string, required
    - `idea` string, required: The generated post idea
    - `creative_format` string: The creative format used for this post
    - `text_content` object, required: component_id → text for all filled slots
    - `slides` SlideResult[], required: Images used in the design (one per page with fillers)
      - `image_url` string, required: URL of the selected image
      - `image_keyword` string, required: Search keyword used to find this image
      - `media_id` string, nullable: Library media id of this image, if it came from the library
    - `topic_title` string, required: Topic used for this post
    - `category_name` string, nullable, required: Category of the topic
    - `template_id` string, required: Design template used
    - `theme_name` string, required: Theme of the template
    - `rendered_urls` string[]: CloudFront URLs of rendered slide images
    - `score` object, nullable: Quality scores: hook_caption, hook_visual, depth, design_text, design_photos, overall
  - `error` string, nullable: Error message (when status=failed)

## Other responses

- `400`: Bad request — the input was malformed or otherwise invalid.
- `401`: Authentication failed — the API key is missing or invalid.
- `403`: Forbidden — the key is valid but may not access this resource.
- `404`: Not found — no resource matches the id in the path.
- `422`: Validation error — one or more fields failed validation.
- `429`: Rate limited — retry after the window resets (see Retry-After).
- `500`: Server error — something failed on our side; retry or quote X-Request-Id.

---

[API](https://skmtc.dev/mymarky/apis/marky-public-api.md) · [All operations](https://skmtc.dev/mymarky/apis/marky-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mymarky/apis/marky-public-api/revisions/25aeacae455c?raw)
