curl --request POST \
--url https://api.mymarky.ai/api/businesses/{business_id}/posts/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"website_url": "<string>",
"custom_idea": "<string>",
"count": 1,
"creative_formats": [
"<string>"
],
"ai_image_style": "<string>",
"template_ids": [
"<string>"
],
"voice": "<string>",
"include_stock": true,
"aspect_ratio": "<string>"
}
'import requests
url = "https://api.mymarky.ai/api/businesses/{business_id}/posts/generate"
payload = {
"content": "<string>",
"website_url": "<string>",
"custom_idea": "<string>",
"count": 1,
"creative_formats": ["<string>"],
"ai_image_style": "<string>",
"template_ids": ["<string>"],
"voice": "<string>",
"include_stock": True,
"aspect_ratio": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: '<string>',
website_url: '<string>',
custom_idea: '<string>',
count: 1,
creative_formats: ['<string>'],
ai_image_style: '<string>',
template_ids: ['<string>'],
voice: '<string>',
include_stock: true,
aspect_ratio: '<string>'
})
};
fetch('https://api.mymarky.ai/api/businesses/{business_id}/posts/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mymarky.ai/api/businesses/{business_id}/posts/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'website_url' => '<string>',
'custom_idea' => '<string>',
'count' => 1,
'creative_formats' => [
'<string>'
],
'ai_image_style' => '<string>',
'template_ids' => [
'<string>'
],
'voice' => '<string>',
'include_stock' => true,
'aspect_ratio' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mymarky.ai/api/businesses/{business_id}/posts/generate"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"website_url\": \"<string>\",\n \"custom_idea\": \"<string>\",\n \"count\": 1,\n \"creative_formats\": [\n \"<string>\"\n ],\n \"ai_image_style\": \"<string>\",\n \"template_ids\": [\n \"<string>\"\n ],\n \"voice\": \"<string>\",\n \"include_stock\": true,\n \"aspect_ratio\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mymarky.ai/api/businesses/{business_id}/posts/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"website_url\": \"<string>\",\n \"custom_idea\": \"<string>\",\n \"count\": 1,\n \"creative_formats\": [\n \"<string>\"\n ],\n \"ai_image_style\": \"<string>\",\n \"template_ids\": [\n \"<string>\"\n ],\n \"voice\": \"<string>\",\n \"include_stock\": true,\n \"aspect_ratio\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mymarky.ai/api/businesses/{business_id}/posts/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"website_url\": \"<string>\",\n \"custom_idea\": \"<string>\",\n \"count\": 1,\n \"creative_formats\": [\n \"<string>\"\n ],\n \"ai_image_style\": \"<string>\",\n \"template_ids\": [\n \"<string>\"\n ],\n \"voice\": \"<string>\",\n \"include_stock\": true,\n \"aspect_ratio\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"status": "<string>",
"data": [
{
"post_id": "<string>",
"caption": "<string>",
"idea": "<string>",
"text_content": {},
"slides": [
{
"image_url": "<string>",
"image_keyword": "<string>"
}
],
"topic_title": "<string>",
"category_name": "<string>",
"template_id": "<string>",
"theme_name": "<string>",
"title": "",
"creative_format": "design",
"rendered_urls": [
"<string>"
],
"score": {}
}
],
"error": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"instance": "<string>",
"request_id": "<string>",
"param": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"instance": "<string>",
"request_id": "<string>",
"param": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"instance": "<string>",
"request_id": "<string>",
"param": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"instance": "<string>",
"request_id": "<string>",
"param": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"instance": "<string>",
"request_id": "<string>",
"param": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"instance": "<string>",
"request_id": "<string>",
"param": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"instance": "<string>",
"request_id": "<string>",
"param": "<string>"
}Generate posts
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.
curl --request POST \
--url https://api.mymarky.ai/api/businesses/{business_id}/posts/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"website_url": "<string>",
"custom_idea": "<string>",
"count": 1,
"creative_formats": [
"<string>"
],
"ai_image_style": "<string>",
"template_ids": [
"<string>"
],
"voice": "<string>",
"include_stock": true,
"aspect_ratio": "<string>"
}
'import requests
url = "https://api.mymarky.ai/api/businesses/{business_id}/posts/generate"
payload = {
"content": "<string>",
"website_url": "<string>",
"custom_idea": "<string>",
"count": 1,
"creative_formats": ["<string>"],
"ai_image_style": "<string>",
"template_ids": ["<string>"],
"voice": "<string>",
"include_stock": True,
"aspect_ratio": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: '<string>',
website_url: '<string>',
custom_idea: '<string>',
count: 1,
creative_formats: ['<string>'],
ai_image_style: '<string>',
template_ids: ['<string>'],
voice: '<string>',
include_stock: true,
aspect_ratio: '<string>'
})
};
fetch('https://api.mymarky.ai/api/businesses/{business_id}/posts/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mymarky.ai/api/businesses/{business_id}/posts/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'website_url' => '<string>',
'custom_idea' => '<string>',
'count' => 1,
'creative_formats' => [
'<string>'
],
'ai_image_style' => '<string>',
'template_ids' => [
'<string>'
],
'voice' => '<string>',
'include_stock' => true,
'aspect_ratio' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mymarky.ai/api/businesses/{business_id}/posts/generate"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"website_url\": \"<string>\",\n \"custom_idea\": \"<string>\",\n \"count\": 1,\n \"creative_formats\": [\n \"<string>\"\n ],\n \"ai_image_style\": \"<string>\",\n \"template_ids\": [\n \"<string>\"\n ],\n \"voice\": \"<string>\",\n \"include_stock\": true,\n \"aspect_ratio\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mymarky.ai/api/businesses/{business_id}/posts/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"website_url\": \"<string>\",\n \"custom_idea\": \"<string>\",\n \"count\": 1,\n \"creative_formats\": [\n \"<string>\"\n ],\n \"ai_image_style\": \"<string>\",\n \"template_ids\": [\n \"<string>\"\n ],\n \"voice\": \"<string>\",\n \"include_stock\": true,\n \"aspect_ratio\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mymarky.ai/api/businesses/{business_id}/posts/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"website_url\": \"<string>\",\n \"custom_idea\": \"<string>\",\n \"count\": 1,\n \"creative_formats\": [\n \"<string>\"\n ],\n \"ai_image_style\": \"<string>\",\n \"template_ids\": [\n \"<string>\"\n ],\n \"voice\": \"<string>\",\n \"include_stock\": true,\n \"aspect_ratio\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"status": "<string>",
"data": [
{
"post_id": "<string>",
"caption": "<string>",
"idea": "<string>",
"text_content": {},
"slides": [
{
"image_url": "<string>",
"image_keyword": "<string>"
}
],
"topic_title": "<string>",
"category_name": "<string>",
"template_id": "<string>",
"theme_name": "<string>",
"title": "",
"creative_format": "design",
"rendered_urls": [
"<string>"
],
"score": {}
}
],
"error": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"instance": "<string>",
"request_id": "<string>",
"param": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"instance": "<string>",
"request_id": "<string>",
"param": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"instance": "<string>",
"request_id": "<string>",
"param": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"instance": "<string>",
"request_id": "<string>",
"param": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"instance": "<string>",
"request_id": "<string>",
"param": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"instance": "<string>",
"request_id": "<string>",
"param": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"instance": "<string>",
"request_id": "<string>",
"param": "<string>"
}Authorizations
Bearer an mk_live_ API key. A key is ORG-SCOPED: it grants full access to every resource in that organization, with no per-endpoint scoping (see the uid pseudo-permission on each operation). Manage keys at https://app.mymarky.ai.
Headers
Opt into a dated API version. Omit to stay on the floor (2026-04-08) forever — unpinned clients never break. Pin to a newer date (e.g. 2026-08-06) to receive the newest response shapes. Unknown values fall back to the floor. See https://docs.mymarky.ai for the versioning model.
2026-04-08, 2026-07-17, 2026-08-02, 2026-08-04, 2026-08-06 "2026-08-06"
Path Parameters
A UUID identifier.
Body
Plain text content to generate posts from (used as the post topic).
URL to scrape for content context. The page text is used as input for generation.
Skip ideation and use this text directly as the post idea for all generated posts.
Number of posts to generate (1-10).
1 <= x <= 10Which 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.
Sub-type for AI-image generation (only used when a creative_format is 'ai-image'): design, photo, infographic, or meme.
design, photo, infographic, meme Visual style modifier for AI images (e.g. 'corporate-flat', 'isometric', 'comic'). Only used for 'ai-image'.
Restrict design generation to these specific template IDs instead of auto-selecting.
Override the brand voice/tone for this generation only (the business's saved Profile is used when omitted).
Whether stock photos (Unsplash/Pexels) may be used. Omit to use the business's saved preference.
Aspect ratio for generated media, e.g. '1:1' (square), '9:16' (story/reel), '4:5' (portrait). Omit for the business default.
