curl --request POST \
--url https://api.superx.so/v1/articles/{id}/cover \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"style_text": "dark, minimal, geometric"
}
'import requests
url = "https://api.superx.so/v1/articles/{id}/cover"
payload = { "style_text": "dark, minimal, geometric" }
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({style_text: 'dark, minimal, geometric'})
};
fetch('https://api.superx.so/v1/articles/{id}/cover', 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.superx.so/v1/articles/{id}/cover",
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([
'style_text' => 'dark, minimal, geometric'
]),
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.superx.so/v1/articles/{id}/cover"
payload := strings.NewReader("{\n \"style_text\": \"dark, minimal, geometric\"\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.superx.so/v1/articles/{id}/cover")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"style_text\": \"dark, minimal, geometric\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superx.so/v1/articles/{id}/cover")
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 \"style_text\": \"dark, minimal, geometric\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"cover": {
"url": "https://media.superx.so/covers/example.jpg"
},
"attached": true,
"remaining_day": 3,
"remaining_month": 11
},
"meta": {
"credits_charged": 25
}
}Generate an AI cover image
Generates a 2.5:1 cover image from the article’s TITLE (a title is required) and, by default, attaches it as the article’s cover. attach: false generates without touching the current cover; attach later via PATCH cover_url. Steer the artwork with style_id (one of the account’s saved styles, from GET /v1/cover-styles) or style_text (a one-off description, max 8000 chars) - sending BOTH is a 400, so the request always says exactly which look was rendered. An unknown style_id returns 404 cover_style_not_found.
Slow (60-100 seconds) and paid: a FLAT 25 AI credits per generation on this API, whatever the render actually costs, reported in meta.credits_charged and the X-Credits-Charged header. The account’s daily and monthly cover caps apply on top and are enforced server-side; cap 429s carry remaining_day / remaining_month / limit_day / limit_month, and a credit 429 carries credits_required / credits_remaining / reset_at.
A generation that fails outright is refunded in full. A 504 is different: the render may well have completed and landed in the article’s cover history, so the 25 credits stay charged and you should read the article before retrying.
Supports Idempotency-Key, recommended. Works for your main account or any account linked to it (account_id); accounts shared with you are read-only.
curl --request POST \
--url https://api.superx.so/v1/articles/{id}/cover \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"style_text": "dark, minimal, geometric"
}
'import requests
url = "https://api.superx.so/v1/articles/{id}/cover"
payload = { "style_text": "dark, minimal, geometric" }
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({style_text: 'dark, minimal, geometric'})
};
fetch('https://api.superx.so/v1/articles/{id}/cover', 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.superx.so/v1/articles/{id}/cover",
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([
'style_text' => 'dark, minimal, geometric'
]),
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.superx.so/v1/articles/{id}/cover"
payload := strings.NewReader("{\n \"style_text\": \"dark, minimal, geometric\"\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.superx.so/v1/articles/{id}/cover")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"style_text\": \"dark, minimal, geometric\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superx.so/v1/articles/{id}/cover")
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 \"style_text\": \"dark, minimal, geometric\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"cover": {
"url": "https://media.superx.so/covers/example.jpg"
},
"attached": true,
"remaining_day": 3,
"remaining_month": 11
},
"meta": {
"credits_charged": 25
}
}Authorizations
A SuperX API key ("sxk_..."), created in the SuperX app under Account > API / MCP / CLI. Keys are server-side secrets.
Headers
Unique key (max 64 characters) for safe retries. Replays carry the "Idempotency-Replayed" response header set to "true". Keys are retained for 24 hours.
64Path Parameters
Body
A saved cover style id from GET /v1/cover-styles. Not accepted together with style_text.
1 - 64Optional one-off style description steering the artwork. Not accepted together with style_id.
8000