curl --request POST \
--url https://api.athenahq.ai/api/v1/content/generate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"website_id": "<string>",
"title": "<string>",
"url": "<string>",
"prompt_ids": [
"<string>"
],
"custom_instructions": "<string>",
"brand_kit_id": "<string>",
"sheet_id": "<string>",
"use_content_memories": true,
"auto_approve": true,
"content_format_type": "<string>",
"scrape_additional_links": true,
"selected_topic_ids": [
"<string>"
],
"pinned_claim_ids": [
"<string>"
],
"use_kb_internal_links": true,
"rec_id": "<string>",
"pdf_file_name_or_r2_key": "<string>"
}
'import requests
url = "https://api.athenahq.ai/api/v1/content/generate"
payload = {
"website_id": "<string>",
"title": "<string>",
"url": "<string>",
"prompt_ids": ["<string>"],
"custom_instructions": "<string>",
"brand_kit_id": "<string>",
"sheet_id": "<string>",
"use_content_memories": True,
"auto_approve": True,
"content_format_type": "<string>",
"scrape_additional_links": True,
"selected_topic_ids": ["<string>"],
"pinned_claim_ids": ["<string>"],
"use_kb_internal_links": True,
"rec_id": "<string>",
"pdf_file_name_or_r2_key": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
website_id: '<string>',
title: '<string>',
url: '<string>',
prompt_ids: ['<string>'],
custom_instructions: '<string>',
brand_kit_id: '<string>',
sheet_id: '<string>',
use_content_memories: true,
auto_approve: true,
content_format_type: '<string>',
scrape_additional_links: true,
selected_topic_ids: ['<string>'],
pinned_claim_ids: ['<string>'],
use_kb_internal_links: true,
rec_id: '<string>',
pdf_file_name_or_r2_key: '<string>'
})
};
fetch('https://api.athenahq.ai/api/v1/content/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.athenahq.ai/api/v1/content/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([
'website_id' => '<string>',
'title' => '<string>',
'url' => '<string>',
'prompt_ids' => [
'<string>'
],
'custom_instructions' => '<string>',
'brand_kit_id' => '<string>',
'sheet_id' => '<string>',
'use_content_memories' => true,
'auto_approve' => true,
'content_format_type' => '<string>',
'scrape_additional_links' => true,
'selected_topic_ids' => [
'<string>'
],
'pinned_claim_ids' => [
'<string>'
],
'use_kb_internal_links' => true,
'rec_id' => '<string>',
'pdf_file_name_or_r2_key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.athenahq.ai/api/v1/content/generate"
payload := strings.NewReader("{\n \"website_id\": \"<string>\",\n \"title\": \"<string>\",\n \"url\": \"<string>\",\n \"prompt_ids\": [\n \"<string>\"\n ],\n \"custom_instructions\": \"<string>\",\n \"brand_kit_id\": \"<string>\",\n \"sheet_id\": \"<string>\",\n \"use_content_memories\": true,\n \"auto_approve\": true,\n \"content_format_type\": \"<string>\",\n \"scrape_additional_links\": true,\n \"selected_topic_ids\": [\n \"<string>\"\n ],\n \"pinned_claim_ids\": [\n \"<string>\"\n ],\n \"use_kb_internal_links\": true,\n \"rec_id\": \"<string>\",\n \"pdf_file_name_or_r2_key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.athenahq.ai/api/v1/content/generate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"website_id\": \"<string>\",\n \"title\": \"<string>\",\n \"url\": \"<string>\",\n \"prompt_ids\": [\n \"<string>\"\n ],\n \"custom_instructions\": \"<string>\",\n \"brand_kit_id\": \"<string>\",\n \"sheet_id\": \"<string>\",\n \"use_content_memories\": true,\n \"auto_approve\": true,\n \"content_format_type\": \"<string>\",\n \"scrape_additional_links\": true,\n \"selected_topic_ids\": [\n \"<string>\"\n ],\n \"pinned_claim_ids\": [\n \"<string>\"\n ],\n \"use_kb_internal_links\": true,\n \"rec_id\": \"<string>\",\n \"pdf_file_name_or_r2_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.athenahq.ai/api/v1/content/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"website_id\": \"<string>\",\n \"title\": \"<string>\",\n \"url\": \"<string>\",\n \"prompt_ids\": [\n \"<string>\"\n ],\n \"custom_instructions\": \"<string>\",\n \"brand_kit_id\": \"<string>\",\n \"sheet_id\": \"<string>\",\n \"use_content_memories\": true,\n \"auto_approve\": true,\n \"content_format_type\": \"<string>\",\n \"scrape_additional_links\": true,\n \"selected_topic_ids\": [\n \"<string>\"\n ],\n \"pinned_claim_ids\": [\n \"<string>\"\n ],\n \"use_kb_internal_links\": true,\n \"rec_id\": \"<string>\",\n \"pdf_file_name_or_r2_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"content_ids": [
"<string>"
],
"status": "generating",
"slice_titles": [
"<string>"
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Start Content Pipeline
Generate an article or content brief in AthenaHQ. Fetches source URLs, sends source material to external AI providers, and consumes content credits. Obtain user approval before calling. Does not publish to a website or CMS. For draft mode, auto_approve defaults to true; set false to generate only a brief and wait for approve_brief. Poll GET /api/v1/content//status using each returned content_ids value. Slice mode returns slice_titles and an empty content_ids array; generated items can be listed with GET /api/v1/content/items. To save an already-written article without generation or credit use, call the MCP add_content tool.
curl --request POST \
--url https://api.athenahq.ai/api/v1/content/generate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"website_id": "<string>",
"title": "<string>",
"url": "<string>",
"prompt_ids": [
"<string>"
],
"custom_instructions": "<string>",
"brand_kit_id": "<string>",
"sheet_id": "<string>",
"use_content_memories": true,
"auto_approve": true,
"content_format_type": "<string>",
"scrape_additional_links": true,
"selected_topic_ids": [
"<string>"
],
"pinned_claim_ids": [
"<string>"
],
"use_kb_internal_links": true,
"rec_id": "<string>",
"pdf_file_name_or_r2_key": "<string>"
}
'import requests
url = "https://api.athenahq.ai/api/v1/content/generate"
payload = {
"website_id": "<string>",
"title": "<string>",
"url": "<string>",
"prompt_ids": ["<string>"],
"custom_instructions": "<string>",
"brand_kit_id": "<string>",
"sheet_id": "<string>",
"use_content_memories": True,
"auto_approve": True,
"content_format_type": "<string>",
"scrape_additional_links": True,
"selected_topic_ids": ["<string>"],
"pinned_claim_ids": ["<string>"],
"use_kb_internal_links": True,
"rec_id": "<string>",
"pdf_file_name_or_r2_key": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
website_id: '<string>',
title: '<string>',
url: '<string>',
prompt_ids: ['<string>'],
custom_instructions: '<string>',
brand_kit_id: '<string>',
sheet_id: '<string>',
use_content_memories: true,
auto_approve: true,
content_format_type: '<string>',
scrape_additional_links: true,
selected_topic_ids: ['<string>'],
pinned_claim_ids: ['<string>'],
use_kb_internal_links: true,
rec_id: '<string>',
pdf_file_name_or_r2_key: '<string>'
})
};
fetch('https://api.athenahq.ai/api/v1/content/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.athenahq.ai/api/v1/content/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([
'website_id' => '<string>',
'title' => '<string>',
'url' => '<string>',
'prompt_ids' => [
'<string>'
],
'custom_instructions' => '<string>',
'brand_kit_id' => '<string>',
'sheet_id' => '<string>',
'use_content_memories' => true,
'auto_approve' => true,
'content_format_type' => '<string>',
'scrape_additional_links' => true,
'selected_topic_ids' => [
'<string>'
],
'pinned_claim_ids' => [
'<string>'
],
'use_kb_internal_links' => true,
'rec_id' => '<string>',
'pdf_file_name_or_r2_key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.athenahq.ai/api/v1/content/generate"
payload := strings.NewReader("{\n \"website_id\": \"<string>\",\n \"title\": \"<string>\",\n \"url\": \"<string>\",\n \"prompt_ids\": [\n \"<string>\"\n ],\n \"custom_instructions\": \"<string>\",\n \"brand_kit_id\": \"<string>\",\n \"sheet_id\": \"<string>\",\n \"use_content_memories\": true,\n \"auto_approve\": true,\n \"content_format_type\": \"<string>\",\n \"scrape_additional_links\": true,\n \"selected_topic_ids\": [\n \"<string>\"\n ],\n \"pinned_claim_ids\": [\n \"<string>\"\n ],\n \"use_kb_internal_links\": true,\n \"rec_id\": \"<string>\",\n \"pdf_file_name_or_r2_key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.athenahq.ai/api/v1/content/generate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"website_id\": \"<string>\",\n \"title\": \"<string>\",\n \"url\": \"<string>\",\n \"prompt_ids\": [\n \"<string>\"\n ],\n \"custom_instructions\": \"<string>\",\n \"brand_kit_id\": \"<string>\",\n \"sheet_id\": \"<string>\",\n \"use_content_memories\": true,\n \"auto_approve\": true,\n \"content_format_type\": \"<string>\",\n \"scrape_additional_links\": true,\n \"selected_topic_ids\": [\n \"<string>\"\n ],\n \"pinned_claim_ids\": [\n \"<string>\"\n ],\n \"use_kb_internal_links\": true,\n \"rec_id\": \"<string>\",\n \"pdf_file_name_or_r2_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.athenahq.ai/api/v1/content/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"website_id\": \"<string>\",\n \"title\": \"<string>\",\n \"url\": \"<string>\",\n \"prompt_ids\": [\n \"<string>\"\n ],\n \"custom_instructions\": \"<string>\",\n \"brand_kit_id\": \"<string>\",\n \"sheet_id\": \"<string>\",\n \"use_content_memories\": true,\n \"auto_approve\": true,\n \"content_format_type\": \"<string>\",\n \"scrape_additional_links\": true,\n \"selected_topic_ids\": [\n \"<string>\"\n ],\n \"pinned_claim_ids\": [\n \"<string>\"\n ],\n \"use_kb_internal_links\": true,\n \"rec_id\": \"<string>\",\n \"pdf_file_name_or_r2_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"content_ids": [
"<string>"
],
"status": "generating",
"slice_titles": [
"<string>"
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Body
draft: generate a brief and optionally an article from tracked prompts. snipe: draft an article using a competitor URL as input. optimize: improve an existing page for AI search. slice: turn one source URL into several articles.
draft, snipe, optimize, slice Article title. Required for draft, snipe, and optimize modes.
Source page URL. Required for snipe, optimize, and slice modes. A URL without a protocol, such as example.com/article, is accepted.
Existing tracked prompt UUIDs, up to 100. Required and nonempty for draft; omit for slice. Use IDs from the website's tracked prompt list; never invent them.
Draft mode only. Defaults to true, which continues from brief generation to article generation. Set false to pause at generated_brief until approve_brief is called.
auto, manual, none A reviewed fact selection from the fact preview. When present (draft mode with the knowledge base enabled), generation uses exactly these pillars and kept facts instead of computing a selection, and pinned_claim_ids no longer influences selection. Claims without a pillar are never used: a kept id that resolves to an unfiled claim is dropped and reported in the run's selection outcome.
Show child attributes
Show child attributes
on_page_topic, on_page_snipe Was this page helpful?